17 return std::make_unique<RMAGrainIngressProtocol>(std::move(regions));
21 if (regions.size() != 1)
25 return std::make_unique<RMASampleIngressProtocol>(regions.front(), layout.
asContinuous(), maxSyncBatchSize);
37 return std::make_unique<RMAGrainEgressProtocolTemplate>(layout.
asDiscrete(), std::move(regions));
41 if (regions.size() != 1)
45 return std::make_unique<RMASampleEgressProtocolTemplate>(layout.
asContinuous(), regions.front());
Describes the layout of data within memory regions.
Discrete const & asDiscrete() const
Get the DataLayout as Discrete.
bool isContinuous() const noexcept
Check if the DataLayout is of continuous type.
Continuous const & asContinuous() const
Get the DataLayout as Continuous.
bool isDiscrete() const noexcept
Check if the DataLayout is of discrete type.
static Exception invalidArgument(fmt::format_string< T... > fmt, T &&... args)
Make an MXL_ERR_INVALID_ARG exception.
std::unique_ptr< IngressProtocol > selectIngressProtocol(DataLayout const &layout, std::vector< Region > regions, std::uint32_t maxSyncBatchSize)
Select an appropriate ingress protocol based on the data layout.
std::unique_ptr< EgressProtocolTemplate > selectEgressProtocol(DataLayout const &layout, std::vector< Region > regions)
Select an appropriate egress protocol based on the data layout.