comparison TaskManager/Gpu/GpuScheduler.cc @ 1845:ad05aeed3a98 draft

fix multiply / gpu
author kono
date Fri, 20 Dec 2013 22:25:38 +0900
parents 23e84bb83ed2
children a0cb52163e57
comparison
equal deleted inserted replaced
1844:23e84bb83ed2 1845:ad05aeed3a98
293 if (flag[cur].flip) { // use output buffer as input buffer 293 if (flag[cur].flip) { // use output buffer as input buffer
294 ListElement *input_buf = nextTask->inData(i); 294 ListElement *input_buf = nextTask->inData(i);
295 295
296 ret = clEnqueueWriteBuffer(command_queue, memout[cur].buf[i+1], CL_TRUE, 0, 296 ret = clEnqueueWriteBuffer(command_queue, memout[cur].buf[i+1], CL_TRUE, 0,
297 input_buf->size, input_buf->addr, 297 input_buf->size, input_buf->addr,
298 0, NULL, &memout[cur].event[i+1]); 298 0, NULL, &memout[cur].event[i0]);
299 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue; } 299 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue; }
300 ret = clSetKernelArg(kernel[cur], param+1, sizeof(memaddr), (void *)&memout[cur].buf[param]); 300 ret = clSetKernelArg(kernel[cur], param+1, sizeof(memaddr), (void *)&memout[cur].buf[i0]);
301 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue;} 301 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue;}
302 } 302 }
303 ret = clSetKernelArg(kernel[cur], param, sizeof(memaddr), (void *)&memout[cur].buf[param]); 303 ret = clSetKernelArg(kernel[cur], param, sizeof(memaddr), (void *)&memout[cur].buf[i0]);
304 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue;} 304 if (ret<0) { gpuTaskError(cur,tasklist,ret); continue;}
305 param++; 305 param++;
306 } 306 }
307 307
308 memout[cur].size = param - memin[cur].size; 308 memout[cur].size = param - memin[cur].size;