Writes into the OpenCL buffer and returns the number of written elements.
[in] A handle of the OpenCL buffer.
[in] An array of values that should be written in the OpenCL buffer. Passed by reference.
[in] An offset in the OpenCL buffer in bytes, from which writing begins. By default, writing start with the very beginning of the buffer.
[in] The index of the first array element, starting from which values from the array are written in the OpenCL buffer. By default, values from the very beginning of the array are taken.
[in] The number of values that should be written. All the values of the array, by default.
The number of written elements. 0 is returned in case of an error. For information about the error, use the GetLastError() function.
For one-dimensional arrays, the number of the element, with which reading of data for writing into an OpenCL buffer begins, is calculated taking into account the AS_SERIES flags.
An array of two or more dimensions is presented as one-dimensional. In this case, data_offset is the number of elements that should be skipped in the presentation, not the number of elements in the first dimension.