Bullet Collision Detection & Physics Library
|
#include <PosixThreadSupport.h>
Classes | |
struct | btSpuStatus |
struct | ThreadConstructionInfo |
Setup and initialize SPU/CELL/Libspe2. More... | |
Public Types | |
enum | sStatus { STATUS_BUSY, STATUS_READY, STATUS_FINISHED } |
typedef enum PosixThreadSupport::sStatus | Status |
Public Member Functions | |
PosixThreadSupport (ThreadConstructionInfo &threadConstructionInfo) | |
virtual | ~PosixThreadSupport () |
cleanup/shutdown Libspe2 More... | |
void | startThreads (ThreadConstructionInfo &threadInfo) |
virtual void | sendRequest (uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1) |
send messages to SPUs More... | |
virtual void | waitForResponse (unsigned int *puiArgument0, unsigned int *puiArgument1) |
check for messages from SPUs More... | |
virtual void | startSPU () |
start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded) More... | |
virtual void | stopSPU () |
tell the task scheduler we are done with the SPU tasks More... | |
virtual void | setNumTasks (int numTasks) |
tell the task scheduler to use no more than numTasks tasks More... | |
virtual int | getNumTasks () const |
virtual btBarrier * | createBarrier () |
virtual btCriticalSection * | createCriticalSection () |
virtual void | deleteBarrier (btBarrier *barrier) |
virtual void | deleteCriticalSection (btCriticalSection *criticalSection) |
virtual void * | getThreadLocalMemory (int taskId) |
Public Member Functions inherited from btThreadSupportInterface | |
virtual | ~btThreadSupportInterface () |
Private Attributes | |
btAlignedObjectArray< btSpuStatus > | m_activeSpuStatus |
Definition at line 42 of file PosixThreadSupport.h.
typedef enum PosixThreadSupport::sStatus PosixThreadSupport::Status |
Enumerator | |
---|---|
STATUS_BUSY | |
STATUS_READY | |
STATUS_FINISHED |
Definition at line 45 of file PosixThreadSupport.h.
PosixThreadSupport::PosixThreadSupport | ( | ThreadConstructionInfo & | threadConstructionInfo | ) |
Definition at line 35 of file PosixThreadSupport.cpp.
|
virtual |
cleanup/shutdown Libspe2
Definition at line 41 of file PosixThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 387 of file PosixThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 394 of file PosixThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 399 of file PosixThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 404 of file PosixThreadSupport.cpp.
|
inlinevirtual |
Implements btThreadSupportInterface.
Definition at line 122 of file PosixThreadSupport.h.
|
inlinevirtual |
Reimplemented from btThreadSupportInterface.
Definition at line 136 of file PosixThreadSupport.h.
|
virtual |
send messages to SPUs
gMidphaseSPU.sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (uint32_t) &taskDesc);
we should spawn an SPU task here, and in 'waitForResponse' it should wait for response of the (one of) the first tasks that finished
not implemented
Implements btThreadSupportInterface.
Definition at line 124 of file PosixThreadSupport.cpp.
|
inlinevirtual |
tell the task scheduler to use no more than numTasks tasks
Implements btThreadSupportInterface.
Definition at line 120 of file PosixThreadSupport.h.
|
virtual |
start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
Implements btThreadSupportInterface.
Definition at line 230 of file PosixThreadSupport.cpp.
void PosixThreadSupport::startThreads | ( | ThreadConstructionInfo & | threadInfo | ) |
Definition at line 197 of file PosixThreadSupport.cpp.
|
virtual |
tell the task scheduler we are done with the SPU tasks
Implements btThreadSupportInterface.
Definition at line 236 of file PosixThreadSupport.cpp.
|
virtual |
check for messages from SPUs
We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response
A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'
Implements btThreadSupportInterface.
Definition at line 161 of file PosixThreadSupport.cpp.
|
private |
Definition at line 69 of file PosixThreadSupport.h.