Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
PxTaskManager Class Referenceabstract

The PxTaskManager interface. More...

#include <PxTaskManager.h>

Public Member Functions

virtual void setCpuDispatcher (PxCpuDispatcher &ref)=0
 Set the user-provided dispatcher object for CPU tasks. More...
 
virtual void setGpuDispatcher (PxGpuDispatcher &ref)=0
 Set the user-provided dispatcher object for GPU tasks. More...
 
virtual void setSpuDispatcher (PxSpuDispatcher &ref)=0
 Set the user-provided dispatcher object for SPU tasks. More...
 
virtual void initializeProfiling (PxProfileZoneManager &ref)=0
 Set profile zone used for task profiling. More...
 
virtual PxCpuDispatchergetCpuDispatcher () const =0
 Get the user-provided dispatcher object for CPU tasks. More...
 
virtual PxGpuDispatchergetGpuDispatcher () const =0
 Get the user-provided dispatcher object for GPU tasks. More...
 
virtual PxSpuDispatchergetSpuDispatcher () const =0
 Get the user-provided dispatcher object for SPU tasks. More...
 
virtual void resetDependencies ()=0
 Reset any dependencies between Tasks. More...
 
virtual void startSimulation ()=0
 Called by the owning scene to start the task graph. More...
 
virtual void stopSimulation ()=0
 Called by the owning scene at the end of a simulation step to synchronize the PxGpuDispatcher. More...
 
virtual void taskCompleted (PxTask &task)=0
 Called by the worker threads to inform the PxTaskManager that a task has completed processing. More...
 
virtual PxTaskID getNamedTask (const char *name)=0
 Retrieve a task by name. More...
 
virtual PxTaskID submitNamedTask (PxTask *task, const char *name, PxTaskType::Enum type=PxTaskType::TT_CPU)=0
 Submit a task with a unique name. More...
 
virtual PxTaskID submitUnnamedTask (PxTask &task, PxTaskType::Enum type=PxTaskType::TT_CPU)=0
 Submit an unnamed task. More...
 
virtual PxTaskgetTaskFromID (PxTaskID id)=0
 Retrive a task given a task ID. More...
 
virtual void release ()=0
 Release the PxTaskManager object, referneced dispatchers will not be released. More...
 

Static Public Member Functions

static PxTaskManagercreateTaskManager (PxCpuDispatcher *=0, PxGpuDispatcher *=0, PxSpuDispatcher *=0)
 Construct a new PxTaskManager instance with the given [optional] dispatchers. More...
 

Protected Member Functions

virtual ~PxTaskManager ()
 

Friends

class PxBaseTask
 
class PxTask
 
class PxLightCpuTask
 
class PxSpuTask
 
class PxGpuWorkerThread
 

Detailed Description

The PxTaskManager interface.

A PxTaskManager instance holds references to user-provided dispatcher objects, when tasks are submitted the PxTaskManager routes them to the appropriate dispatcher and handles task profiling if enabled. Users should not implement the PxTaskManager interface, the SDK creates it's own concrete PxTaskManager object per-scene which users can configure by passing dispatcher objects into the PxSceneDesc.

See Also
PxSceneDesc
CpuDispatcher
PxGpuDispatcher
PxSpuDispatcher

Constructor & Destructor Documentation

virtual PxTaskManager::~PxTaskManager ( )
inlineprotectedvirtual

Member Function Documentation

static PxTaskManager* PxTaskManager::createTaskManager ( PxCpuDispatcher = 0,
PxGpuDispatcher = 0,
PxSpuDispatcher = 0 
)
static

Construct a new PxTaskManager instance with the given [optional] dispatchers.

virtual PxCpuDispatcher* PxTaskManager::getCpuDispatcher ( ) const
pure virtual

Get the user-provided dispatcher object for CPU tasks.

Returns
The CPU dispatcher object.
See Also
CpuDispatcher
virtual PxGpuDispatcher* PxTaskManager::getGpuDispatcher ( ) const
pure virtual

Get the user-provided dispatcher object for GPU tasks.

Returns
The GPU dispatcher object.
See Also
PxGpuDispatcher
virtual PxTaskID PxTaskManager::getNamedTask ( const char *  name)
pure virtual

Retrieve a task by name.

Parameters
[in]nameThe unique name of a task
Returns
The ID of the task with that name, or TT_NOT_PRESENT if not found
virtual PxSpuDispatcher* PxTaskManager::getSpuDispatcher ( ) const
pure virtual

Get the user-provided dispatcher object for SPU tasks.

Returns
The SPU dispatcher object.
See Also
PxSpuDispatcher
virtual PxTask* PxTaskManager::getTaskFromID ( PxTaskID  id)
pure virtual

Retrive a task given a task ID.

Parameters
[in]idThe ID of the task to return, a valid ID must be passed or results are undefined
Returns
The task associated with the ID
virtual void PxTaskManager::initializeProfiling ( PxProfileZoneManager &  ref)
pure virtual

Set profile zone used for task profiling.

Parameters
[in]refThe profile zone manager
See Also
PxProfileZoneManager
virtual void PxTaskManager::release ( )
pure virtual

Release the PxTaskManager object, referneced dispatchers will not be released.

virtual void PxTaskManager::resetDependencies ( )
pure virtual

Reset any dependencies between Tasks.

Note
Will be called at the start of every frame before tasks are submited.
See Also
PxTask
virtual void PxTaskManager::setCpuDispatcher ( PxCpuDispatcher ref)
pure virtual

Set the user-provided dispatcher object for CPU tasks.

Parameters
[in]refThe dispatcher object.
See Also
CpuDispatcher
virtual void PxTaskManager::setGpuDispatcher ( PxGpuDispatcher ref)
pure virtual

Set the user-provided dispatcher object for GPU tasks.

Parameters
[in]refThe dispatcher object.
See Also
PxGpuDispatcher
virtual void PxTaskManager::setSpuDispatcher ( PxSpuDispatcher ref)
pure virtual

Set the user-provided dispatcher object for SPU tasks.

Parameters
[in]refThe dispatcher object.
See Also
PxSpuDispatcher
virtual void PxTaskManager::startSimulation ( )
pure virtual

Called by the owning scene to start the task graph.

Note
All tasks with with ref count of 1 will be dispatched.
See Also
PxTask
virtual void PxTaskManager::stopSimulation ( )
pure virtual

Called by the owning scene at the end of a simulation step to synchronize the PxGpuDispatcher.

See Also
PxGpuDispatcher
virtual PxTaskID PxTaskManager::submitNamedTask ( PxTask task,
const char *  name,
PxTaskType::Enum  type = PxTaskType::TT_CPU 
)
pure virtual

Submit a task with a unique name.

Parameters
[in]taskThe task to be executed
[in]nameThe unique name of a task
[in]typeThe type of the task (default TT_CPU)
Returns
The ID of the task with that name, or TT_NOT_PRESENT if not found
virtual PxTaskID PxTaskManager::submitUnnamedTask ( PxTask task,
PxTaskType::Enum  type = PxTaskType::TT_CPU 
)
pure virtual

Submit an unnamed task.

Parameters
[in]taskThe task to be executed
[in]typeThe type of the task (default TT_CPU)
Returns
The ID of the task with that name, or TT_NOT_PRESENT if not found
virtual void PxTaskManager::taskCompleted ( PxTask task)
pure virtual

Called by the worker threads to inform the PxTaskManager that a task has completed processing.

Parameters
[in]taskThe task which has been completed

Referenced by PxTask::release().

Friends And Related Function Documentation

friend class PxBaseTask
friend
friend class PxGpuWorkerThread
friend
friend class PxLightCpuTask
friend
friend class PxSpuTask
friend
friend class PxTask
friend

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