Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::CriticalNode_MacroScheduler Class Reference

A generalized DAG scheduler utilizing "Critically Aware Task Scheduling.". More...

#include <CriticalNode_MacroScheduler.h>

Inherits gts::MacroScheduler.

Public Member Functions

virtual bool init (MacroSchedulerDesc const &desc) final
 
virtual SchedulebuildSchedule (Node *pStart, Node *pEnd) final
 
virtual void freeSchedule (Schedule *pSchedule) final
 
virtual void executeSchedule (Schedule *pSchedule, ComputeResourceId uid) final
 
- Public Member Functions inherited from gts::MacroScheduler
virtual ~MacroScheduler ()
 
ComputeResourcefindComputeResource (ComputeResourceId id)
 
Vector< ComputeResource * > const & computeResources () const
 
Vector< ComputeResource * > & computeResources ()
 
NodeallocateNode ()
 
void destroyNode (Node *pNode)
 

Friends

class CriticalNode_Schedule
 

Additional Inherited Members

- Protected Member Functions inherited from gts::MacroScheduler
void * _allocateWorkload (size_t size)
 
void _freeWorkload (void *ptr)
 
- Protected Attributes inherited from gts::MacroScheduler
Vector< ComputeResource * > m_computeResources
 

Detailed Description

A generalized DAG scheduler utilizing "Critically Aware Task Scheduling.".

Member Function Documentation

◆ buildSchedule()

virtual Schedule* gts::CriticalNode_MacroScheduler::buildSchedule ( Node pStart,
Node pEnd 
)
finalvirtual

Builds a schedule from the specified DAG that begins at 'pStart' and ends at 'pEnd'.

Returns
An Schedule or nullptr if the DAG is invalid.

Implements gts::MacroScheduler.

◆ executeSchedule()

virtual void gts::CriticalNode_MacroScheduler::executeSchedule ( Schedule pSchedule,
ComputeResourceId  id 
)
finalvirtual

Executes the specified 'pSchedule' and uses the specified ComputeResource 'id' for the calling thread. Setting 'id' to UNKNOWN_COMP_RESOURCE will not use the calling thread.

Implements gts::MacroScheduler.

◆ freeSchedule()

virtual void gts::CriticalNode_MacroScheduler::freeSchedule ( Schedule pSchedule)
finalvirtual

Free an existing Schedule from memory.

Implements gts::MacroScheduler.

◆ init()

virtual bool gts::CriticalNode_MacroScheduler::init ( MacroSchedulerDesc const &  desc)
finalvirtual

Initializes the IMacroScheduler object based on 'desc'.

Implements gts::MacroScheduler.