MemoryManager Class Reference

HiCR: HiCR::backend::hwloc::MemoryManager Class Reference
HiCR
HiCR::backend::hwloc::MemoryManager Class Referencefinal

#include <memoryManager.hpp>

Inheritance diagram for HiCR::backend::hwloc::MemoryManager:
HiCR::MemoryManager

Public Member Functions

 MemoryManager (const hwloc_topology_t *topology)
 
 ~MemoryManager () override=default
 
void setRequestedBindingType (const LocalMemorySlot::binding_type type)
 
LocalMemorySlot::binding_type getRequestedBindingType () const
 
- Public Member Functions inherited from HiCR::MemoryManager
__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)
 

Static Public Member Functions

static __INLINE__ std::unique_ptr< HiCR::MemoryManagercreateDefault ()
 

Additional Inherited Members

- Protected Member Functions inherited from HiCR::MemoryManager
virtual std::shared_ptr< HiCR::LocalMemorySlotallocateLocalMemorySlotImpl (std::shared_ptr< HiCR::MemorySpace > memorySpace, const size_t size)=0
 
virtual std::shared_ptr< LocalMemorySlotregisterLocalMemorySlotImpl (std::shared_ptr< HiCR::MemorySpace > memorySpace, void *const ptr, const size_t size)=0
 
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 HWloc-based memory manager for allocation of memory in the host

Constructor & Destructor Documentation

◆ MemoryManager()

HiCR::backend::hwloc::MemoryManager::MemoryManager ( const hwloc_topology_t *  topology)
inline

Constructor for the memory manager class for the hwloc backend

Parameters
[in]topologyAn HWloc topology object that can be used to query the available memory resources

◆ ~MemoryManager()

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

Default destructor

Reimplemented from HiCR::MemoryManager.

Member Function Documentation

◆ createDefault()

static __INLINE__ std::unique_ptr< HiCR::MemoryManager > HiCR::backend::hwloc::MemoryManager::createDefault ( )
inlinestatic

This function represents the default intializer for this backend

Returns
A unique pointer to the newly instantiated backend class

◆ getRequestedBindingType()

LocalMemorySlot::binding_type HiCR::backend::hwloc::MemoryManager::getRequestedBindingType ( ) const
inline

Gets the currently set desired memory binding type

Returns
The currently requested binding type

◆ setRequestedBindingType()

void HiCR::backend::hwloc::MemoryManager::setRequestedBindingType ( const LocalMemorySlot::binding_type  type)
inline

Sets the desired memory binding type before running an allocation attempt

Parameters
[in]typeThe new requested binding type to use

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