28 #ifndef PXTASK_PXTASK_H 29 #define PXTASK_PXTASK_H 56 virtual void run() = 0;
65 virtual const char*
getName()
const = 0;
132 mTm->finishBefore( *
this, taskID);
140 mTm->startAfter( *
this, taskID );
277 mTm->decrReference(*
this);
292 mTm->addReference(*
this);
320 #endif // PXTASK_PXTASK_H Definition: GuContactBuffer.h:37
Base class of all task types.
Definition: PxTask.h:44
PX_INLINE void release()
called by CpuDispatcher after run method has completed
Definition: PxTask.h:300
PxLightCpuTask()
Definition: PxTask.h:211
virtual void release()
Release method implementation.
Definition: PxTask.h:117
PX_FORCE_INLINE PxU64 getContextId() const
Definition: PxTask.h:94
virtual ~PxBaseTask()
Definition: PxTask.h:48
PX_INLINE void removeReference()
Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched.
Definition: PxTask.h:157
volatile int32_t mRefCount
PxTask is dispatched when reaches 0.
Definition: PxTask.h:311
PxU64 mContextID
Context ID for profiler interface.
Definition: PxTask.h:97
unsigned int PxTaskID
Definition: PxTaskManager.h:41
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
virtual void release()=0
Implemented by derived implementation classes.
PX_INLINE int32_t getReference() const
Return the ref-count for this task.
Definition: PxTask.h:281
PxBaseTask * mCont
Continuation task, can be NULL.
Definition: PxTask.h:310
PX_INLINE void startAfter(PxTaskID taskID)
Inform the PxTaskManager this task cannot start until the given.
Definition: PxTask.h:137
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
A PxBaseTask implementation with immediate execution and simple dependencies.
Definition: PxTask.h:208
PX_INLINE void addReference()
Manually increment this task's reference count. The task will not be allowed to run until removeRefer...
Definition: PxTask.h:147
PxTask()
Definition: PxTask.h:113
uint64_t PxU64
Definition: PxSimpleTypes.h:69
friend class PxTaskMgr
Definition: PxTask.h:191
PxTaskID mTaskID
ID assigned at submission.
Definition: PxTask.h:189
virtual void submitted()
Called by PxTaskManager at submission time for initialization.
Definition: PxTask.h:184
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:249
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
virtual void run()=0
The user-implemented run method where the task's work should be performed.
PX_FORCE_INLINE void setContextId(PxU64 id)
Definition: PxTask.h:93
friend class PxTaskMgr
Definition: PxTask.h:313
The PxTaskManager interface.
Definition: PxTaskManager.h:78
PX_INLINE PxBaseTask * getContinuation() const
Retrieves continuation task.
Definition: PxTask.h:266
friend class PxTaskMgr
Definition: PxTask.h:100
virtual ~PxTask()
Definition: PxTask.h:114
PX_INLINE void removeReference()
Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched.
Definition: PxTask.h:275
virtual ~PxLightCpuTask()
Definition: PxTask.h:216
PX_INLINE int32_t getReference() const
Return the ref-count for this task.
Definition: PxTask.h:166
PX_INLINE PxTaskID getTaskID() const
Return the unique ID for this task.
Definition: PxTask.h:174
virtual void addReference()=0
Implemented by derived implementation classes.
virtual void taskCompleted(PxTask &task)=0
Called by the worker threads to inform the PxTaskManager that a task has completed processing...
PX_INLINE void finishBefore(PxTaskID taskID)
Inform the PxTaskManager this task must finish before the given.
Definition: PxTask.h:129
PxBaseTask()
Definition: PxTask.h:47
#define PX_ASSERT(exp)
Definition: PxAssert.h:59
virtual const char * getName() const =0
Return a user-provided task name for profiling purposes.
virtual void removeReference()=0
Implemented by derived implementation classes.
PX_INLINE void addReference()
Manually increment this task's reference count. The task will not be allowed to run until removeRefer...
Definition: PxTask.h:290
virtual int32_t getReference() const =0
Implemented by derived implementation classes.
#define PX_INLINE
Definition: PxPreprocessor.h:336
A PxBaseTask implementation with deferred execution and full dependencies.
Definition: PxTask.h:110