MemorySpace Class Reference

HiCR: HiCR::backend::hwloc::MemorySpace Class Reference
HiCR
HiCR::backend::hwloc::MemorySpace Class Referencefinal

#include <memorySpace.hpp>

Inheritance diagram for HiCR::backend::hwloc::MemorySpace:
HiCR::MemorySpace

Public Member Functions

 MemorySpace (const size_t size, const hwloc_obj_t hwlocObject, const hwloc::LocalMemorySlot::binding_type bindingSupport)
 
 MemorySpace (const nlohmann::json &input)
 
 ~MemorySpace () override=default
 
__INLINE__ hwloc::LocalMemorySlot::binding_type getSupportedBindingType () const
 
__INLINE__ const hwloc_obj_t getHWLocObject () const
 
__INLINE__ std::string getType () const override
 
- Public Member Functions inherited from HiCR::MemorySpace
virtual __INLINE__ const size_t getSize () const
 
virtual __INLINE__ size_t getUsage () const
 
__INLINE__ void increaseUsage (const size_t delta)
 
__INLINE__ void decreaseUsage (const size_t delta)
 
__INLINE__ nlohmann::json serialize () const
 
__INLINE__ void deserialize (const nlohmann::json &input)
 

Additional Inherited Members

- Protected Member Functions inherited from HiCR::MemorySpace
 MemorySpace (const size_t size)
 
 MemorySpace ()=default
 

Detailed Description

This class represents a memory space, as visible by the hwloc backend. That is, the entire RAM that the running CPU has access to.

Constructor & Destructor Documentation

◆ MemorySpace() [1/2]

HiCR::backend::hwloc::MemorySpace::MemorySpace ( const size_t  size,
const hwloc_obj_t  hwlocObject,
const hwloc::LocalMemorySlot::binding_type  bindingSupport 
)
inline

Constructor for the memory space class of the hwloc backend

Parameters
sizeThe maximum allocatable size detected for this memory space
hwlocObjectHWLoc object for associated to this memory space
bindingSupportThe HWLoc binding type supported by this memory space

◆ MemorySpace() [2/2]

HiCR::backend::hwloc::MemorySpace::MemorySpace ( const nlohmann::json &  input)
inline

Deserializing constructor

The instance created will contain all information, if successful in deserializing it, corresponding to the passed host RAM This instance should NOT be used for anything else than reporting/printing the contained resources

Parameters
[in]inputA JSON-encoded serialized host RAM information

◆ ~MemorySpace()

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

Default destructor

Reimplemented from HiCR::MemorySpace.

Member Function Documentation

◆ getHWLocObject()

__INLINE__ const hwloc_obj_t HiCR::backend::hwloc::MemorySpace::getHWLocObject ( ) const
inline

Function to get the internal HWLoc object represented by this memory space

Returns
The internal HWLoc object

◆ getSupportedBindingType()

__INLINE__ hwloc::LocalMemorySlot::binding_type HiCR::backend::hwloc::MemorySpace::getSupportedBindingType ( ) const
inline

Function to determine whether the memory space supports strictly bound memory allocations

Returns
The supported memory binding type by the memory space

◆ getType()

__INLINE__ std::string HiCR::backend::hwloc::MemorySpace::getType ( ) const
inlineoverridevirtual

Indicates what type of memory space is contained in this instance

Returns
A string containing a human-readable description of the memory space type

Implements HiCR::MemorySpace.


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