Bullet Collision Detection & Physics Library
|
Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication. More...
#include <Win32ThreadSupport.h>
Classes | |
struct | btSpuStatus |
placeholder, until libspe2 support is there More... | |
struct | Win32ThreadConstructionInfo |
Setup and initialize SPU/CELL/Libspe2. More... | |
Public Member Functions | |
Win32ThreadSupport (const Win32ThreadConstructionInfo &threadConstructionInfo) | |
The number of threads should be equal to the number of available cores. More... | |
virtual | ~Win32ThreadSupport () |
cleanup/shutdown Libspe2 More... | |
void | startThreads (const Win32ThreadConstructionInfo &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 bool | isTaskCompleted (unsigned int *puiArgument0, unsigned int *puiArgument1, int timeOutInMilliseconds) |
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 void * | getThreadLocalMemory (int taskId) |
virtual btBarrier * | createBarrier () |
virtual btCriticalSection * | createCriticalSection () |
virtual void | deleteBarrier (btBarrier *barrier) |
virtual void | deleteCriticalSection (btCriticalSection *criticalSection) |
Public Member Functions inherited from btThreadSupportInterface | |
virtual | ~btThreadSupportInterface () |
Private Attributes | |
btAlignedObjectArray< btSpuStatus > | m_activeSpuStatus |
btAlignedObjectArray< void * > | m_completeHandles |
int | m_maxNumTasks |
Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication.
Definition at line 34 of file Win32ThreadSupport.h.
Win32ThreadSupport::Win32ThreadSupport | ( | const Win32ThreadConstructionInfo & | threadConstructionInfo | ) |
The number of threads should be equal to the number of available cores.
Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication Setup and initialize SPU/CELL/Libspe2
Definition at line 33 of file Win32ThreadSupport.cpp.
|
virtual |
cleanup/shutdown Libspe2
Definition at line 40 of file Win32ThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 428 of file Win32ThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 436 of file Win32ThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 443 of file Win32ThreadSupport.cpp.
|
virtual |
Implements btThreadSupportInterface.
Definition at line 449 of file Win32ThreadSupport.cpp.
|
inlinevirtual |
Implements btThreadSupportInterface.
Definition at line 121 of file Win32ThreadSupport.h.
|
inlinevirtual |
Reimplemented from btThreadSupportInterface.
Definition at line 126 of file Win32ThreadSupport.h.
|
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'
need to find an active spu
Definition at line 180 of file Win32ThreadSupport.cpp.
|
virtual |
send messages to SPUs
gMidphaseSPU.sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (ppu_address_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
fire event to start new task
not implemented
Implements btThreadSupportInterface.
Definition at line 85 of file Win32ThreadSupport.cpp.
|
inlinevirtual |
tell the task scheduler to use no more than numTasks tasks
Implements btThreadSupportInterface.
Definition at line 116 of file Win32ThreadSupport.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 277 of file Win32ThreadSupport.cpp.
void Win32ThreadSupport::startThreads | ( | const Win32ThreadConstructionInfo & | threadInfo | ) |
Definition at line 227 of file Win32ThreadSupport.cpp.
|
virtual |
tell the task scheduler we are done with the SPU tasks
Implements btThreadSupportInterface.
Definition at line 283 of file Win32ThreadSupport.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'
need to find an active spu
Implements btThreadSupportInterface.
Definition at line 139 of file Win32ThreadSupport.cpp.
|
private |
Definition at line 60 of file Win32ThreadSupport.h.
|
private |
Definition at line 61 of file Win32ThreadSupport.h.
|
private |
Definition at line 63 of file Win32ThreadSupport.h.