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

A schedule produced by a CentralQueue_MacroScheduler. More...

#include <CentralQueue_Schedule.h>

Inherits gts::Schedule.

Public Member Functions

 CentralQueue_Schedule (MacroScheduler *pMyScheduler, Node *pBegin, Node *pEnd)
 
virtual GTS_INLINE bool isDone () const final
 
virtual NodepopNextNode (ComputeResource *pCompResource, bool myQueuesOnly) final
 
virtual GTS_INLINE void tryMarkDone (Node *pNode) final
 
virtual void insertReadyNode (Node *pNode) final
 
- Public Member Functions inherited from gts::Schedule
GTS_INLINE Schedule (MacroScheduler *pMyScheduler)
 
virtual ~Schedule ()=default
 
GTS_INLINE MacroSchedulergetScheduler ()
 
GTS_INLINE int32_t refCount () const
 
GTS_INLINE int32_t addRef (uint32_t refCount)
 
GTS_INLINE uint32_t removeRef (uint32_t refCount)
 
virtual void observeExecutionCost (ComputeResourceId, uint64_t)
 

Friends

class CentralQueue_MacroScheduler
 

Detailed Description

A schedule produced by a CentralQueue_MacroScheduler.

Member Function Documentation

◆ insertReadyNode()

virtual void gts::CentralQueue_Schedule::insertReadyNode ( Node pNode)
finalvirtual

Inserts a ready Node into the schedule.

Implements gts::Schedule.

◆ isDone()

virtual GTS_INLINE bool gts::CentralQueue_Schedule::isDone ( ) const
inlinefinalvirtual
Returns
True if the schedule is completed.

Implements gts::Schedule.

◆ popNextNode()

virtual Node* gts::CentralQueue_Schedule::popNextNode ( ComputeResource pCompResource,
bool  myQueuesOnly 
)
finalvirtual
Returns
The next Node to execute.

Implements gts::Schedule.

◆ tryMarkDone()

virtual GTS_INLINE void gts::CentralQueue_Schedule::tryMarkDone ( Node pNode)
inlinefinalvirtual

If 'pNode' is the last Node, mark the schedule as done.

Implements gts::Schedule.