ComputeManager Class Reference
HiCR
|
HiCR::backend::pthreads::ComputeManager Class Reference
#include <computeManager.hpp>
Inheritance diagram for HiCR::backend::pthreads::ComputeManager:

Public Member Functions | |
ComputeManager () | |
~ComputeManager () override=default | |
__INLINE__ std::unique_ptr< HiCR::ExecutionState > | createExecutionState (std::shared_ptr< HiCR::ExecutionUnit > executionUnit, void *const argument=nullptr) const override |
__INLINE__ std::unique_ptr< HiCR::ProcessingUnit > | createProcessingUnit (std::shared_ptr< HiCR::ComputeResource > computeResource) const override |
![]() | |
virtual std::unique_ptr< HiCR::ExecutionState > | createExecutionState (std::shared_ptr< HiCR::ExecutionUnit > executionUnit, void *const argument=nullptr) const =0 |
__INLINE__ void | initialize (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) |
__INLINE__ void | start (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit, std::unique_ptr< HiCR::ExecutionState > &executionState) |
__INLINE__ void | suspend (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) |
__INLINE__ void | resume (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) |
__INLINE__ void | terminate (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) |
__INLINE__ void | await (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit) |
Static Public Member Functions | |
static __INLINE__ std::shared_ptr< HiCR::ExecutionUnit > | createExecutionUnit (const pthreadFc_t &threadFunction) |
Additional Inherited Members | |
![]() | |
virtual void | initializeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0 |
virtual void | startImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit, std::unique_ptr< HiCR::ExecutionState > &executionState)=0 |
virtual void | suspendImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0 |
virtual void | resumeImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0 |
virtual void | terminateImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0 |
virtual void | awaitImpl (std::unique_ptr< HiCR::ProcessingUnit > &processingUnit)=0 |
Detailed Description
Implementation of the pthreads compute manager.
Constructor & Destructor Documentation
◆ ComputeManager()
|
inline |
Compute Manager constructor
◆ ~ComputeManager()
|
overridevirtualdefault |
Default destructor
Reimplemented from HiCR::ComputeManager.
Member Function Documentation
◆ createExecutionState()
|
inlineoverride |
Creates an execution state from an execution unit
- Parameters
-
[in] executionUnit The execution unit to run [in] argument Argument to pass to the execution unit
- Returns
- A newly created execution state
◆ createExecutionUnit()
|
inlinestatic |
This function enables the creation of an execution unit.
Its default constructor takes a simple replicable CPU-executable function
- Parameters
-
[in] threadFunction The replicable function to execute
- Returns
- The newly created execution unit
◆ createProcessingUnit()
|
inlineoverridevirtual |
Creates a new processing unit from the provided compute resource
- Parameters
-
[in] resource This is the identifier of the compute resource to use to instantiate into a processing unit. The identifier should be one of those provided by the backend. Providing an arbitrary identifier may lead to unexpected behavior.
- Returns
- A unique pointer to the newly created processing unit. It is important to preserve the uniqueness of this object, since it represents a physical resource (e.g., core) and we do not want to assign it to multiple workers.
Implements HiCR::ComputeManager.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/pthreads/computeManager.hpp
Generated by