ComputeResource Class Reference
HiCR
|
#include <computeResource.hpp>

Public Member Functions | |
ComputeResource ()=default | |
ComputeResource (const nlohmann::json &input) | |
virtual | ~ComputeResource ()=default |
__INLINE__ std::string | getType () const |
__INLINE__ nlohmann::json | serialize () const |
__INLINE__ void | deserialize (const nlohmann::json &input) |
Protected Member Functions | |
virtual __INLINE__ void | serializeImpl (nlohmann::json &output) const |
virtual __INLINE__ void | deserializeImpl (const nlohmann::json &input) |
Protected Attributes | |
std::string | _type |
Detailed Description
This class represents an generic definition for a Compute Resource that:
- Represents a single autonomous unit of computing power (e.g., CPU core, device)
- This is a copy-able class that only contains metadata
Constructor & Destructor Documentation
◆ ComputeResource() [1/2]
|
default |
Default constructor
◆ ComputeResource() [2/2]
|
inline |
Deserializing constructor
The instance created will contain all information, if successful in deserializing it, corresponding to the passed processing unit This instance should NOT be used for anything else than reporting/printing the contained resources
- Parameters
-
[in] input A JSON-encoded serialized processing unit information
◆ ~ComputeResource()
|
virtualdefault |
Default destructor
Reimplemented in HiCR::backend::hwloc::ComputeResource, HiCR::backend::ascend::ComputeResource, and HiCR::backend::opencl::ComputeResource.
Member Function Documentation
◆ deserialize()
|
inline |
De-serialization function to re-construct the serialized compute resource information coming (typically) from remote instances
- Parameters
-
[in] input JSON-formatted serialized compute resource information
◆ deserializeImpl()
|
inlineprotectedvirtual |
Backend-specific implementation of the deserialize function
- Parameters
-
[in] input Serialized compute resource information corresponding to the specific backend's topology manager
Reimplemented in HiCR::backend::hwloc::ComputeResource.
◆ getType()
|
inline |
Indicates what type of compute unit is contained in this instance
- Returns
- A string containing a human-readable description of the compute resource type
◆ serialize()
|
inline |
Serialization function to enable sharing compute resource information
- Returns
- JSON-formatted serialized compute resource information
◆ serializeImpl()
|
inlineprotectedvirtual |
Backend-specific implemtation of the serialize function that allows adding more information than the one provided by default by HiCR
- Parameters
-
[out] output JSON-formatted serialized compute resource information
Reimplemented in HiCR::backend::hwloc::ComputeResource.
Member Data Documentation
◆ _type
|
protected |
Type, used to identify exactly this compute resource's model/technology
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/core/computeResource.hpp
Generated by