#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 | |
| void | startThreads (ThreadConstructionInfo &threadInfo) |
| virtual void | sendRequest (uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1) |
| send messages to SPUs | |
| virtual void | waitForResponse (unsigned int *puiArgument0, unsigned int *puiArgument1) |
| check for messages from SPUs | |
| 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) | |
| virtual void | stopSPU () |
| tell the task scheduler we are done with the SPU tasks | |
| virtual void | setNumTasks (int numTasks) |
| tell the task scheduler to use no more than numTasks tasks | |
| virtual int | getNumTasks () const |
Private Attributes | |
| btAlignedObjectArray< btSpuStatus > | m_activeSpuStatus |
Definition at line 36 of file PosixThreadSupport.h.
| typedef enum PosixThreadSupport::sStatus PosixThreadSupport::Status |
Definition at line 39 of file PosixThreadSupport.h.
| PosixThreadSupport::PosixThreadSupport | ( | ThreadConstructionInfo & | threadConstructionInfo | ) |
Definition at line 35 of file PosixThreadSupport.cpp.
| PosixThreadSupport::~PosixThreadSupport | ( | ) | [virtual] |
cleanup/shutdown Libspe2
Definition at line 41 of file PosixThreadSupport.cpp.
| virtual int PosixThreadSupport::getNumTasks | ( | ) | const [inline, virtual] |
Implements btThreadSupportInterface.
Definition at line 116 of file PosixThreadSupport.h.
| void PosixThreadSupport::sendRequest | ( | uint32_t | uiCommand, | |
| ppu_address_t | uiArgument0, | |||
| uint32_t | uiArgument1 | |||
| ) | [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 123 of file PosixThreadSupport.cpp.
| virtual void PosixThreadSupport::setNumTasks | ( | int | numTasks | ) | [inline, virtual] |
tell the task scheduler to use no more than numTasks tasks
Implements btThreadSupportInterface.
Definition at line 114 of file PosixThreadSupport.h.
| void PosixThreadSupport::startSPU | ( | ) | [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 228 of file PosixThreadSupport.cpp.
| void PosixThreadSupport::startThreads | ( | ThreadConstructionInfo & | threadInfo | ) |
Definition at line 196 of file PosixThreadSupport.cpp.
| void PosixThreadSupport::stopSPU | ( | ) | [virtual] |
tell the task scheduler we are done with the SPU tasks
Implements btThreadSupportInterface.
Definition at line 234 of file PosixThreadSupport.cpp.
| void PosixThreadSupport::waitForResponse | ( | unsigned int * | puiArgument0, | |
| unsigned int * | puiArgument1 | |||
| ) | [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 160 of file PosixThreadSupport.cpp.
Definition at line 63 of file PosixThreadSupport.h.
1.6.1