RavEngine
Loading...
Searching...
No Matches
physx::Cm::FanoutTask Class Reference

A task that maintains a list of dependent tasks. More...

#include <CmTask.h>

Inheritance diagram for physx::Cm::FanoutTask:
[legend]
Collaboration diagram for physx::Cm::FanoutTask:
[legend]

Public Member Functions

 FanoutTask (PxU64 contextID, const char *name)
 
virtual void runInternal ()
 
virtual const char * getName () const
 Return a user-provided task name for profiling purposes.
 
virtual void removeReference ()
 
virtual void addReference ()
 Increases reference count.
 
PX_INLINE PxI32 getReference () const
 Return the ref-count for this task.
 
PX_INLINE void setTaskManager (physx::PxTaskManager &tm)
 
PX_INLINE void addDependent (physx::PxBaseTask &dependent)
 
virtual void release ()
 
- Public Member Functions inherited from physx::Cm::BaseTask
virtual void run ()
 The user-implemented run method where the task's work should be performed.
 
- Public Member Functions inherited from physx::PxBaseTask
PX_FORCE_INLINE PxTaskManager * getTaskManager () const
 Return PxTaskManager to which this task was submitted.
 
PX_FORCE_INLINE void setContextId (PxU64 id)
 
PX_FORCE_INLINE PxU64 getContextId () const
 

Protected Attributes

volatile PxI32 mRefCount
 
const char * mName
 
PxInlineArray< physx::PxBaseTask *, 4 > mDependents
 
PxInlineArray< physx::PxBaseTask *, 4 > mReferencesToRemove
 
bool mNotifySubmission
 
PxMutex mMutex
 
- Protected Attributes inherited from physx::PxBaseTask
PxU64 mContextID
 Context ID for profiler interface.
 
PxTaskManager * mTm
 Owning PxTaskManager instance.
 

Detailed Description

A task that maintains a list of dependent tasks.

This task maintains a list of dependent tasks that have their reference counts reduced on completion of the task.

The refcount is incremented every time a dependent task is added.

Member Function Documentation

◆ addDependent()

PX_INLINE void physx::Cm::FanoutTask::addDependent ( physx::PxBaseTask &  dependent)
inline

Adds a dependent task. It also sets the task manager querying it from the dependent task.
The refcount is incremented every time a dependent task is added.

◆ addReference()

virtual void physx::Cm::FanoutTask::addReference ( )
inlinevirtual

Increases reference count.

Implements physx::PxBaseTask.

◆ getName()

virtual const char * physx::Cm::FanoutTask::getName ( ) const
inlinevirtual

Return a user-provided task name for profiling purposes.

It does not have to be unique, but unique names are helpful.

Returns
The name of this task

Implements physx::PxBaseTask.

◆ getReference()

PX_INLINE PxI32 physx::Cm::FanoutTask::getReference ( ) const
inlinevirtual

Return the ref-count for this task.

Implements physx::PxBaseTask.

◆ release()

virtual void physx::Cm::FanoutTask::release ( )
inlinevirtual

Reduces reference counts of the continuation task and the dependent tasks, also clearing the copy of continuation and dependents task list.

Implements physx::PxBaseTask.

◆ removeReference()

virtual void physx::Cm::FanoutTask::removeReference ( )
inlinevirtual

Swap mDependents with mReferencesToRemove when refcount goes to 0.

Implements physx::PxBaseTask.

◆ runInternal()

virtual void physx::Cm::FanoutTask::runInternal ( )
inlinevirtual

Implements physx::Cm::BaseTask.

◆ setTaskManager()

PX_INLINE void physx::Cm::FanoutTask::setTaskManager ( physx::PxTaskManager &  tm)
inline

Sets the task manager. Doesn't increase the reference count.


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