Hello all,

I am currently trying to use clEnqueueCopyBufferRect to copy parts of buffers,
and am puzzled by the pitch and region syntax for this function.

On the official doc page (http://www.khronos.org/registry/cl/s...ufferRect.html)
it is said that the (x,y,z) "region" should be specified in bytes, as should be the values of the row and slice pitches.

However, in the errors section, the following error value is described:
" CL_INVALID_VALUE if dst_slice_pitch is not 0 and is less than region[1] * dst_row_pitch or if dst_slice_pitch is not 0 and is
not a multiple of dst_row_pitch ".
Is this not contradictory, in terms of byte specification?

Here is a simple example.
A and B are 2 (10x10x10) arrays of doubles.
I want to copy the first (10x10) slice from A to B.
I understand "region" to be (10x8,10x8,1x8 ) , the x8 corresponding to the number of bytes per double.
The row_pitch in bytes is 10x8, the slice_pitch in bytes is 10x10x8.
Thus, slice_pitch is less than region[1] * row_pitch, which is therefore an error condition.

Could anyone explain what I am misreading?

Many thanks,

Olivier Marsden