MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::fabrics::ofi::EgressProtocol Class Referenceabstract

Interface for transfer operations. More...

#include <Protocol.hpp>

Inheritance diagram for mxl::lib::fabrics::ofi::EgressProtocol:

Public Member Functions

virtual bool hasPendingWork () const =0
 Check if there is uncompleted requests.
virtual void processCompletion (Completion const &completion)=0
 Process a completion event. Any post-processing after a transfer should be done here.
virtual void registerMemory (std::shared_ptr< Domain > domain)=0
 Register local memory regions used in this protocol.
virtual std::size_t reset ()=0
 Destroy the protocol object.
virtual void transferGrain (Endpoint const &ep, std::uint64_t localIndex, std::uint64_t remoteIndex, std::uint32_t payloadOffset, SliceRange const &sliceRange, ::fi_addr_t destAddr=FI_ADDR_UNSPEC)=0
 Transfer a grain to a remote target.
virtual void transferSamples (Endpoint const &ep, std::uint64_t headIndex, std::size_t count, ::fi_addr_t destAddr=FI_ADDR_UNSPEC)=0
 Transfer samples to a remote target.
virtual ~EgressProtocol ()=default

Detailed Description

Interface for transfer operations.

Used to abstract away the details of how data is transferred to remote targets.

Definition at line 68 of file Protocol.hpp.

Constructor & Destructor Documentation

◆ ~EgressProtocol()

virtual mxl::lib::fabrics::ofi::EgressProtocol::~EgressProtocol ( )
virtualdefault

Member Function Documentation

◆ hasPendingWork()

virtual bool mxl::lib::fabrics::ofi::EgressProtocol::hasPendingWork ( ) const
nodiscardpure virtual

Check if there is uncompleted requests.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.

◆ processCompletion()

virtual void mxl::lib::fabrics::ofi::EgressProtocol::processCompletion ( Completion const & completion)
pure virtual

Process a completion event. Any post-processing after a transfer should be done here.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.

◆ registerMemory()

virtual void mxl::lib::fabrics::ofi::EgressProtocol::registerMemory ( std::shared_ptr< Domain > domain)
pure virtual

Register local memory regions used in this protocol.

Parameters
domainThe domain to register memory with.
Note
This is used to register additional local memory regions. One example of this, is in the case where there is a metadata header that needs to be transferred along with the actual data, and the header is stored in a different memory region from the data. And such memory region can only be created after the protocol template creates the protocol instance since the header content is only known after the instance is created.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.

◆ reset()

virtual std::size_t mxl::lib::fabrics::ofi::EgressProtocol::reset ( )
pure virtual

Destroy the protocol object.

Returns
The number of pending transfers.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.

◆ transferGrain()

virtual void mxl::lib::fabrics::ofi::EgressProtocol::transferGrain ( Endpoint const & ep,
std::uint64_t localIndex,
std::uint64_t remoteIndex,
std::uint32_t payloadOffset,
SliceRange const & sliceRange,
::fi_addr_t destAddr = FI_ADDR_UNSPEC )
pure virtual

Transfer a grain to a remote target.

Parameters
localRegionThe local region to transfer from.
remoteIndexThe index of the remote grain to transfer to.
payloadOffsetThe payload offset within the grain.
sliceRangeThe range of slices to transfer.
destAddrThe destination address. This is ignored for connection-oriented endpoints.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.

◆ transferSamples()

virtual void mxl::lib::fabrics::ofi::EgressProtocol::transferSamples ( Endpoint const & ep,
std::uint64_t headIndex,
std::size_t count,
::fi_addr_t destAddr = FI_ADDR_UNSPEC )
pure virtual

Transfer samples to a remote target.

Parameters
headIndexThe head index of the samples to transfer.
countThe number of samples per channel to transfer.
destAddrThe destination address. This is ignored for connection-oriented endpoints.

Implemented in mxl::lib::fabrics::ofi::RMAGrainEgressProtocol, and mxl::lib::fabrics::ofi::RMASampleEgressProtocol.


The documentation for this class was generated from the following file: