Public Member Functions | Protected Attributes | List of all members
PxGpuTask Class Referenceabstract

PxTask implementation for launching CUDA work. More...

#include <PxGpuTask.h>

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

Public Member Functions

 PxGpuTask ()
 
virtual bool launchInstance (CUstream stream, int kernelIndex)=0
 iterative "run" function for a PxGpuTask More...
 
virtual PxGpuTaskHint::Enum getTaskHint () const =0
 Returns a hint indicating the function of this task. More...
 
void setCompletionTask (PxBaseTask &task)
 Specify a task that will have its reference count decremented when this task is released. More...
 
void release ()
 Release method implementation. More...
 
- Public Member Functions inherited from PxTask
 PxTask ()
 
virtual ~PxTask ()
 
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

PxBaseTaskmComp
 A pointer to the completion task. More...
 
- Protected Attributes inherited from PxTask
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...
 

Detailed Description

PxTask implementation for launching CUDA work.

Constructor & Destructor Documentation

PxGpuTask::PxGpuTask ( )
inline

Member Function Documentation

virtual PxGpuTaskHint::Enum PxGpuTask::getTaskHint ( ) const
pure virtual

Returns a hint indicating the function of this task.

virtual bool PxGpuTask::launchInstance ( CUstream  stream,
int  kernelIndex 
)
pure virtual

iterative "run" function for a PxGpuTask

The GpuDispatcher acquires the CUDA context for the duration of this function call, and it is highly recommended that the PxGpuTask use the provided CUstream for all kernels.

kernelIndex will be 0 for the initial call and incremented before each subsequent call. Once launchInstance() returns false, its PxGpuTask is considered completed and is released.

void PxGpuTask::release ( )
inlinevirtual

Release method implementation.

Reimplemented from PxTask.

References NULL, PxTask::release(), and PxBaseTask::removeReference().

void PxGpuTask::setCompletionTask ( PxBaseTask task)
inline

Specify a task that will have its reference count decremented when this task is released.

Member Data Documentation

PxBaseTask* PxGpuTask::mComp
protected

A pointer to the completion task.


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