MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::fabrics::ofi::Completion::Data Class Reference

Data variant of the completion entry instance. More...

#include <Completion.hpp>

Public Member Functions

std::optional< std::uint64_t > data () const noexcept
 Accessor for the immediate data associated with the completion entry.
bool isLocalWrite () const noexcept
 Indicates whether the completion entry represents a local write operation.
bool isRemoteWrite () const noexcept
 Indicates whether the completion entry represents a remote write operation.
Completion::Token token () const noexcept
 This used to associate a completion entry with an endpoint when multiple endpoints use the same completion queue.

Private Member Functions

 Data (::fi_cq_data_entry const &raw)

Private Attributes

::fi_cq_data_entry _raw

Friends

class CompletionQueue

Detailed Description

Data variant of the completion entry instance.

Definition at line 30 of file Completion.hpp.

Constructor & Destructor Documentation

◆ Data()

mxl::lib::fabrics::ofi::Completion::Data::Data ( ::fi_cq_data_entry const & raw)
explicitprivate

Definition at line 15 of file Completion.cpp.

16 : _raw(raw)
17 {}
::fi_info * raw() noexcept
Returns the raw fi_info object managed by this FabricInfo instance.

Member Function Documentation

◆ data()

std::optional< std::uint64_t > mxl::lib::fabrics::ofi::Completion::Data::data ( ) const
nodiscardnoexcept

Accessor for the immediate data associated with the completion entry.

Definition at line 19 of file Completion.cpp.

20 {
21 if (!(_raw.flags & FI_REMOTE_CQ_DATA))
22 {
23 return std::nullopt;
24 }
25
26 return _raw.data;
27 }

◆ isLocalWrite()

bool mxl::lib::fabrics::ofi::Completion::Data::isLocalWrite ( ) const
nodiscardnoexcept

Indicates whether the completion entry represents a local write operation.

Definition at line 34 of file Completion.cpp.

35 {
36 return (_raw.flags & FI_RMA) && (_raw.flags & FI_WRITE);
37 }

◆ isRemoteWrite()

bool mxl::lib::fabrics::ofi::Completion::Data::isRemoteWrite ( ) const
nodiscardnoexcept

Indicates whether the completion entry represents a remote write operation.

Definition at line 29 of file Completion.cpp.

30 {
31 return (_raw.flags & FI_RMA) && (_raw.flags & FI_REMOTE_WRITE);
32 }

◆ token()

Completion::Token mxl::lib::fabrics::ofi::Completion::Data::token ( ) const
nodiscardnoexcept

This used to associate a completion entry with an endpoint when multiple endpoints use the same completion queue.

Definition at line 68 of file Completion.cpp.

69 {
70 return tokenFromContextValue(_raw.op_context);
71 }
static constexpr Token tokenFromContextValue(void *contextValue) noexcept
Convert between completion tokens and context values that can be written to and read from raw libfabr...

◆ CompletionQueue

friend class CompletionQueue
friend

Definition at line 54 of file Completion.hpp.

Member Data Documentation

◆ _raw

::fi_cq_data_entry mxl::lib::fabrics::ofi::Completion::Data::_raw
private

Definition at line 60 of file Completion.hpp.


The documentation for this class was generated from the following files: