Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1489-standardlibrary-copencl-copenclbufferwrite.md
T
2026-06-23 21:47:51 +08:00

42 lines
1.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BufferWrite
Writes an array of values into buffer at the specified index.
```
template<typename T>
bool  BufferWrite(
   const int   buffer_index,          // buffer index
   T           &data[],               // array of values
   const uint  cl_buffer_offset,      // offset in the OpenCL buffer, in bytes
   const uint  data_array_offset,     // shift in the array elements
   const uint  data_array_count       // number of values from the array to write
   );
```
Parameters
buffer_index
[in]  Index buffer.
&data[]
[in]  An array of values to be written into the OpenCL buffer.
cl_buffer_offset
[in]  Offset in the OpenCL buffer in bytes, from which to start writing values.
data_array_offset
[in]  Index of the first element of the array, starting from which the array values are written to the OpenCL buffer.
data_array_count
[in] The number of values to be written.
Return Value
In case of successful execution, returns true, otherwise - false.