17 #define __BT_SKIP_UINT64_H 1
19 #define USE_SAMPLE_PROCESS 1
20 #ifdef USE_SAMPLE_PROCESS
30 void SampleThreadFunc(
void* userPtr,
void* lsMemory)
33 printf(
"hello world\n");
37 void* SamplelsMemoryFunc()
60 :m_threadInterface(threadInterface),
61 m_maxNumOutstandingTasks(maxNumOutstandingTasks)
93 #ifdef DEBUG_SPU_TASK_SCHEDULING
94 printf(
"MiniCLTaskScheduler::initialize()\n");
95 #endif //DEBUG_SPU_TASK_SCHEDULING
111 #ifdef DEBUG_SPU_TASK_SCHEDULING
112 printf(
"MiniCLTaskScheduler::issueTask (m_currentTask= %d\)n",
m_currentTask);
113 #endif //DEBUG_SPU_TASK_SCHEDULING
128 for (
unsigned int i=0; i < kernel->
m_numArgs; i++)
147 unsigned int outputSize;
189 #ifdef DEBUG_SPU_TASK_SCHEDULING
190 printf(
"\nSpuCollisionTaskProcess::flush()\n");
191 #endif //DEBUG_SPU_TASK_SCHEDULING
199 unsigned int outputSize;
238 typedef void (*
MiniCLKernelLauncher10)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
239 typedef void (*
MiniCLKernelLauncher11)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
240 typedef void (*
MiniCLKernelLauncher12)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
241 typedef void (*
MiniCLKernelLauncher13)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
242 typedef void (*
MiniCLKernelLauncher14)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
243 typedef void (*
MiniCLKernelLauncher15)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
244 typedef void (*
MiniCLKernelLauncher16)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*, int);
490 if(!strcmp(pName, spKernelDesc[i].pName))
492 btAssert(spKernelDesc[i].pCode == pCode);
507 if(!strcmp(
m_name, spKernelDesc[i].pName))
519 #endif //USE_SAMPLE_PROCESS
int m_argSizes[MINI_CL_MAX_ARG]
char m_name[MINI_CL_MAX_KERNEL_NAME]
int m_maxNumOutstandingTasks
static void kernelLauncher12(MiniCLTaskDesc *taskDesc, int guid)
static void kernelLauncher8(MiniCLTaskDesc *taskDesc, int guid)
static void kernelLauncher3(MiniCLTaskDesc *taskDesc, int guid)
static void kernelLauncher1(MiniCLTaskDesc *taskDesc, int guid)
void(* MiniCLKernelLauncher15)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher13)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher4)(void *, void *, void *, void *, int)
class btThreadSupportInterface * m_threadInterface
virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1)=0
send messages to SPUs
void(* MiniCLKernelLauncher7)(void *, void *, void *, void *, void *, void *, void *, int)
static int sNumKernelDesc
static kernelLauncherCB spLauncherList[MINI_CL_MAX_ARG+1]
void(* MiniCLKernelLauncher14)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher16)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
int m_argSizes[MINI_CL_MAX_ARG]
void(* MiniCLKernelLauncher0)(int)
static void kernelLauncher6(MiniCLTaskDesc *taskDesc, int guid)
static void kernelLauncher10(MiniCLTaskDesc *taskDesc, int guid)
virtual void startSPU()=0
non-blocking test if a task is completed.
static void kernelLauncher14(MiniCLTaskDesc *taskDesc, int guid)
void(* MiniCLKernelLauncher6)(void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher5)(void *, void *, void *, void *, void *, int)
static void kernelLauncher16(MiniCLTaskDesc *taskDesc, int guid)
btAlignedObjectArray< bool > m_taskBusy
static void kernelLauncher9(MiniCLTaskDesc *taskDesc, int guid)
void * m_argData[MINI_CL_MAX_ARG]
void registerKernel(MiniCLKernel *kernel)
void postProcess(int taskId, int outputSize)
Optional PPU-size post processing for each task.
static void kernelLauncher0(MiniCLTaskDesc *taskDesc, int guid)
void(* MiniCLKernelLauncher12)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher2)(void *, void *, int)
void(* MiniCLKernelLauncher10)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
void(* MiniCLKernelLauncher9)(void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
static void kernelLauncher13(MiniCLTaskDesc *taskDesc, int guid)
virtual void stopSPU()=0
tell the task scheduler we are done with the SPU tasks
static void kernelLauncher2(MiniCLTaskDesc *taskDesc, int guid)
void issueTask(int firstWorkUnit, int lastWorkUnit, MiniCLKernel *kernel)
void(* MiniCLKernelLauncher3)(void *, void *, void *, int)
void(* MiniCLKernelLauncher1)(void *, int)
static void kernelLauncher7(MiniCLTaskDesc *taskDesc, int guid)
static MiniCLKernelDescEntry spKernelDesc[256]
void resize(int newsize, const T &fillData=T())
btAlignedObjectArray< MiniCLTaskDesc > m_spuSampleTaskDesc
static void kernelLauncher11(MiniCLTaskDesc *taskDesc, int guid)
MiniCLTaskScheduler * m_scheduler
void flush()
call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished...
static void kernelLauncher15(MiniCLTaskDesc *taskDesc, int guid)
char SPU_SAMPLE_ELF_SYMBOL[]
void(* MiniCLKernelLauncher8)(void *, void *, void *, void *, void *, void *, void *, void *, int)
MiniCLKernelDesc(void *pCode, const char *pName)
virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)=0
check for messages from SPUs
void(* kernelLauncherCB)(MiniCLTaskDesc *taskDesc, int guid)
void * m_argData[MINI_CL_MAX_ARG]
static void kernelLauncher5(MiniCLTaskDesc *taskDesc, int guid)
static void kernelLauncher4(MiniCLTaskDesc *taskDesc, int guid)
void initialize()
call initialize in the beginning of the frame, before addCollisionPairToTask
MiniCLKernel * registerSelf()
void(* MiniCLKernelLauncher11)(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, int)
btAlignedObjectArray< const MiniCLKernel * > m_kernels
MiniCLTaskScheduler(btThreadSupportInterface *threadInterface, int maxNumOutstandingTasks)
kernelLauncherCB m_launcher