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

Abstract base class for Initiator implementations. More...

#include <Initiator.hpp>

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

Classes

struct  Interrupted
struct  NotReady
struct  Ready

Public Types

using MakeProgressResult = std::variant<Ready, NotReady, Interrupted>

Public Member Functions

virtual void addTarget (TargetInfo const &targetInfo)=0
 Add a target to the initiator.
virtual MakeProgressResult makeProgress ()=0
 Attempts to progress execution, including connection management and data operations.
virtual MakeProgressResult makeProgressBlocking (std::chrono::steady_clock::duration)=0
 Attempts to progress execution, including connection management and data operations.
virtual void removeTarget (TargetInfo const &targetInfo)=0
 Remove a target from the initiator.
virtual void shutdown ()=0
 Shut down the initiator gracefully.
virtual void transferGrain (std::uint64_t grainIndex, std::uint16_t startSlice, std::uint16_t endSlice)=0
 Transfer a grain to all targets.
virtual void transferGrainToTarget (Endpoint::Id targetId, std::uint64_t localIndex, std::uint64_t remoteIndex, std::uint64_t payloadOffset, std::uint16_t startSlice, std::uint16_t endSlice)=0
 Transfer a grain to a specific target.
virtual void transferSamples (std::uint64_t headIndex, std::size_t count)=0
 Transfer samples to all targets.
virtual ~Initiator ()=default

Detailed Description

Abstract base class for Initiator implementations.

Definition at line 30 of file Initiator.hpp.

Member Typedef Documentation

◆ MakeProgressResult

Constructor & Destructor Documentation

◆ ~Initiator()

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

Member Function Documentation

◆ addTarget()

virtual void mxl::lib::fabrics::ofi::Initiator::addTarget ( TargetInfo const & targetInfo)
pure virtual

Add a target to the initiator.

The is a non-blocking operation. The local endpoint for this target will only actively start connecting to its remote counterpart when control is passed to makeProgress() or makeProgressBlocking(). The local endpoint for this target will only accept write requests after the progress functions return false.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ makeProgress()

virtual MakeProgressResult mxl::lib::fabrics::ofi::Initiator::makeProgress ( )
pure virtual

Attempts to progress execution, including connection management and data operations.

This is the non-blocking version of the progress function.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ makeProgressBlocking()

virtual MakeProgressResult mxl::lib::fabrics::ofi::Initiator::makeProgressBlocking ( std::chrono::steady_clock::duration )
pure virtual

Attempts to progress execution, including connection management and data operations.

This is the blocking version of the progress function.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ removeTarget()

virtual void mxl::lib::fabrics::ofi::Initiator::removeTarget ( TargetInfo const & targetInfo)
pure virtual

Remove a target from the initiator.

This is a non-blocking operation. The target is only removed after makeProgress() or makeProgressBlocking() returns false.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ shutdown()

virtual void mxl::lib::fabrics::ofi::Initiator::shutdown ( )
pure virtual

Shut down the initiator gracefully.

Initiates a graceful shutdown of the initiator and blocks until the shutdown is complete. Can throw an exception if the shutdown is not successful. If this function throws the initiator can no longer be used.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ transferGrain()

virtual void mxl::lib::fabrics::ofi::Initiator::transferGrain ( std::uint64_t grainIndex,
std::uint16_t startSlice,
std::uint16_t endSlice )
pure virtual

Transfer a grain to all targets.

This is a non-blocking operation. The transfer is complete only after makeProgress() or makeProgressBlocking() returns false.

Parameters
grainIndexThe index of the grain to transfer.
startSliceThe start slice in the slice range to transfer. This is inclusive.
endSliceThe end slice in the slice range to transfer. This is exclusive.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ transferGrainToTarget()

virtual void mxl::lib::fabrics::ofi::Initiator::transferGrainToTarget ( Endpoint::Id targetId,
std::uint64_t localIndex,
std::uint64_t remoteIndex,
std::uint64_t payloadOffset,
std::uint16_t startSlice,
std::uint16_t endSlice )
pure virtual

Transfer a grain to a specific target.

This is a non-blocking operation. The transfer is complete only after makeProgress() or makeProgressBlocking() returns false.

Parameters
targetIdThe ID of the target to transfer the grain to.
localIndexThe index of the local grain to transfer from.
remoteIndexThe index of the remote grain to transfer to.
payloadOffsetThe payload offset within the grain.
startSliceThe start slice in the slice range to transfer. This is inclusive.
endSliceThe end slice in the slice range to transfer. This is exclusive.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.

◆ transferSamples()

virtual void mxl::lib::fabrics::ofi::Initiator::transferSamples ( std::uint64_t headIndex,
std::size_t count )
pure virtual

Transfer samples to all targets.

This is a non-blocking operation. The transfer is complete only after makeProgress() or makeProgressBlocking() returns false.

Parameters
headIndexThe head index to transfer.
countThe number of samples per channel to transfer.

Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.


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