7#include <rdma/fabric.h>
8#include <rdma/fi_errno.h>
19 fiCall(::fi_fabric2,
"Failed to open fabric",
info.raw(), &fid, 0,
nullptr);
22 struct MakeSharedEnabler :
public Fabric
29 return std::make_shared<MakeSharedEnabler>(fid,
info);
79 fiCall(::fi_close,
"failed to close fabric", &
_raw->fid);
Non-owning view of a FabricInfo. Returned when iterating over a FabricInfoList.
Fabric(Fabric const &)=delete
void close()
Close the underlying fabric object.
static std::shared_ptr< Fabric > open(FabricInfoView info)
Open a fabric object based on the provided FabricInfoView.
void operator=(Fabric const &)=delete
::fid_fabric * raw() noexcept
Mutable accessor for the underlying raw libfabric fabric object.
FabricInfoView info() const noexcept
Get a view on the libfabric info used to open this fabric.
void catchAndLogFabricError(F &&fun, std::string_view msg)
int fiCall(F &&fun, std::string_view msg, T &&... args)
Call a libfabric function and check its return code.