ProcessingUnit Class Reference
HiCR
|
HiCR::ProcessingUnit Class Referenceabstract
#include <processingUnit.hpp>
Inheritance diagram for HiCR::ProcessingUnit:

Public Types | |
enum | state_t { uninitialized , ready , running , suspended , terminating , terminated } |
Public Member Functions | |
ProcessingUnit ()=delete | |
__INLINE__ | ProcessingUnit (std::shared_ptr< HiCR::ComputeResource > computeResource) |
virtual | ~ProcessingUnit ()=default |
__INLINE__ ProcessingUnit::state_t | getState () const |
__INLINE__ std::shared_ptr< ComputeResource > | getComputeResource () |
virtual std::string | getType ()=0 |
Friends | |
class | HiCR::ComputeManager |
Detailed Description
This class represents an abstract definition for a Processing Unit resource in HiCR that:
- Represents a single compute resource that has been instantiated for execution (as opposed of those who shall remain unused or unassigned).
- Is capable of executing or contributing to the execution of tasks.
- Is assigned, for example, to a worker to perform the work necessary to execute a task.
- This is a non-copy-able class
Member Enumeration Documentation
◆ state_t
Complete state set that a worker can be in
Constructor & Destructor Documentation
◆ ProcessingUnit() [1/2]
|
delete |
Disabled default constructor
◆ ProcessingUnit() [2/2]
|
inline |
Constructor for a processing unit
- Parameters
-
computeResource The instance of the compute resource to instantiate, as indicated by the backend
◆ ~ProcessingUnit()
|
virtualdefault |
Default destructor
Reimplemented in HiCR::backend::ascend::ProcessingUnit.
Member Function Documentation
◆ getComputeResource()
|
inline |
Returns the processing unit's associated compute resource
- Returns
- The identifier of the compute resource associated to this processing unit.
◆ getState()
|
inline |
Function to obtain the processing unit's state
- Returns
- Retruns the current state
◆ getType()
|
pure virtual |
Gets the processing unit's type
- Returns
- A string, containing the processing unit's type
Implemented in HiCR::backend::ascend::ProcessingUnit, HiCR::backend::nosv::ProcessingUnit, HiCR::backend::opencl::ProcessingUnit, and HiCR::backend::pthreads::ProcessingUnit.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/core/processingUnit.hpp
Generated by