LocalMemorySlot Class Reference

HiCR: HiCR::backend::hwloc::LocalMemorySlot Class Reference
HiCR
HiCR::backend::hwloc::LocalMemorySlot Class Referencefinal

#include <localMemorySlot.hpp>

Inheritance diagram for HiCR::backend::hwloc::LocalMemorySlot:
HiCR::LocalMemorySlot

Public Types

enum  binding_type { strict_binding = 2 , strict_non_binding = 1 , relaxed_binding = 0 }
 

Public Member Functions

 LocalMemorySlot (binding_type bindingType, void *const pointer, const size_t size, std::shared_ptr< HiCR::MemorySpace > memorySpace)
 
 ~LocalMemorySlot () override=default
 
__INLINE__ binding_type getBindingType () const
 
- Public Member Functions inherited from HiCR::LocalMemorySlot
 LocalMemorySlot (void *const pointer, const size_t size, std::shared_ptr< HiCR::MemorySpace > memorySpace=nullptr)
 
__INLINE__ void *& getPointer () noexcept
 
__INLINE__ size_t getSize () const noexcept
 
__INLINE__ std::shared_ptr< HiCR::MemorySpacegetMemorySpace () const noexcept
 
__INLINE__ size_t getMessagesRecv () const noexcept
 
__INLINE__ size_t getMessagesSent () const noexcept
 

Detailed Description

This class represents an abstract definition for a Memory Slot resource in HiCR that:

  • Represents a contiguous segment within a memory space, with a starting address and a size

Member Enumeration Documentation

◆ binding_type

Enumeration to determine whether HWLoc supports strict binding and what the user prefers (similar to MPI_Threading_level)

Enumerator
strict_binding 

With strict binding, the memory is allocated strictly in the specified memory space

strict_non_binding 

With strict non-binding, the memory is given by the system allocator. In this case, the binding is most likely setup by the first thread that touches the reserved pages (first touch policy)

relaxed_binding 

With relaxed binding, the memory manager attempts to allocate the memory with a binding, but defaults to non-binding if not supported

Constructor & Destructor Documentation

◆ LocalMemorySlot()

HiCR::backend::hwloc::LocalMemorySlot::LocalMemorySlot ( binding_type  bindingType,
void *const  pointer,
const size_t  size,
std::shared_ptr< HiCR::MemorySpace memorySpace 
)
inline

Constructor for a MemorySlot class for the MPI backend

Parameters
[in]bindingTypeThe binding type requested (and employed) for this memory slot
[in]pointerIf this is a local slot (same rank as this the running process), this pointer indicates the address of the local memory segment
[in]sizeThe size (in bytes) of the memory slot, assumed to be contiguous
[in]memorySpaceThe memory space from whence this memory slot was created

◆ ~LocalMemorySlot()

HiCR::backend::hwloc::LocalMemorySlot::~LocalMemorySlot ( )
overridevirtualdefault

Default destructor

Reimplemented from HiCR::LocalMemorySlot.

Member Function Documentation

◆ getBindingType()

__INLINE__ binding_type HiCR::backend::hwloc::LocalMemorySlot::getBindingType ( ) const
inline

Returns the binding type used to allocate/register this memory slot

Returns
The binding type used to allocate/register this memory slot

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