A ComputeResource represents a entity that can execute a Workload in a Node.
More...
#include <ComputeResource.h>
Inherited by gts::MicroScheduler_ComputeResource.
A ComputeResource represents a entity that can execute a Workload in a Node.
◆ ComputeResource()
gts::ComputeResource::ComputeResource |
( |
| ) |
|
◆ ~ComputeResource()
virtual gts::ComputeResource::~ComputeResource |
( |
| ) |
|
|
virtualdefault |
For polymorphic destruction.
◆ _setMaxRank()
GTS_INLINE void gts::ComputeResource::_setMaxRank |
( |
uint32_t |
maxRank | ) |
|
|
inline |
Sets the maximum Node rank this ComputeResouce can execute.
◆ canExecute()
virtual bool gts::ComputeResource::canExecute |
( |
Node * |
pNode | ) |
const |
|
pure virtual |
◆ executionNormalizationFactor()
GTS_INLINE double gts::ComputeResource::executionNormalizationFactor |
( |
| ) |
const |
|
inline |
- Returns
- The normalization factor applied to execution times produced by this compute resource.
◆ id()
◆ maxRank()
GTS_INLINE uint32_t gts::ComputeResource::maxRank |
( |
| ) |
const |
|
inline |
- Returns
- The maximum Node rank this ComputeResouce can execute.
◆ notify()
virtual void gts::ComputeResource::notify |
( |
Schedule * |
pSchedule | ) |
|
|
pure virtual |
◆ process()
virtual bool gts::ComputeResource::process |
( |
Schedule * |
pSchedule, |
|
|
bool |
canBlock |
|
) |
| |
|
pure virtual |
Process pSchedule until it is complete. If 'canBlock' is true, this ComputeResouces can use the calling thread; if false, it must fork its own thread.
- Returns
- True if a node was processed.
Implemented in gts::MicroScheduler_ComputeResource.
◆ processorCount()
virtual uint32_t gts::ComputeResource::processorCount |
( |
| ) |
const |
|
pure virtual |
◆ registerSchedule()
virtual void gts::ComputeResource::registerSchedule |
( |
Schedule * |
| ) |
|
|
inlinevirtual |
◆ setExecutionNormalizationFactor()
void gts::ComputeResource::setExecutionNormalizationFactor |
( |
double |
exeWeight | ) |
|
|
inline |
Sets the normalization factor applied to each Nodes execution time. This factor normalizes all execution times into a single ComputeResrouce's execution space.
- Todo:
- Have the MicroScheduler set this during initialization instead of the user.
◆ type()
◆ unregisterSchedule()
virtual void gts::ComputeResource::unregisterSchedule |
( |
Schedule * |
| ) |
|
|
inlinevirtual |
◆ m_affinityQueue
Nodes that require this ComputeResource. They are send from other ComputeResouce while processing a Schedule. These Node must be processed first when looking for work.