|
MXL : Media eXchange Layer
MXL
|
Abstract base class for Initiator implementations. More...
#include <Initiator.hpp>

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 |
Abstract base class for Initiator implementations.
Definition at line 30 of file Initiator.hpp.
| using mxl::lib::fabrics::ofi::Initiator::MakeProgressResult = std::variant<Ready, NotReady, Interrupted> |
Definition at line 42 of file Initiator.hpp.
|
virtualdefault |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
| grainIndex | The index of the grain to transfer. |
| startSlice | The start slice in the slice range to transfer. This is inclusive. |
| endSlice | The end slice in the slice range to transfer. This is exclusive. |
Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.
|
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.
| targetId | The ID of the target to transfer the grain to. |
| localIndex | The index of the local grain to transfer from. |
| remoteIndex | The index of the remote grain to transfer to. |
| payloadOffset | The payload offset within the grain. |
| startSlice | The start slice in the slice range to transfer. This is inclusive. |
| endSlice | The end slice in the slice range to transfer. This is exclusive. |
Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.
|
pure virtual |
Transfer samples to all targets.
This is a non-blocking operation. The transfer is complete only after makeProgress() or makeProgressBlocking() returns false.
| headIndex | The head index to transfer. |
| count | The number of samples per channel to transfer. |
Implemented in mxl::lib::fabrics::ofi::RCInitiator, and mxl::lib::fabrics::ofi::RDMInitiator.