Browse Source

src/drivers/opencl/driver_opencl.c: using CL_FALSE blocks the caller.
CL_TRUE works fine, so as we are only copying 1 char, it is not really
a problem to avoid a temporary copy of the buffer.

Thanks to Cyril Roeland for investigating the problem and finding
its solution.

Nathalie Furmento 13 years ago
parent
commit
6609c0acfd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/drivers/opencl/driver_opencl.c

+ 1 - 1
src/drivers/opencl/driver_opencl.c

@@ -201,7 +201,7 @@ cl_int starpu_opencl_allocate_memory(cl_mem *mem, size_t size, cl_mem_flags flag
 	 * want to know this __now__, so we just perform a dummy copy.
 	 */
 	char dummy = 0;
-	err = clEnqueueWriteBuffer(queues[worker->devid], memory, CL_FALSE,
+	err = clEnqueueWriteBuffer(queues[worker->devid], memory, CL_TRUE,
 				   0, sizeof(dummy), &dummy,
 				   0, NULL, NULL);
 	clFinish(queues[worker->devid]);