26 {
27 requireCapability(info, FI_REMOTE_WRITE,
"Interface is missing required remote write capability");
29 if (!provider)
30 {
32 }
33
35
38
40
42 if (options.cqDepth)
43 {
44 cqAttr.size = *options.cqDepth;
45 }
47 {
49 {
51 {
53 }
54
55 cqAttr.waitObject = FI_WAIT_NONE;
56 }
57 }
58
60 endpoint.bind(cq, FI_RECV | FI_TRANSMIT);
61
62
64 endpoint.bind(av);
65
67
68
69 endpoint.enable();
70
72 auto protocol =
selectIngressProtocol(mxlRegions.dataLayout(), mxlRegions.regions(), mxlRegions.maxSyncBatchSize());
73 auto targetInfo = std::make_unique<TargetInfo>(
74 endpoint.id(), endpoint.localAddress(), *provider, protocol->registerMemory(domain), protocol->bounceBufferInfo());
75
77 {
78 MakeUniqueEnabler(Endpoint ep, std::unique_ptr<IngressProtocol> proto)
79 : RDMTarget(std::move(ep), std::move(proto))
80 {}
81 };
82
83 return {std::make_unique<MakeUniqueEnabler>(std::move(endpoint), std::move(protocol)), std::move(targetInfo)};
84 }
static std::shared_ptr< AddressVector > open(std::shared_ptr< Domain > domain, Attributes attr=Attributes::defaults())
Create an AddressVector.
static std::shared_ptr< CompletionQueue > open(std::shared_ptr< Domain > domain, Attributes const &attr=Attributes::defaults())
Create a new completion queue in the specified domain.
static bool isWaitObjectSupportedForEFA() noexcept
Check if wait any wait object type supported by the EFA provider for this libfabric version.
static std::shared_ptr< Domain > open(std::shared_ptr< Fabric > fabric)
Open a new domain associated with the specified fabric.
static Endpoint create(std::shared_ptr< Domain > domain, FabricInfoView info)
Allocates (active) new endpoint.
static std::shared_ptr< EventQueue > open(std::shared_ptr< Fabric >, Attributes const &attr=Attributes::defaults())
Create a new event queue associated with the specified fabric.
static Exception invalidArgument(fmt::format_string< T... > fmt, T &&... args)
Make an MXL_ERR_INVALID_ARG exception.
static Exception make(mxlStatus status, fmt::format_string< T... > fmt, T &&... args)
Make any type of exception.
static FabricAddress fromSource(FabricInfoView info) noexcept
Build a FabricAddress from the source address of info.
static std::shared_ptr< Fabric > open(FabricInfoView info)
Open a fabric object based on the provided FabricInfoView.
static MxlRegions forWriter(mxlFlowWriter)
RDMTarget(Endpoint ep, std::unique_ptr< IngressProtocol > protocol)
Construct an RDMTarget with the given endpoint and immediate data location.
@ MXL_FABRICS_IFACE_CAP_BLOCKING_OPERATIONS
std::optional< Provider > providerFromString(std::string const &s) noexcept
Parse a provider name string, and return the enum value.
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.
void requireCapability(FabricInfoView info, std::uint64_t cap, std::string_view message)
static Attributes defaults()
Returns the a CompletionQueueAttr with all of its attributes set to reasonable defaults.