Device Class Reference

HiCR: HiCR::backend::hwloc::Device Class Reference
HiCR
HiCR::backend::hwloc::Device Class Referencefinal

#include <device.hpp>

Inheritance diagram for HiCR::backend::hwloc::Device:
HiCR::Device

Public Types

using NUMADomainID_t = unsigned int
 
- Public Types inherited from HiCR::Device
using computeResourceList_t = std::vector< std::shared_ptr< ComputeResource > >
 
using memorySpaceList_t = std::vector< std::shared_ptr< MemorySpace > >
 

Public Member Functions

 Device (const NUMADomainID_t NUMADomainId, const computeResourceList_t &computeResources, const memorySpaceList_t &memorySpaces)
 
 Device ()
 
 Device (const nlohmann::json &input)
 
 ~Device () override=default
 
- Public Member Functions inherited from HiCR::Device
__INLINE__ const computeResourceList_tgetComputeResourceList ()
 
__INLINE__ const memorySpaceList_tgetMemorySpaceList ()
 
__INLINE__ void addComputeResource (const std::shared_ptr< HiCR::ComputeResource > &computeResource)
 
__INLINE__ void addMemorySpace (const std::shared_ptr< HiCR::MemorySpace > &memorySpace)
 
 Device (computeResourceList_t computeResources, memorySpaceList_t memorySpaces)
 
__INLINE__ nlohmann::json serialize () const
 
__INLINE__ void deserialize (const nlohmann::json &input)
 

Protected Member Functions

__INLINE__ std::string getType () const override
 
- Protected Member Functions inherited from HiCR::Device
 Device ()=default
 

Detailed Description

This class represents a device, as visible by the hwloc backend. That is, an assumed SMP processor plus a shared RAM that all process have access to.

Member Typedef Documentation

◆ NUMADomainID_t

Type definition for a NUMA Domain identifier

Constructor & Destructor Documentation

◆ Device() [1/3]

HiCR::backend::hwloc::Device::Device ( const NUMADomainID_t  NUMADomainId,
const computeResourceList_t computeResources,
const memorySpaceList_t memorySpaces 
)
inline

Constructor for the device class of the HWLoC backend

Parameters
[in]NUMADomainIdThe OS-given NUMA domain identifier represented by this class
[in]computeResourcesThe compute resources (cores or hyperthreads) detected in this device (CPU)
[in]memorySpacesThe memory spaces (e.g., NUMA domains) detected in this device (CPU)

◆ Device() [2/3]

HiCR::backend::hwloc::Device::Device ( )
inline

Empty constructor for serialization / deserialization

◆ Device() [3/3]

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

Deserializing constructor

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

Parameters
[in]inputA JSON-encoded serialized NUMA domain information

◆ ~Device()

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

Default destructor

Reimplemented from HiCR::Device.

Member Function Documentation

◆ getType()

__INLINE__ std::string HiCR::backend::hwloc::Device::getType ( ) const
inlineoverrideprotectedvirtual

Indicates what type of device is represented in this instance

Returns
A string containing a human-readable description of the compute resource type

Implements HiCR::Device.


The documentation for this class was generated from the following file:
  • /home/runner/work/HiCR/HiCR/include/hicr/backends/hwloc/device.hpp