在指定索引编写数组值到缓冲区。
template<typename T> bool BufferWrite( const int buffer_index, // 缓冲区索引 T &data[], // 数组值 const uint cl_buffer_offset, // 以字节为单位的OpenCL缓冲区抵消 const uint data_array_offset, // 数组元素的变化 const uint data_array_count // 要编写的数组值数 );
参数
buffer_index
[in] 缓冲区索引。
&data[]
[in] 将要写入OpenCL缓冲区的数组值。
cl_buffer_offset
[in] 以字节为单位的OpenCL缓冲区抵消,并自此开始写值。
data_array_offset
[in] 数组第一元素索引,数组值自此开始写入OpenCL 缓冲区。
data_array_count
[in] 将编写的值数。
返回值
如果执行成功,返回true,否则 - false。