# HG changeset patch # User Yuhi TOMARI # Date 1345538061 -32400 # Node ID 8b0911f58b7064a2bc44677982876cd66e839355 # Parent 05505bd5c1835fb41524b9d61e60ba0e78a606af fix kernel param size diff -r 05505bd5c183 -r 8b0911f58b70 TaskManager/Gpu/GpuScheduler.cc --- a/TaskManager/Gpu/GpuScheduler.cc Thu Aug 16 23:35:25 2012 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Tue Aug 21 17:34:21 2012 +0900 @@ -69,13 +69,13 @@ int param = 0; cl_mem memobj = clCreateBuffer(context, CL_MEM_READ_WRITE, - sizeof(nextTask->param(param))*nextTask->param_count, NULL, NULL); + sizeof(memaddr)*nextTask->param_count, NULL, NULL); err |= clEnqueueWriteBuffer(command_queue, memobj, CL_TRUE, 0, - sizeof(nextTask->param(param))*nextTask->param_count, - nextTask->param(param), 0, NULL, NULL); - err |= clSetKernelArg(kernel, param, sizeof(memaddr), memobj); + sizeof(memaddr)*nextTask->param_count, + nextTask->param(0), 0, NULL, NULL); + err |= clSetKernelArg(kernel, param, sizeof(memaddr), memobj); - + for(int i=0;iinData_count;i++) { cl_mem memobj = clCreateBuffer(context, CL_MEM_READ_WRITE, nextTask->inData(i)->size, NULL, NULL); err |= clEnqueueWriteBuffer(command_queue, memobj, CL_TRUE, 0, diff -r 05505bd5c183 -r 8b0911f58b70 TaskManager/test/GpuRunTest/twice.cl --- a/TaskManager/test/GpuRunTest/twice.cl Thu Aug 16 23:35:25 2012 +0900 +++ b/TaskManager/test/GpuRunTest/twice.cl Tue Aug 21 17:34:21 2012 +0900 @@ -3,7 +3,7 @@ __global int *input_data, __global int *output_data) { - long count = (long)data_count; + long count = (long)data_count[0]; for (int i = 0; i