10#include <rdma/fabric.h>
33 virtual std::vector<RemoteRegion>
registerMemory(std::shared_ptr<Domain> domain) = 0;
89 virtual void transferGrain(
Endpoint const& ep, std::uint64_t localIndex, std::uint64_t remoteIndex, std::uint32_t payloadOffset,
90 SliceRange const& sliceRange, ::fi_addr_t destAddr = FI_ADDR_UNSPEC) = 0;
Type to represent a completion entry from a CompletionQueue.
std::uintptr_t Token
A token used to associate a completion entry with an endpoint.
Describes the layout of data within memory regions.
virtual std::unique_ptr< EgressProtocol > createInstance(Completion::Token token, TargetInfo remoteInfo)=0
Create a new instance of the protocol for a remote target.
virtual ~EgressProtocolTemplate()=default
virtual void registerMemory(std::shared_ptr< Domain > domain)=0
Register memory required by the protocol.
Interface for transfer operations.
virtual void processCompletion(Completion const &completion)=0
Process a completion event. Any post-processing after a transfer should be done here.
virtual ~EgressProtocol()=default
virtual bool hasPendingWork() const =0
Check if there is uncompleted requests.
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 void registerMemory(std::shared_ptr< Domain > domain)=0
Register local memory regions used in this protocol.
RAII Wrapper around a libfabric endpoint (fi_ep).
Interface for post-processing on transfer reception.
virtual std::optional< Target::ReadResult > read(Endpoint const &endpoint, Completion const &completion)=0
Process a completion with the given immediate data.
virtual bool canReadGrains() const noexcept=0
Check if this protocol can read grains.
virtual void start(Endpoint const &endpoint)=0
Start receiving.
virtual ~IngressProtocol()=default
virtual void reset()=0
Destroy the protocol object.
virtual bool canReadSamples() const noexcept=0
Check if this protocol can read samples.
virtual std::optional< TargetInfoBounceBufferInfo > bounceBufferInfo() const =0
virtual std::vector< RemoteRegion > registerMemory(std::shared_ptr< Domain > domain)=0
Register local memory regions used in this protocol.
A SliceRange represents a range of slices within a grain.
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.
std::size_t count(uuids::uuid id) const noexcept
Returns the number of writers registered for flow id 'id'.
TargetInfo contains all the information required by an initiator to operate transfers to the given ta...