Topology Class Reference
HiCR
|
HiCR::Topology Class Reference
#include <topology.hpp>
Public Types | |
using | deviceList_t = std::vector< std::shared_ptr< Device > > |
Public Member Functions | |
__INLINE__ const deviceList_t & | getDevices () const |
__INLINE__ void | addDevice (const std::shared_ptr< HiCR::Device > &device) |
__INLINE__ void | merge (const Topology &source) |
__INLINE__ nlohmann::json | serialize () const |
nlohmann::json & | getMetadata () |
const nlohmann::json & | getMetadata () const |
void | setMetadata (const nlohmann::json &metadata) |
Static Public Member Functions | |
static __INLINE__ void | verify (const nlohmann::json &input) |
Detailed Description
This class represents an abstract definition for a HiCR Topology that:
- Describes the physical resources (devices) of a given system (real or constructed for requesting new instances)
- Information about the connectivity between the given devices
Member Typedef Documentation
◆ deviceList_t
using HiCR::Topology::deviceList_t = std::vector<std::shared_ptr<Device> > |
Common type for a collection of devices
Member Function Documentation
◆ addDevice()
|
inline |
This function allows manually adding a new device into an existing topology
- Parameters
-
[in] device The device to add
◆ getDevices()
|
inline |
This function prompts the backend to perform the necessary steps to return existing devices
- Returns
- A set of pointers to HiCR instances that refer to both local and remote instances
◆ getMetadata() [1/2]
|
inline |
A function to get internal topology metadata
- Returns
- The internal topology metadata
◆ getMetadata() [2/2]
|
inline |
A const variant of the function to get internal topology metadata
- Returns
- The internal topology metadata
◆ merge()
|
inline |
This function allows manually merging one topology information into another
- Parameters
-
[in] source The source topology to add into this instance
◆ serialize()
|
inline |
Serialization function to enable sharing topology information across different HiCR instances (or any other purposes)
- Returns
- JSON-formatted serialized topology, as detected by this topology manager
◆ setMetadata()
|
inline |
A function to set internal topology metadata
- Parameters
-
[in] metadata The JSON-based metadata to store
◆ verify()
|
inlinestatic |
Verifies the provided input (encoded in JSON) satisfied the standard format to describe a topology
- Parameters
-
[in] input JSON-formatted serialized topology
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/core/topology.hpp
Generated by