|
Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
|
A ComputeResource that wraps a MicroScheduler. More...
#include <MicroScheduler_ComputeResource.h>
Inherits gts::ComputeResource.
Classes | |
| struct | CheckForTasksData |
Public Member Functions | |
| MicroScheduler_ComputeResource (MicroScheduler *pMicroScheduler, uint32_t vectorWidth, uint32_t physicalProcessorCount) | |
| bool | init (MicroScheduler *pMicroScheduler) |
| GTS_INLINE MicroScheduler * | microScheduler () |
| GTS_INLINE Schedule * | currentSchedule () |
| virtual GTS_INLINE ComputeResourceType::Enum | type () const final |
| GTS_INLINE uint32_t | vectorWidth () |
| virtual bool | process (Schedule *pSchedule, bool canBlock) |
| virtual bool | canExecute (Node *pNode) const final |
| virtual uint32_t | processorCount () const final |
| virtual void | notify (Schedule *pSchedule) final |
| virtual void | registerSchedule (Schedule *pSchedulue) final |
| virtual void | unregisterSchedule (Schedule *pSchedulue) final |
| virtual void | spawnReadyChildren (WorkloadContext const &workloadContext, Task *pCurrentTask) |
Public Member Functions inherited from gts::ComputeResource | |
| ComputeResource () | |
| virtual | ~ComputeResource ()=default |
| GTS_INLINE uint32_t | maxRank () const |
| GTS_INLINE double | executionNormalizationFactor () const |
| GTS_INLINE ComputeResourceId | id () const |
| void | setExecutionNormalizationFactor (double exeWeight) |
| Sets the normalization factor applied to each Nodes execution time. This factor normalizes all execution times into a single ComputeResrouce's execution space. More... | |
| GTS_INLINE void | _setMaxRank (uint32_t maxRank) |
| Sets the maximum Node rank this ComputeResouce can execute. More... | |
Protected Member Functions | |
| bool | _tryRunNextNode (Schedule *pSchedule, bool myQueuesOnly) |
| Task * | _tryGetNextTask (CheckForTasksData *pData, bool myQueuesOnly, bool &executedTask) |
| bool | _buildTaskAndRun (Schedule *pSchedule, Node *pNode) |
| Task * | _buildTask (Schedule *pSchedule, Node *pNode) |
| bool | _tryToStealWork () |
Static Protected Member Functions | |
| static Task * | onCheckForTask (void *pUserData, MicroScheduler *, OwnedId, bool isCallerExternal, bool &executedTask) |
Protected Attributes | |
| MicroScheduler * | m_pMicroScheduler = nullptr |
Protected Attributes inherited from gts::ComputeResource | |
| QueueMPSC< Node * > | m_affinityQueue |
Friends | |
| class | MicroScheduler_Task |
A ComputeResource that wraps a MicroScheduler.
|
finalvirtual |
Implements gts::ComputeResource.
|
finalvirtual |
Notify this ComputeResrouce of work available.
Implements gts::ComputeResource.
|
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.
Implements gts::ComputeResource.
|
finalvirtual |
Implements gts::ComputeResource.
|
finalvirtual |
Register a Schedule with this ComputeResrouce.
Reimplemented from gts::ComputeResource.
|
inlinefinalvirtual |
Implements gts::ComputeResource.
|
finalvirtual |
Unregister a Schedule from this ComputeResrouce.
Reimplemented from gts::ComputeResource.