Mercurial > hg > Game > Cerium
view example/word_count/task_init.cc @ 2044:66aa91f6f4df draft
merge
author | Shin,ichi Uehara |
---|---|
date | Wed, 25 Mar 2015 19:13:56 +0900 |
parents | 8fbe022126e1 |
children | 476fc75a5e17 |
line wrap: on
line source
#include "Func.h" #include "Scheduler.h" #ifdef __CERIUM_GPU__ #include "GpuScheduler.h" #endif #ifdef __CERIUM_CUDA__ #include "CudaScheduler.h" #endif /* 必ずこの位置に書いて */ SchedExternTask(READ_TASK); SchedExternTask(BREAD_RUN_TASK_BLOCKS); SchedExternTask(Exec); SchedExternTask(Exec_Data_Parallel); SchedExternTask(Print); SchedExternTask(RUN_TASK_BLOCKS); /** * この関数は ../spe/spe-main と違って * 自分で呼び出せばいい関数なので * 好きな関数名でおk (SchedRegisterTask は必須) */ void task_init(void) { #ifdef __CERIUM_GPU__ GpuSchedRegister(TASK_EXEC, "gpu/Exec.cl", "wordcount"); GpuSchedRegister(TASK_EXEC_DATA_PARALLEL, "gpu/Exec_Data_Parallel.cl","wordcount_parallel"); #endif #ifdef __CERIUM_CUDA__ CudaSchedRegister(TASK_EXEC, "cuda/Exec.ptx", "wordcount"); CudaSchedRegister(TASK_EXEC_DATA_PARALLEL, "cuda/Exec_Data_Parallel.ptx","wordcount_parallel"); #endif SchedRegisterTask(TASK_EXEC, Exec); SchedRegisterTask(TASK_EXEC_DATA_PARALLEL, Exec_Data_Parallel); SchedRegister(READ_TASK); SchedRegister(BREAD_RUN_TASK_BLOCKS); SchedRegisterTask(TASK_PRINT, Print); SchedRegister(RUN_TASK_BLOCKS); }