18 #define USE_SAMPLE_PROCESS 1
19 #ifdef USE_SAMPLE_PROCESS
29 void SampleThreadFunc(
void* userPtr,
void* lsMemory)
32 printf(
"hello world\n");
36 void* SamplelsMemoryFunc()
62 :m_threadInterface(threadInterface),
63 m_maxNumOutstandingTasks(maxNumOutstandingTasks)
93 #ifdef DEBUG_SPU_TASK_SCHEDULING
94 printf(
"SpuSampleTaskProcess::initialize()\n");
95 #endif //DEBUG_SPU_TASK_SCHEDULING
111 #ifdef DEBUG_SPU_TASK_SCHEDULING
112 printf(
"SpuSampleTaskProcess::issueTask (m_currentTask= %d\)n",
m_currentTask);
113 #endif //DEBUG_SPU_TASK_SCHEDULING
140 unsigned int outputSize;
182 #ifdef DEBUG_SPU_TASK_SCHEDULING
183 printf(
"\nSpuCollisionTaskProcess::flush()\n");
184 #endif //DEBUG_SPU_TASK_SCHEDULING
192 unsigned int outputSize;
222 #endif //USE_SAMPLE_PROCESS
SpuSampleTaskProcess(btThreadSupportInterface *threadInterface, int maxNumOutstandingTasks)
int m_maxNumOutstandingTasks
void postProcess(int taskId, int outputSize)
Optional PPU-size post processing for each task.
virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1)=0
send messages to SPUs
void issueTask(void *sampleMainMemPtr, int sampleValue, int sampleCommand)
char SPU_SAMPLE_ELF_SYMBOL[]
virtual void startSPU()=0
non-blocking test if a task is completed.
btAlignedObjectArray< bool > m_taskBusy
void initialize()
call initialize in the beginning of the frame, before addCollisionPairToTask
void flush()
call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished...
class btThreadSupportInterface * m_threadInterface
virtual void stopSPU()=0
tell the task scheduler we are done with the SPU tasks
void resize(int newsize, const T &fillData=T())
btAlignedObjectArray< SpuSampleTaskDesc > m_spuSampleTaskDesc
virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)=0
check for messages from SPUs