Public Member Functions | Protected Attributes | Friends | List of all members
PxTask Class Reference

A PxBaseTask implementation with deferred execution and full dependencies. More...

#include <PxTask.h>

Inheritance diagram for PxTask:
Inheritance graph
[legend]
Collaboration diagram for PxTask:
Collaboration graph
[legend]

Public Member Functions

 PxTask ()
 
virtual ~PxTask ()
 
virtual void release ()
 Release method implementation. More...
 
PX_INLINE void finishBefore (PxTaskID taskID)
 Inform the PxTaskManager this task must finish before the given. More...
 
PX_INLINE void startAfter (PxTaskID taskID)
 Inform the PxTaskManager this task cannot start until the given. More...
 
PX_INLINE void addReference ()
 Manually increment this task's reference count. The task will not be allowed to run until removeReference() is called. More...
 
PX_INLINE void removeReference ()
 Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched. More...
 
PX_INLINE PxI32 getReference () const
 Return the ref-count for this task. More...
 
PX_INLINE PxTaskID getTaskID () const
 Return the unique ID for this task. More...
 
virtual void submitted ()
 Called by PxTaskManager at submission time for initialization. More...
 
PX_INLINE void requestSyncPoint ()
 Specify that the GpuTask sync flag be set. More...
 
- Public Member Functions inherited from PxBaseTask
 PxBaseTask ()
 
virtual ~PxBaseTask ()
 
virtual void run ()=0
 The user-implemented run method where the task's work should be performed. More...
 
virtual const char * getName () const =0
 Return a user-provided task name for profiling purposes. More...
 
PX_INLINE void runProfiled (PxU32 threadId=0)
 Execute user run method with wrapping profiling events. More...
 
PX_INLINE void setProfileStat (PxU16 stat)
 Specify stop event statistic. More...
 
PX_INLINE PxTaskManagergetTaskManager () const
 Return PxTaskManager to which this task was submitted. More...
 

Protected Attributes

PxTaskID mTaskID
 ID assigned at submission. More...
 
PxU32 mStreamIndex
 GpuTask CUDA stream index. More...
 
bool mPreSyncRequired
 GpuTask sync flag. More...
 
- Protected Attributes inherited from PxBaseTask
PxU16 mEventID
 Registered profile event ID. More...
 
PxU16 mProfileStat
 Profiling statistic. More...
 
PxTaskManagermTm
 Owning PxTaskManager instance. More...
 

Friends

class PxTaskMgr
 
class PxGpuWorkerThread
 

Detailed Description

A PxBaseTask implementation with deferred execution and full dependencies.

A PxTask must be submitted to a PxTaskManager to to be executed, Tasks may optionally be named when they are submitted.

Constructor & Destructor Documentation

PxTask::PxTask ( )
inline
virtual PxTask::~PxTask ( )
inlinevirtual

Member Function Documentation

PX_INLINE void PxTask::addReference ( )
inlinevirtual

Manually increment this task's reference count. The task will not be allowed to run until removeReference() is called.

Implements PxBaseTask.

References PX_ASSERT.

PX_INLINE void PxTask::finishBefore ( PxTaskID  taskID)
inline

Inform the PxTaskManager this task must finish before the given.

References PX_ASSERT.

PX_INLINE PxI32 PxTask::getReference ( ) const
inlinevirtual

Return the ref-count for this task.

Implements PxBaseTask.

PX_INLINE PxTaskID PxTask::getTaskID ( ) const
inline

Return the unique ID for this task.

virtual void PxTask::release ( )
inlinevirtual

Release method implementation.

Implements PxBaseTask.

Reimplemented in PxGpuTask.

References NULL, PX_ASSERT, and PxTaskManager::taskCompleted().

Referenced by PxGpuTask::release().

PX_INLINE void PxTask::removeReference ( )
inlinevirtual

Manually decrement this task's reference count. If the reference count reaches zero, the task will be dispatched.

Implements PxBaseTask.

References PX_ASSERT.

PX_INLINE void PxTask::requestSyncPoint ( )
inline

Specify that the GpuTask sync flag be set.

PX_INLINE void PxTask::startAfter ( PxTaskID  taskID)
inline

Inform the PxTaskManager this task cannot start until the given.

References PX_ASSERT.

virtual void PxTask::submitted ( )
inlinevirtual

Called by PxTaskManager at submission time for initialization.

Perform simulation step initialization here.

Friends And Related Function Documentation

friend class PxGpuWorkerThread
friend
friend class PxTaskMgr
friend

Member Data Documentation

bool PxTask::mPreSyncRequired
protected

GpuTask sync flag.

PxU32 PxTask::mStreamIndex
protected

GpuTask CUDA stream index.

PxTaskID PxTask::mTaskID
protected

ID assigned at submission.


The documentation for this class was generated from the following file:


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com