TopologyManager Class Reference

HiCR: HiCR::backend::hwloc::TopologyManager Class Reference
HiCR
HiCR::backend::hwloc::TopologyManager Class Referencefinal

#include <topologyManager.hpp>

Inheritance diagram for HiCR::backend::hwloc::TopologyManager:
HiCR::TopologyManager

Public Member Functions

 TopologyManager (hwloc_topology_t *topology)
 
 ~TopologyManager () override=default
 
__INLINE__ HiCR::Topology queryTopology () override
 
__INLINE__ HiCR::Topology _deserializeTopology (const nlohmann::json &topology) const override
 

Static Public Member Functions

static __INLINE__ HiCR::Topology deserializeTopology (const nlohmann::json &topology)
 
static __INLINE__ std::unique_ptr< HiCR::TopologyManagercreateDefault ()
 

Additional Inherited Members

- Protected Member Functions inherited from HiCR::TopologyManager
 TopologyManager ()=default
 

Detailed Description

Implementation of the HWLoc-based topology manager for CPU resource detection

Constructor & Destructor Documentation

◆ TopologyManager()

HiCR::backend::hwloc::TopologyManager::TopologyManager ( hwloc_topology_t *  topology)
inline

The constructor is employed to reserve memory required for hwloc

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

◆ ~TopologyManager()

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

The constructor is employed to free memory required for hwloc

Reimplemented from HiCR::TopologyManager.

Member Function Documentation

◆ _deserializeTopology()

__INLINE__ HiCR::Topology HiCR::backend::hwloc::TopologyManager::_deserializeTopology ( const nlohmann::json &  topology) const
inlineoverridevirtual

This function deserializes a JSON-encoded topology into a topology class with its constituent devices, as recognized by the called backend, and returns it

If the backend does not recognize a device in the encoded topology, it will not add it to the topology

Parameters
[in]topologyThe JSON-encoded topology to deserialize
Returns
The deserialized topology containing only devices recognized by the backend

Implements HiCR::TopologyManager.

◆ createDefault()

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

This function represents the default intializer for this backend

Returns
A unique pointer to the newly instantiated backend class

◆ deserializeTopology()

static __INLINE__ HiCR::Topology HiCR::backend::hwloc::TopologyManager::deserializeTopology ( const nlohmann::json &  topology)
inlinestatic

Static implementation of the _deserializeTopology Function

Parameters
[in]topologysee: _deserializeTopology
Returns
see: _deserializeTopology

◆ queryTopology()

__INLINE__ HiCR::Topology HiCR::backend::hwloc::TopologyManager::queryTopology ( )
inlineoverridevirtual

This function prompts the backend to perform the necessary steps to discover the system topology

In case of change in resource availability during runtime, users need to re-run this function to be able to see the changes.

Returns
The detected topology, as detected by the specific b ackend

Implements HiCR::TopologyManager.


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