28 #ifndef PXTASK_PXTASK_H 29 #define PXTASK_PXTASK_H 57 virtual void run() = 0;
66 virtual const char*
getName()
const = 0;
133 mTm->finishBefore( *
this, taskID);
141 mTm->startAfter( *
this, taskID );
291 mTm->decrReference(*
this);
306 mTm->addReference(*
this);
334 #endif // PXTASK_PXTASK_H Definition: GuContactBuffer.h:37
Base class of all task types.
Definition: PxTask.h:45
PX_INLINE void release()
called by CpuDispatcher after run method has completed
Definition: PxTask.h:314
PxLightCpuTask()
Definition: PxTask.h:225
virtual void release()
Release method implementation.
Definition: PxTask.h:118
friend class PxGpuWorkerThread
Definition: PxTask.h:205
PX_FORCE_INLINE PxU64 getContextId() const
Definition: PxTask.h:95
virtual ~PxBaseTask()
Definition: PxTask.h:49
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:158
volatile int32_t mRefCount
PxTask is dispatched when reaches 0.
Definition: PxTask.h:325
PxU64 mContextID
Context ID for profiler interface.
Definition: PxTask.h:98
unsigned int PxTaskID
Definition: PxTaskManager.h:41
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:364
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:295
PxBaseTask * mCont
Continuation task, can be NULL.
Definition: PxTask.h:324
uint32_t mStreamIndex
GpuTask CUDA stream index.
Definition: PxTask.h:201
PX_INLINE void startAfter(PxTaskID taskID)
Inform the PxTaskManager this task cannot start until the given.
Definition: PxTask.h:138
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:244
A PxBaseTask implementation with immediate execution and simple dependencies.
Definition: PxTask.h:222
PX_INLINE void addReference()
Manually increment this task's reference count. The task will not be allowed to run until removeRefer...
Definition: PxTask.h:148
PxTask()
Definition: PxTask.h:114
uint64_t PxU64
Definition: PxSimpleTypes.h:69
friend class PxTaskMgr
Definition: PxTask.h:204
PxTaskID mTaskID
ID assigned at submission.
Definition: PxTask.h:200
virtual void submitted()
Called by PxTaskManager at submission time for initialization.
Definition: PxTask.h:185
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:263
PX_FORCE_INLINE PxTaskManager * getTaskManager() const
Return PxTaskManager to which this task was submitted.
Definition: PxTask.h:89
PxTaskManager * mTm
Owning PxTaskManager instance.
Definition: PxTask.h:99
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:94
friend class PxTaskMgr
Definition: PxTask.h:327
bool mPreSyncRequired
GpuTask sync flag.
Definition: PxTask.h:202
The PxTaskManager interface.
Definition: PxTaskManager.h:81
PX_INLINE PxBaseTask * getContinuation() const
Retrieves continuation task.
Definition: PxTask.h:280
friend class PxTaskMgr
Definition: PxTask.h:101
virtual ~PxTask()
Definition: PxTask.h:115
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:289
virtual ~PxLightCpuTask()
Definition: PxTask.h:230
PX_INLINE int32_t getReference() const
Return the ref-count for this task.
Definition: PxTask.h:167
PX_INLINE PxTaskID getTaskID() const
Return the unique ID for this task.
Definition: PxTask.h:175
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:130
PxBaseTask()
Definition: PxTask.h:48
#define PX_ASSERT(exp)
Definition: PxAssert.h:61
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:304
virtual int32_t getReference() const =0
Implemented by derived implementation classes.
#define PX_INLINE
Definition: PxPreprocessor.h:349
A PxBaseTask implementation with deferred execution and full dependencies.
Definition: PxTask.h:111
PX_INLINE void requestSyncPoint()
Specify that the GpuTask sync flag be set.
Definition: PxTask.h:194