Mercurial > hg > Game > Cerium
changeset 1971:fdb3ed0bc51d draft
fix
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Feb 2014 16:21:59 +0900 |
parents | e211424ac950 |
children | 6fa9e5d55774 |
files | TaskManager/Gpu/GpuScheduler.cc TaskManager/Gpu/GpuScheduler.h example/fft/Makefile example/fft/main.cc |
diffstat | 4 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Gpu/GpuScheduler.cc Tue Feb 25 13:43:45 2014 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Tue Feb 25 16:21:59 2014 +0900 @@ -253,7 +253,7 @@ if (input_buf->size==0) break; createBuffer(&memin[cur], param, context, mem_flag, input_buf->size, &ret); if (ret<0) { gpuTaskError(cur,tasklist,ret); continue; } - ret = clEnqueueWriteBuffer(command_queue[cur], memin[cur].buf[param], CL_TRUE, 0, + ret = clEnqueueWriteBuffer(command_queue[cur], memin[cur].buf[param], CL_FALSE, 0, input_buf->size, input_buf->addr, 0, NULL, NULL); if (ret<0) { gpuTaskError(cur,tasklist,ret); continue; }
--- a/TaskManager/Gpu/GpuScheduler.h Tue Feb 25 13:43:45 2014 +0900 +++ b/TaskManager/Gpu/GpuScheduler.h Tue Feb 25 16:21:59 2014 +0900 @@ -15,7 +15,7 @@ extern TaskObject gpu_task_list[MAX_TASK_OBJECT]; -#define STAGE 8 +#define STAGE 1 class GpuScheduler : public MainScheduler { public:
--- a/example/fft/Makefile Tue Feb 25 13:43:45 2014 +0900 +++ b/example/fft/Makefile Tue Feb 25 16:21:59 2014 +0900 @@ -19,6 +19,10 @@ @echo "Make for OpenCL" @$(MAKE) -f Makefile.gpu +cuda: FORCE + @echo "Make for CUDA" + @$(MAKE) -f Makefile.cuda + test: gpu ./fft -file lena512.pgm -gpu -g @@ -28,3 +32,4 @@ @$(MAKE) -f Makefile.macosx clean @$(MAKE) -f Makefile.linux clean @$(MAKE) -f Makefile.gpu clean + @$(MAKE) -f Makefile.cuda clean
--- a/example/fft/main.cc Tue Feb 25 13:43:45 2014 +0900 +++ b/example/fft/main.cc Tue Feb 25 16:21:59 2014 +0900 @@ -240,7 +240,7 @@ first_trns->set_inData(0,rm,length_r*sizeof(cl_float2)); first_trns->set_outData(0,xm,length_r*sizeof(cl_float2)); first_trns->set_param(0,n); - first_trns->set_cpu(SPE_ANY); + first_trns->set_cpu(spe_cpu); first_trns->wait_for(waitTask); first_trns->iterate(gws[0],gws[1]); @@ -271,7 +271,7 @@ second_trns->set_inData(0,xm,length_r*sizeof(cl_float2)); second_trns->set_outData(0,rm,length_r*sizeof(cl_float2)); second_trns->set_param(0,n); - second_trns->set_cpu(SPE_ANY); + second_trns->set_cpu(spe_cpu); second_trns->wait_for(waitTask); second_trns->iterate(gws[0],gws[1]);