PxDefaultCpuDispatcher

Defined in include/extensions/PxDefaultCpuDispatcher.h

class PxDefaultCpuDispatcher : public PxCpuDispatcher

A default implementation for a CPU task dispatcher.

See also

PxDefaultCpuDispatcherCreate() PxCpuDispatcher

Public Functions

virtual void release() = 0

Deletes the dispatcher.

Do not keep a reference to the deleted instance.

See also

PxDefaultCpuDispatcherCreate()

virtual void setRunProfiled(bool runProfiled) = 0

Enables profiling at task level.

Note

By default enabled only in profiling builds.

Parameters

runProfiled[in] True if tasks should be profiled.

virtual bool getRunProfiled() const = 0

Checks if profiling is enabled at task level.

Returns

True if tasks should be profiled.

virtual void submitTask(PxBaseTask &task) = 0

Called by the TaskManager when a task is to be queued for execution.

Upon receiving a task, the dispatcher should schedule the task to run. After the task has been run, it should call the release() method and discard its pointer.

See also

PxBaseTask

Parameters

task[in] The task to be run.

virtual uint32_t getWorkerCount() const = 0

Returns the number of available worker threads for this dispatcher.

The SDK will use this count to control how many tasks are submitted. By matching the number of tasks with the number of execution units task overhead can be reduced.