Can you shrink your code to the simplest case where the error still pops up? This will help us and especially you to find the source of the error much quicker.
-13 is the value of the error CL_MISALIGNED_SUB_BUFFER_OFFSET.
As explained in the specification of clCreateSubBuffer(), the origin of the sub-buffer must be aligned to the CL_DEVICE_MEM_BASE_ADDR_ALIGN value.
10000*sizeof(float) is probably not a multiple of CL_DEVICE_MEM_BASE_ADDR_ALIGN on your device.
[QUOTE=utnapishtim;30021]-13 is the value of the error CL_MISALIGNED_SUB_BUFFER_OFFSET.
As explained in the specification of clCreateSubBuffer(), the origin of the sub-buffer must be aligned to the CL_DEVICE_MEM_BASE_ADDR_ALIGN value.
10000*sizeof(float) is probably not a multiple of CL_DEVICE_MEM_BASE_ADDR_ALIGN on your device.[/QUOTE]
Hi again!! I use this line to align:
clGetDeviceInfo(info[deviceCPU].device_id, CL_DEVICE_MEM_BASE_ADDR_ALIGN,0,NULL,NULL);
and this is the code :