Bullet Collision Detection & Physics Library
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MiniCLTaskScheduler Class Reference

MiniCLTaskScheduler handles SPU processing of collision pairs. More...

#include <MiniCLTaskScheduler.h>

Collaboration diagram for MiniCLTaskScheduler:
Collaboration graph
[legend]

Public Member Functions

 MiniCLTaskScheduler (btThreadSupportInterface *threadInterface, int maxNumOutstandingTasks)
 
 ~MiniCLTaskScheduler ()
 
void initialize ()
 call initialize in the beginning of the frame, before addCollisionPairToTask More...
 
void issueTask (int firstWorkUnit, int lastWorkUnit, MiniCLKernel *kernel)
 
void flush ()
 call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished More...
 
class btThreadSupportInterfacegetThreadSupportInterface ()
 
int findProgramCommandIdByName (const char *programName) const
 
int getMaxNumOutstandingTasks () const
 
void registerKernel (MiniCLKernel *kernel)
 

Private Member Functions

void postProcess (int taskId, int outputSize)
 Optional PPU-size post processing for each task. More...
 

Private Attributes

btAlignedObjectArray< bool > m_taskBusy
 
btAlignedObjectArray
< MiniCLTaskDesc
m_spuSampleTaskDesc
 
btAlignedObjectArray< const
MiniCLKernel * > 
m_kernels
 
int m_numBusyTasks
 
int m_currentTask
 
bool m_initialized
 
class btThreadSupportInterfacem_threadInterface
 
int m_maxNumOutstandingTasks
 

Detailed Description

MiniCLTaskScheduler handles SPU processing of collision pairs.

When PPU issues a task, it will look for completed task buffers PPU will do postprocessing, dependent on workunit output (not likely)

Definition at line 41 of file MiniCLTaskScheduler.h.

Constructor & Destructor Documentation

MiniCLTaskScheduler::MiniCLTaskScheduler ( btThreadSupportInterface threadInterface,
int  maxNumOutstandingTasks 
)

Definition at line 59 of file MiniCLTaskScheduler.cpp.

MiniCLTaskScheduler::~MiniCLTaskScheduler ( )

Definition at line 83 of file MiniCLTaskScheduler.cpp.

Member Function Documentation

int MiniCLTaskScheduler::findProgramCommandIdByName ( const char *  programName) const
void MiniCLTaskScheduler::flush ( )

call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished

Definition at line 187 of file MiniCLTaskScheduler.cpp.

int MiniCLTaskScheduler::getMaxNumOutstandingTasks ( ) const
inline

Definition at line 86 of file MiniCLTaskScheduler.h.

class btThreadSupportInterface* MiniCLTaskScheduler::getThreadSupportInterface ( )
inline

Definition at line 79 of file MiniCLTaskScheduler.h.

void MiniCLTaskScheduler::initialize ( )

call initialize in the beginning of the frame, before addCollisionPairToTask

Definition at line 91 of file MiniCLTaskScheduler.cpp.

void MiniCLTaskScheduler::issueTask ( int  firstWorkUnit,
int  lastWorkUnit,
MiniCLKernel kernel 
)

Definition at line 108 of file MiniCLTaskScheduler.cpp.

void MiniCLTaskScheduler::postProcess ( int  taskId,
int  outputSize 
)
private

Optional PPU-size post processing for each task.

Definition at line 181 of file MiniCLTaskScheduler.cpp.

void MiniCLTaskScheduler::registerKernel ( MiniCLKernel kernel)
inline

Definition at line 91 of file MiniCLTaskScheduler.h.

Member Data Documentation

int MiniCLTaskScheduler::m_currentTask
private

Definition at line 54 of file MiniCLTaskScheduler.h.

bool MiniCLTaskScheduler::m_initialized
private

Definition at line 56 of file MiniCLTaskScheduler.h.

btAlignedObjectArray<const MiniCLKernel*> MiniCLTaskScheduler::m_kernels
private

Definition at line 48 of file MiniCLTaskScheduler.h.

int MiniCLTaskScheduler::m_maxNumOutstandingTasks
private

Definition at line 62 of file MiniCLTaskScheduler.h.

int MiniCLTaskScheduler::m_numBusyTasks
private

Definition at line 51 of file MiniCLTaskScheduler.h.

btAlignedObjectArray<MiniCLTaskDesc> MiniCLTaskScheduler::m_spuSampleTaskDesc
private

Definition at line 45 of file MiniCLTaskScheduler.h.

btAlignedObjectArray<bool> MiniCLTaskScheduler::m_taskBusy
private

Definition at line 44 of file MiniCLTaskScheduler.h.

class btThreadSupportInterface* MiniCLTaskScheduler::m_threadInterface
private

Definition at line 60 of file MiniCLTaskScheduler.h.


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