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

Public Member Functions | |
__INLINE__ std::string | getType () override |
__INLINE__ | ProcessingUnit (const std::shared_ptr< HiCR::ComputeResource > &computeResource) |
![]() | |
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 () |
Static Public Member Functions | |
static __INLINE__ void | updateAffinity (const std::set< hwloc::ComputeResource::logicalProcessorId_t > &affinity) |
static __INLINE__ std::set< HiCR::backend::hwloc::ComputeResource::logicalProcessorId_t > | getAffinity () |
Friends | |
class | HiCR::backend::pthreads::ComputeManager |
Additional Inherited Members | |
![]() | |
enum | state_t { uninitialized , ready , running , suspended , terminating , terminated } |
Detailed Description
Implementation of a kernel-level thread as processing unit for the pthreads backend.
This implementation uses Pthreads as backend for the creation and management of OS threads.
Constructor & Destructor Documentation
◆ ProcessingUnit()
|
inline |
Constructor for the ProcessingUnit class
- Parameters
-
computeResource Represents the compute resource (core) affinity to associate this processing unit to
Member Function Documentation
◆ getAffinity()
|
inlinestatic |
Queries the OS for the currently set affinity for this thread, and prints it to screen.
- Returns
- The set of cores/processing units that this thread is bound to
◆ getType()
|
inlineoverridevirtual |
Gets the processing unit's type
- Returns
- A string, containing the processing unit's type
Implements HiCR::ProcessingUnit.
◆ updateAffinity()
|
inlinestatic |
Sets up new affinity for the thread. The thread needs to yield or be preempted for the new affinity to work.
- Parameters
-
[in] affinity New affinity to use
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/pthreads/processingUnit.hpp
Generated by