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

Represent a memory region (unregistered). More...

#include <Region.hpp>

Collaboration diagram for mxl::lib::fabrics::ofi::Region:

Classes

class  Location
 Represent the location of a memory region. More...

Public Member Functions

::iovec const * asIovec () const noexcept
 Return the underlying iovec structure representing the memory region.
 Region (std::uintptr_t base, std::size_t size, std::uint64_t const *grainIndexPtr, std::uint16_t *validSlicesPtr, Location loc=Location::host()) noexcept
 Construct a Region object.
::iovec toIovec () const noexcept
 Convert the Region to an iovec structure.

Public Attributes

std::uintptr_t base
std::uint64_t const * grainIndexPtr
Location loc
std::size_t size
std::uint16_t * validSlicesPtr

Static Private Member Functions

::iovec iovecFromRegion (std::uintptr_t, std::size_t) noexcept

Private Attributes

::iovec _iovec

Detailed Description

Represent a memory region (unregistered).

Definition at line 23 of file Region.hpp.

Constructor & Destructor Documentation

◆ Region()

mxl::lib::fabrics::ofi::Region::Region ( std::uintptr_t base,
std::size_t size,
std::uint64_t const * grainIndexPtr,
std::uint16_t * validSlicesPtr,
Location loc = Location::host() )
inlineexplicitnoexcept

Construct a Region object.

Parameters
baseThe base address of the memory region.
sizeThe size of the memory region in bytes.
locThe location of the memory region
See also
Location.

Definition at line 98 of file Region.hpp.

100 : base(base)
101 , size(size)
104 , loc(loc)
106 {}
::iovec iovecFromRegion(std::uintptr_t, std::size_t) noexcept
Definition Region.cpp:88
std::uint16_t * validSlicesPtr
Definition Region.hpp:123
std::uint64_t const * grainIndexPtr
Definition Region.hpp:122

Member Function Documentation

◆ asIovec()

iovec const * mxl::lib::fabrics::ofi::Region::asIovec ( ) const
nodiscardnoexcept

Return the underlying iovec structure representing the memory region.

Definition at line 77 of file Region.cpp.

78 {
79 return &_iovec;
80 }

◆ iovecFromRegion()

iovec mxl::lib::fabrics::ofi::Region::iovecFromRegion ( std::uintptr_t base,
std::size_t size )
staticprivatenoexcept

Definition at line 88 of file Region.cpp.

89 {
90 return ::iovec{.iov_base = reinterpret_cast<void*>(base), .iov_len = size};
91 }

◆ toIovec()

iovec mxl::lib::fabrics::ofi::Region::toIovec ( ) const
nodiscardnoexcept

Convert the Region to an iovec structure.

Definition at line 82 of file Region.cpp.

83 {
84 return _iovec;
85 }

Member Data Documentation

◆ _iovec

::iovec mxl::lib::fabrics::ofi::Region::_iovec
private

Definition at line 130 of file Region.hpp.

◆ base

std::uintptr_t mxl::lib::fabrics::ofi::Region::base

Definition at line 120 of file Region.hpp.

◆ grainIndexPtr

std::uint64_t const* mxl::lib::fabrics::ofi::Region::grainIndexPtr

Definition at line 122 of file Region.hpp.

◆ loc

Location mxl::lib::fabrics::ofi::Region::loc

Definition at line 124 of file Region.hpp.

◆ size

std::size_t mxl::lib::fabrics::ofi::Region::size

Definition at line 121 of file Region.hpp.

◆ validSlicesPtr

std::uint16_t* mxl::lib::fabrics::ofi::Region::validSlicesPtr

Definition at line 123 of file Region.hpp.


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