LocalMemorySlot Class Reference

HiCR: HiCR::LocalMemorySlot Class Reference
HiCR
HiCR::LocalMemorySlot Class Reference

#include <localMemorySlot.hpp>

Inheritance diagram for HiCR::LocalMemorySlot:
HiCR::backend::ascend::LocalMemorySlot HiCR::backend::hwloc::LocalMemorySlot HiCR::backend::lpf::LocalMemorySlot HiCR::backend::mpi::LocalMemorySlot HiCR::backend::opencl::LocalMemorySlot

Public Member Functions

 LocalMemorySlot (void *const pointer, const size_t size, std::shared_ptr< HiCR::MemorySpace > memorySpace=nullptr)
 
virtual ~LocalMemorySlot ()=default
 
__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
 

Friends

class HiCR::CommunicationManager
 

Detailed Description

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

  • Represents a contiguous segment within a memory space in the local system, with a starting address and a size

Constructor & Destructor Documentation

◆ LocalMemorySlot()

HiCR::LocalMemorySlot::LocalMemorySlot ( void *const  pointer,
const size_t  size,
std::shared_ptr< HiCR::MemorySpace memorySpace = nullptr 
)
inline

Default constructor for a LocalMemorySlot class

Parameters
[in]pointerThe pointer corresponding to an address in a given memory space
[in]sizeThe size (in bytes) of the memory slot, assumed to be contiguous
[in]memorySpacePointer to the memory space that this memory slot belongs to. NULL, if the memory slot is global (remote)

◆ ~LocalMemorySlot()

Member Function Documentation

◆ getMemorySpace()

__INLINE__ std::shared_ptr< HiCR::MemorySpace > HiCR::LocalMemorySlot::getMemorySpace ( ) const
inlinenoexcept

Getter function for the memory slot's associated memory space

Returns
The memory slot's associated memory space

◆ getMessagesRecv()

__INLINE__ size_t HiCR::LocalMemorySlot::getMessagesRecv ( ) const
inlinenoexcept

Getter function for the memory slot's received message counter

Returns
The memory slot's received message counter

◆ getMessagesSent()

__INLINE__ size_t HiCR::LocalMemorySlot::getMessagesSent ( ) const
inlinenoexcept

Getter function for the memory slot's sent message counter

Returns
The memory slot's sent message counter

◆ getPointer()

__INLINE__ void *& HiCR::LocalMemorySlot::getPointer ( )
inlinenoexcept

Getter function for the memory slot's pointer

Returns
The memory slot's internal pointer

◆ getSize()

__INLINE__ size_t HiCR::LocalMemorySlot::getSize ( ) const
inlinenoexcept

Getter function for the memory slot's size

Returns
The memory slot's size

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