Hi, I think my following question is obvious but I can't find the answer explicity in the OpenCL specification.
Imagine I create a subbuffer:
Then, testDevice contains from 0 to numGridCells ints of positioningDevice.Code :cl_buffer_region posRegion; posRegion.origin = 0; posRegion.size = numGridCells*sizeof(cl_int); cl_mem testDevice = clCreateSubBuffer(positioningDevice, CL_MEM_READ_WRITE, CL_BUFFER_CREATE_TYPE_REGION, &posRegion, &errcode_ret);
Does testDevice still contains 0 to numGridCells ints of positioningDevice? I think the obvious answer is no, cause otherwise will mean that clCreateSubBuffer is making a copy of positioningDevice which makes no sense for a method call clCreateSubBuffer.Code :cl_int ret = clReleaseMemObject(positioningDevice);
Anyway, I just want to be sure that I'm right.
Another, I think, obvious question is, is clCreateSubBuffer faster than create a new buffer and then clEnqueueCopyBuffer?