Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1487-standardlibrary-copencl-copenclbufferfromarray.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.
# BufferFromArray
Creates a buffer at the specified index from an array of values.
```
template<typename T>
bool  BufferFromArray(
   const int   buffer_index,          // buffer index
   T           &data[],               // array of values
   const uint  data_array_offset,     // offset in the array of values, in bytes
   const uint  data_array_count,      // number of values from the array to write
   const uint  flags                  // combination of flags that define the buffer properties
   );
```
Parameters
buffer_index
[in]  Index buffer.
&data[]
[in]  An array of values to be written into the OpenCL buffer.
data_array_offset
[in]  Offset in the array of values in bytes, from which writing of values begins.
data_array_count
[in] The number of values to be written.
flags
[in]  Buffer properties that are set using a combination of flags.
Return Value
In case of successful execution, returns true, otherwise - false.