Template Class FiCloseDeleter

Class Documentation

template<HasFidConcept T>
class FiCloseDeleter

Deleter for libfabric objects to be closed by fi_close.

This struct provides a custom deleter for the any libfabric object that contains a fid that is closed by fi_close. It is used with std::unique_ptr to automatically free the structure when it goes out of scope.

Public Functions

inline explicit FiCloseDeleter(EndPointAddress address = {}, std::string message = "")

Construct a new FiCloseDeleter object.

Takes arguments to be put into an error message in case of a failure to close.

Parameters:
  • address – The address of the endpoint

  • message – The message to be printed in case of an error

inline void operator()(T *obj) const

Close the libfabric object by calling fi_close.

Issue an error in case of a failure to close the object.

Parameters:

obj – The libfabric object to close