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

Public Member Functions | |
virtual std::string | getType () const =0 |
virtual | ~ComputeResource ()=default |
__INLINE__ nlohmann::json | serialize () const |
__INLINE__ void | deserialize (const nlohmann::json &input) |
Protected Member Functions | |
virtual void | serializeImpl (nlohmann::json &output) const =0 |
virtual void | deserializeImpl (const nlohmann::json &input)=0 |
Detailed Description
This class represents an abstract 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()
|
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()
|
protectedpure virtual |
Backend-specific implementation of the deserialize function
- Parameters
-
[in] input Serialized compute resource information corresponding to the specific backend's topology manager
Implemented in HiCR::backend::hwloc::ComputeResource.
◆ getType()
|
pure virtual |
Indicates what type of compute unit is contained in this instance
- Returns
- A string containing a human-readable description of the compute resource type
Implemented in HiCR::backend::ascend::ComputeResource, HiCR::backend::hwloc::ComputeResource, and HiCR::backend::opencl::ComputeResource.
◆ serialize()
|
inline |
Serialization function to enable sharing compute resource information
- Returns
- JSON-formatted serialized compute resource information
◆ serializeImpl()
|
protectedpure virtual |
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
Implemented in HiCR::backend::hwloc::ComputeResource.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/core/computeResource.hpp
Generated by