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

A Workload is a base class for describing a task that can be executed by a set of ComputeResources. More...

#include <Workload.h>

Inherited by gts::MicroScheduler_Workload.

Public Member Functions

GTS_INLINE Workload (WorkloadType::Enum type)
 
virtual ~Workload ()=default
 
GTS_INLINE WorkloadType::Enum type () const
 
GTS_INLINE NodemyNode () const
 
virtual void execute (WorkloadContext const &ctx)=0
 

Protected Attributes

Nodem_pMyNode
 The Node this Workload is attached to.
 
WorkloadType::Enum m_type
 The Workloads type.
 

Friends

class Node
 

Detailed Description

A Workload is a base class for describing a task that can be executed by a set of ComputeResources.

Constructor & Destructor Documentation

◆ ~Workload()

virtual gts::Workload::~Workload ( )
virtualdefault

For polymorphic destruction.

Member Function Documentation

◆ execute()

virtual void gts::Workload::execute ( WorkloadContext const &  ctx)
pure virtual

Executes the Workload in the given context.

Implemented in gts::MicroSchedulerLambda_Workload.

◆ myNode()

GTS_INLINE Node* gts::Workload::myNode ( ) const
inline
Returns
The Node this Workload is attached to.

◆ type()

GTS_INLINE WorkloadType::Enum gts::Workload::type ( ) const
inline
Returns
This Workload's type.