Bullet Collision Detection & Physics Library
|
SpuCollisionTaskProcess handles SPU processing of collision pairs. More...
#include <SpuCollisionTaskProcess.h>
Public Member Functions | |
SpuCollisionTaskProcess (btThreadSupportInterface *threadInterface, unsigned int maxNumOutstandingTasks) | |
~SpuCollisionTaskProcess () | |
void | initialize2 (bool useEpa=false) |
call initialize in the beginning of the frame, before addCollisionPairToTask More... | |
void | addWorkToTask (void *pairArrayPtr, int startIndex, int endIndex) |
batch up additional work to a current task for SPU processing. When batch is full, it issues the task. More... | |
void | flush2 () |
call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished More... | |
void | setNumTasks (int maxNumTasks) |
set the maximum number of SPU tasks allocated More... | |
int | getNumTasks () const |
Private Member Functions | |
void | issueTask2 () |
Private Attributes | |
unsigned char * | m_workUnitTaskBuffers |
btAlignedObjectArray< bool > | m_taskBusy |
btAlignedObjectArray < SpuGatherAndProcessPairsTaskDesc > | m_spuGatherTaskDesc |
class btThreadSupportInterface * | m_threadInterface |
unsigned int | m_maxNumOutstandingTasks |
unsigned int | m_numBusyTasks |
unsigned int | m_currentTask |
unsigned int | m_currentPage |
unsigned int | m_currentPageEntry |
bool | m_useEpa |
bool | m_initialized |
SpuCollisionTaskProcess handles SPU processing of collision pairs.
Maintains a set of task buffers. When the task is full, the task is issued for SPUs to process. Contact output goes into btPersistentManifold associated with each task. 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 93 of file SpuCollisionTaskProcess.h.
SpuCollisionTaskProcess::SpuCollisionTaskProcess | ( | btThreadSupportInterface * | threadInterface, |
unsigned int | maxNumOutstandingTasks | ||
) |
Definition at line 53 of file SpuCollisionTaskProcess.cpp.
SpuCollisionTaskProcess::~SpuCollisionTaskProcess | ( | ) |
Definition at line 75 of file SpuCollisionTaskProcess.cpp.
void SpuCollisionTaskProcess::addWorkToTask | ( | void * | pairArrayPtr, |
int | startIndex, | ||
int | endIndex | ||
) |
batch up additional work to a current task for SPU processing. When batch is full, it issues the task.
Definition at line 182 of file SpuCollisionTaskProcess.cpp.
void SpuCollisionTaskProcess::flush2 | ( | ) |
call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished
Definition at line 269 of file SpuCollisionTaskProcess.cpp.
|
inline |
Definition at line 139 of file SpuCollisionTaskProcess.h.
void SpuCollisionTaskProcess::initialize2 | ( | bool | useEpa = false | ) |
call initialize in the beginning of the frame, before addCollisionPairToTask
Definition at line 92 of file SpuCollisionTaskProcess.cpp.
|
private |
Definition at line 116 of file SpuCollisionTaskProcess.cpp.
void SpuCollisionTaskProcess::setNumTasks | ( | int | maxNumTasks | ) |
set the maximum number of SPU tasks allocated
re-allocate task memory buffers
Definition at line 27 of file SpuCollisionTaskProcess.cpp.
|
private |
Definition at line 111 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 112 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 110 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 117 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 105 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 107 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 101 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 100 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 103 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 114 of file SpuCollisionTaskProcess.h.
|
private |
Definition at line 96 of file SpuCollisionTaskProcess.h.