Mercurial > hg > Game > Cerium
changeset 2049:674ac7887dae draft
recover GPU task
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jan 2016 14:54:25 +0900 |
parents | 6796d85f3d6b |
children | 26dd777ba95d |
files | example/word_count/Func.h example/word_count/main.cc example/word_count/task_init.cc |
diffstat | 3 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/example/word_count/Func.h Thu Jan 28 00:05:49 2016 +0900 +++ b/example/word_count/Func.h Thu Jan 28 14:54:25 2016 +0900 @@ -3,6 +3,7 @@ BREAD_RUN_TASK_BLOCKS, READ_TASK, TASK_EXEC, + TASK_EXEC_DATA_PARALLEL, RUN_TASK_BLOCKS, TASK_PRINT, };
--- a/example/word_count/main.cc Thu Jan 28 00:05:49 2016 +0900 +++ b/example/word_count/main.cc Thu Jan 28 14:54:25 2016 +0900 @@ -177,7 +177,7 @@ array_task_num -= 1; w->size += size; } - h_exec = manager->create_task(TASK_EXEC); + h_exec = manager->create_task(TASK_EXEC_DATA_PARALLEL); h_exec->flip(); h_exec->set_inData(0,w->file_mmap,w->file_size); h_exec->set_inData(1,w->o_data,w->out_size_);
--- a/example/word_count/task_init.cc Thu Jan 28 00:05:49 2016 +0900 +++ b/example/word_count/task_init.cc Thu Jan 28 14:54:25 2016 +0900 @@ -11,6 +11,7 @@ SchedExternTask(READ_TASK); SchedExternTask(BREAD_RUN_TASK_BLOCKS); SchedExternTask(Exec); +SchedExternTask(Exec_Data_Parallel); SchedExternTask(Print); SchedExternTask(RUN_TASK_BLOCKS); @@ -24,12 +25,15 @@ { #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); SchedRegister(READ_TASK); SchedRegister(BREAD_RUN_TASK_BLOCKS);