I want to use clEnqueueReadBufferRect
in OpenCL. To do it, I need to define the region
as one of its passing arguement. But there is a inconsistency between references of OpenCL In online reference, it is mention that
“The (width, height, depth) in bytes of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region [2] should be 1.”
but in the reference book, page 77, it is mentioned that
“region defines the (width in bytes, height in rows, depth in slices) of the 2D or 3D rectangle being read or written. For a 2D rectangle copy, the depth value given by region [2] should be 1. The values in region cannot be 0”
but unfortunately, none of those guides worked for me and I should provide region in (width in columns, height in rows, depth in slices), otherwise, when I defined them as byte not rows/columns, I got the error CL_INVALID_VALUE
. Now which one is correct?