Hi all, to create a GPU buffer and init it to be all 0s, what I am doing right now is:
copy an array of 0s to the buff
I am wondering if there is anyway to create a GPU buffer and init it to be all 0s without calling clEnqueueWriteBuffer() ?
Check clEnqueueFillBuffer() API. It can fill up patterns within an OpenCL buffer object.
I think this API is available from OpenCL 1.1 and above.
If you are using OpenCL 1.0, you may not have this function.