MemoryManager Class Reference

HiCR: HiCR::backend::lpf::MemoryManager Class Reference
HiCR
HiCR::backend::lpf::MemoryManager Class Referencefinal

#include <memoryManager.hpp>

Inheritance diagram for HiCR::backend::lpf::MemoryManager:
HiCR::MemoryManager

Public Member Functions

 MemoryManager (lpf_t lpf)
 
__INLINE__ std::shared_ptr< HiCR::LocalMemorySlotregisterLocalMemorySlotImpl (std::shared_ptr< HiCR::MemorySpace > memorySpace, void *const ptr, const size_t size) override
 
__INLINE__ void deregisterLocalMemorySlotImpl (std::shared_ptr< HiCR::LocalMemorySlot > memorySlot) override
 
__INLINE__ std::shared_ptr< HiCR::LocalMemorySlotallocateLocalMemorySlotImpl (std::shared_ptr< HiCR::MemorySpace > memorySpace, const size_t size) override
 
__INLINE__ void freeLocalMemorySlotImpl (std::shared_ptr< HiCR::LocalMemorySlot > memorySlot) override
 
- Public Member Functions inherited from HiCR::MemoryManager
virtual ~MemoryManager ()=default
 
__INLINE__ std::shared_ptr< LocalMemorySlotallocateLocalMemorySlot (const std::shared_ptr< MemorySpace > &memorySpace, const size_t size)
 
virtual std::shared_ptr< LocalMemorySlotregisterLocalMemorySlot (const std::shared_ptr< HiCR::MemorySpace > &memorySpace, void *const ptr, const size_t size)
 
__INLINE__ void deregisterLocalMemorySlot (const std::shared_ptr< HiCR::LocalMemorySlot > &memorySlot)
 
__INLINE__ void memset (const std::shared_ptr< HiCR::LocalMemorySlot > &memorySlot, int value, size_t size)
 
__INLINE__ void freeLocalMemorySlot (const std::shared_ptr< HiCR::LocalMemorySlot > &memorySlot)
 

Additional Inherited Members

- Protected Member Functions inherited from HiCR::MemoryManager
virtual void memsetImpl (const std::shared_ptr< HiCR::LocalMemorySlot > memorySlot, int value, size_t size)
 
virtual void freeLocalMemorySlotImpl (std::shared_ptr< HiCR::LocalMemorySlot > memorySlot)=0
 
virtual void deregisterLocalMemorySlotImpl (std::shared_ptr< HiCR::LocalMemorySlot > memorySlot)=0
 

Detailed Description

Implementation of the LPF backend

The only LPF engine currently of interest is the IB Verbs engine (see above for branch and hash)

Constructor & Destructor Documentation

◆ MemoryManager()

HiCR::backend::lpf::MemoryManager::MemoryManager ( lpf_t  lpf)
inline

Map of global slot id and MPI windows Constructor of the LPF memory manager

Parameters
[in]lpfLPF context
Note
The decision to resize memory register in the constructor is because this call requires lpf_sync to become effective. This makes it almost impossible to do local memory registrations with LPF. On the other hand, the resize message queue could also be locally made, and placed elsewhere.

Member Function Documentation

◆ allocateLocalMemorySlotImpl()

__INLINE__ std::shared_ptr< HiCR::LocalMemorySlot > HiCR::backend::lpf::MemoryManager::allocateLocalMemorySlotImpl ( std::shared_ptr< HiCR::MemorySpace memorySpace,
const size_t  size 
)
inlineoverridevirtual

Allocates memory in the current memory space (whole system)

Parameters
[in]memorySpaceMemory space in which to perform the allocation.
[in]sizeSize of the memory slot to create
Returns
The address of the newly allocated memory slot

Implements HiCR::MemoryManager.

◆ deregisterLocalMemorySlotImpl()

__INLINE__ void HiCR::backend::lpf::MemoryManager::deregisterLocalMemorySlotImpl ( std::shared_ptr< HiCR::LocalMemorySlot memorySlot)
inlineoverride

De-registers a memory slot previously registered

Parameters
[in]memorySlotPointer to the memory slot to deregister.

◆ freeLocalMemorySlotImpl()

__INLINE__ void HiCR::backend::lpf::MemoryManager::freeLocalMemorySlotImpl ( std::shared_ptr< HiCR::LocalMemorySlot memorySlot)
inlineoverride

Frees up a local memory slot reserved from this memory space

Parameters
[in]memorySlotLocal memory slot to free up. It becomes unusable after freeing.

◆ registerLocalMemorySlotImpl()

__INLINE__ std::shared_ptr< HiCR::LocalMemorySlot > HiCR::backend::lpf::MemoryManager::registerLocalMemorySlotImpl ( std::shared_ptr< HiCR::MemorySpace memorySpace,
void *const  ptr,
const size_t  size 
)
inlineoverridevirtual

Associates a pointer locally-allocated manually and creates a local memory slot with it

Parameters
[in]ptrPointer to the local memory space
[in]sizeSize of the memory slot to register
[in]memorySpaceThe memory space onto which to register the new memory slot
Returns
A newly created memory slot

Implements HiCR::MemoryManager.


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