30#include "task/PxTaskManager.h"
31#include "task/PxCpuDispatcher.h"
32#include "foundation/PxAssert.h"
56 virtual void run() = 0;
132 mTm->finishBefore(*
this, taskID);
140 mTm->startAfter(*
this, taskID);
275 mTm->decrReference(*
this);
290 mTm->addReference(*
this);
Base class of all task types.
Definition PxTask.h:45
virtual void addReference()=0
Implemented by derived implementation classes.
virtual void release()=0
Implemented by derived implementation classes.
virtual void run()=0
The user-implemented run method where the task's work should be performed.
virtual int32_t getReference() const =0
Implemented by derived implementation classes.
PxU64 mContextID
Context ID for profiler interface.
Definition PxTask.h:97
virtual void removeReference()=0
Implemented by derived implementation classes.
virtual const char * getName() const =0
Return a user-provided task name for profiling purposes.
PX_FORCE_INLINE PxTaskManager * getTaskManager() const
Return PxTaskManager to which this task was submitted.
Definition PxTask.h:88
PxTaskManager * mTm
Owning PxTaskManager instance.
Definition PxTask.h:98
A PxBaseTask implementation with immediate execution and simple dependencies.
Definition PxTask.h:209
volatile int32_t mRefCount
PxTask is dispatched when reaches 0.
Definition PxTask.h:307
PX_INLINE void setContinuation(PxBaseTask *c)
Initialize this task and specify the task that will have its ref count decremented on completion.
Definition PxTask.h:247
virtual int32_t getReference() const PX_OVERRIDE
Return the ref-count for this task.
Definition PxTask.h:279
virtual void removeReference() PX_OVERRIDE
Manually decrement this task's reference count. If the reference count reaches zero,...
Definition PxTask.h:273
PX_INLINE void setContinuation(PxTaskManager &tm, PxBaseTask *c)
Initialize this task and specify the task that will have its ref count decremented on completion.
Definition PxTask.h:230
virtual void addReference() PX_OVERRIDE
Manually increment this task's reference count. The task will not be allowed to run until removeRefer...
Definition PxTask.h:288
virtual void release() PX_OVERRIDE
called by CpuDispatcher after run method has completed
Definition PxTask.h:298
PxBaseTask * mCont
Continuation task, can be NULL.
Definition PxTask.h:306
PX_INLINE PxBaseTask * getContinuation() const
Retrieves continuation task.
Definition PxTask.h:264
The PxTaskManager interface.
Definition PxTaskManager.h:81
virtual void taskCompleted(PxTask &task)=0
Called by the worker threads to inform the PxTaskManager that a task has completed processing.
Definition TaskManager.cpp:85
A PxBaseTask implementation with deferred execution and full dependencies.
Definition PxTask.h:111
virtual void removeReference() PX_OVERRIDE
Manually decrement this task's reference count. If the reference count reaches zero,...
Definition PxTask.h:157
virtual void submitted()
Called by PxTaskManager at submission time for initialization.
Definition PxTask.h:184
virtual int32_t getReference() const PX_OVERRIDE
Return the ref-count for this task.
Definition PxTask.h:166
PX_INLINE void startAfter(PxTaskID taskID)
Inform the PxTaskManager this task cannot start until the given.
Definition PxTask.h:137
virtual void addReference() PX_OVERRIDE
Manually increment this task's reference count. The task will not be allowed to run until removeRefer...
Definition PxTask.h:147
PX_INLINE void finishBefore(PxTaskID taskID)
Inform the PxTaskManager this task must finish before the given.
Definition PxTask.h:129
PxTaskID mTaskID
ID assigned at submission.
Definition PxTask.h:189
virtual void release() PX_OVERRIDE
Release method implementation.
Definition PxTask.h:117
PX_INLINE PxTaskID getTaskID() const
Return the unique ID for this task.
Definition PxTask.h:174
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_OVERRIDE
Definition PxPreprocessor.h:375
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39