TopologyManager Class Reference

HiCR: HiCR::backend::opencl::TopologyManager Class Reference
HiCR
HiCR::backend::opencl::TopologyManager Class Referencefinal

#include <topologyManager.hpp>

Inheritance diagram for HiCR::backend::opencl::TopologyManager:
HiCR::TopologyManager

Public Member Functions

 TopologyManager ()
 
 ~TopologyManager ()=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 topology manager for the discovery and use of OpenCL devices

Constructor & Destructor Documentation

◆ TopologyManager()

HiCR::backend::opencl::TopologyManager::TopologyManager ( )
inline

Default constructor

◆ ~TopologyManager()

HiCR::backend::opencl::TopologyManager::~TopologyManager ( )
virtualdefault

Default destructor

Reimplemented from HiCR::TopologyManager.

Member Function Documentation

◆ _deserializeTopology()

__INLINE__ HiCR::Topology HiCR::backend::opencl::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::opencl::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::opencl::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::opencl::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: