pxtask::TaskManager Class Reference
The TaskManager interface. More...
#include <PxTaskManager.h>
Public Member Functions | |
virtual void | setCpuDispatcher (CpuDispatcher &ref)=0 |
Set the user-provided dispatcher object for CPU tasks. | |
virtual void | setGpuDispatcher (GpuDispatcher &ref)=0 |
Set the user-provided dispatcher object for GPU tasks. | |
virtual void | setSpuDispatcher (SpuDispatcher &ref)=0 |
Set the user-provided dispatcher object for SPU tasks. | |
virtual void | initializeProfiling (PxProfileZoneManager &ref)=0 |
Set profile zone used for task profiling. | |
virtual CpuDispatcher * | getCpuDispatcher () const =0 |
Get the user-provided dispatcher object for CPU tasks. | |
virtual GpuDispatcher * | getGpuDispatcher () const =0 |
Get the user-provided dispatcher object for GPU tasks. | |
virtual SpuDispatcher * | getSpuDispatcher () const =0 |
Get the user-provided dispatcher object for SPU tasks. | |
virtual void | resetDependencies ()=0 |
Reset any dependencies between Tasks. | |
virtual void | startSimulation ()=0 |
Called by the owning scene to start the task graph. | |
virtual void | stopSimulation ()=0 |
Called by the owning scene at the end of a simulation step to synchronize the GpuDispatcher. | |
virtual void | taskCompleted (Task &task)=0 |
Called by the worker threads to inform the TaskManager that a task has completed processing. | |
virtual TaskID | getNamedTask (const char *name)=0 |
Retrieve a task by name. | |
virtual TaskID | submitNamedTask (Task *task, const char *name, TaskType::Enum type=TaskType::TT_CPU)=0 |
Submit a task with a unique name. | |
virtual TaskID | submitUnnamedTask (Task &task, TaskType::Enum type=TaskType::TT_CPU)=0 |
Submit an unnamed task. | |
virtual Task * | getTaskFromID (TaskID id)=0 |
Retrive a task given a task ID. | |
virtual void | release ()=0 |
Release the TaskManager object, referneced dispatchers will not be released. | |
Static Public Member Functions | |
static TaskManager * | createTaskManager (CpuDispatcher *=0, GpuDispatcher *=0, SpuDispatcher *=0) |
Construct a new TaskManager instance with the given [optional] dispatchers. | |
Protected Member Functions | |
virtual | ~TaskManager () |
Friends | |
class | BaseTask |
class | Task |
class | LightCpuTask |
class | SpuTask |
class | GpuWorkerThread |
Detailed Description
The TaskManager interface.A TaskManager instance holds references to user-provided dispatcher objects, when tasks are submitted the TaskManager routes them to the appropriate dispatcher and handles task profiling if enabled. Users should not implement the TaskManager interface, the SDK creates it's own concrete TaskManager object per-scene which users can configure by passing dispatcher objects into the PxSceneDesc.
Constructor & Destructor Documentation
virtual pxtask::TaskManager::~TaskManager | ( | ) | [inline, protected, virtual] |
Member Function Documentation
static TaskManager* pxtask::TaskManager::createTaskManager | ( | CpuDispatcher * | = 0 , |
|
GpuDispatcher * | = 0 , |
|||
SpuDispatcher * | = 0 | |||
) | [static] |
Construct a new TaskManager instance with the given [optional] dispatchers.
virtual CpuDispatcher* pxtask::TaskManager::getCpuDispatcher | ( | ) | const [pure virtual] |
Get the user-provided dispatcher object for CPU tasks.
- Returns:
- The CPU dispatcher object.
- See also:
- CpuDispatcher
virtual GpuDispatcher* pxtask::TaskManager::getGpuDispatcher | ( | ) | const [pure virtual] |
Get the user-provided dispatcher object for GPU tasks.
- Returns:
- The GPU dispatcher object.
- See also:
- GpuDispatcher
virtual TaskID pxtask::TaskManager::getNamedTask | ( | const char * | name | ) | [pure virtual] |
Retrieve a task by name.
- Parameters:
-
[in] name The unique name of a task
- Returns:
- The ID of the task with that name, or TT_NOT_PRESENT if not found
virtual SpuDispatcher* pxtask::TaskManager::getSpuDispatcher | ( | ) | const [pure virtual] |
Get the user-provided dispatcher object for SPU tasks.
- Returns:
- The SPU dispatcher object.
- See also:
- SpuDispatcher
Retrive a task given a task ID.
- Parameters:
-
[in] id The 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 pxtask::TaskManager::initializeProfiling | ( | PxProfileZoneManager & | ref | ) | [pure virtual] |
Set profile zone used for task profiling.
- Parameters:
-
[in] ref The profile zone manager
- See also:
- PxProfileZoneManager
virtual void pxtask::TaskManager::release | ( | ) | [pure virtual] |
Release the TaskManager object, referneced dispatchers will not be released.
virtual void pxtask::TaskManager::resetDependencies | ( | ) | [pure virtual] |
Reset any dependencies between Tasks.
- Note:
- Will be called at the start of every frame before tasks are submited.
- See also:
- Task
virtual void pxtask::TaskManager::setCpuDispatcher | ( | CpuDispatcher & | ref | ) | [pure virtual] |
Set the user-provided dispatcher object for CPU tasks.
- Parameters:
-
[in] ref The dispatcher object.
- See also:
- CpuDispatcher
virtual void pxtask::TaskManager::setGpuDispatcher | ( | GpuDispatcher & | ref | ) | [pure virtual] |
Set the user-provided dispatcher object for GPU tasks.
- Parameters:
-
[in] ref The dispatcher object.
- See also:
- GpuDispatcher
virtual void pxtask::TaskManager::setSpuDispatcher | ( | SpuDispatcher & | ref | ) | [pure virtual] |
Set the user-provided dispatcher object for SPU tasks.
- Parameters:
-
[in] ref The dispatcher object.
- See also:
- SpuDispatcher
virtual void pxtask::TaskManager::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:
- Task
virtual void pxtask::TaskManager::stopSimulation | ( | ) | [pure virtual] |
Called by the owning scene at the end of a simulation step to synchronize the GpuDispatcher.
- See also:
- GpuDispatcher
virtual TaskID pxtask::TaskManager::submitNamedTask | ( | Task * | task, | |
const char * | name, | |||
TaskType::Enum | type = TaskType::TT_CPU | |||
) | [pure virtual] |
Submit a task with a unique name.
- Parameters:
-
[in] task The task to be executed [in] name The unique name of a task [in] type The type of the task (default TT_CPU)
- Returns:
- The ID of the task with that name, or TT_NOT_PRESENT if not found
virtual TaskID pxtask::TaskManager::submitUnnamedTask | ( | Task & | task, | |
TaskType::Enum | type = TaskType::TT_CPU | |||
) | [pure virtual] |
Submit an unnamed task.
- Parameters:
-
[in] task The task to be executed [in] type The 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 pxtask::TaskManager::taskCompleted | ( | Task & | task | ) | [pure virtual] |
Called by the worker threads to inform the TaskManager that a task has completed processing.
- Parameters:
-
[in] task The task which has been completed
Referenced by pxtask::Task::release().
Friends And Related Function Documentation
friend class BaseTask [friend] |
friend class GpuWorkerThread [friend] |
friend class LightCpuTask [friend] |
friend class SpuTask [friend] |
friend class Task [friend] |
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com