Stan Math Library
5.0.0
Automatic Differentiation
|
__kernel void stan::math::opencl_kernels::add_batch | ( | __global double * | B, |
__global double * | A, | ||
unsigned int | rows, | ||
unsigned int | cols, | ||
unsigned int | batch_size | ||
) |
Sums a batch of matrices.
Buffer A contains batch_size matrices of size rows x cols. All elements at matching indices are summed up and stored to the resulting matrix B.
[out] | B | buffer of the result matrix. |
[in] | A | buffer containing the entire batch. |
rows | Number of rows for a single matrix in the batch. | |
cols | Number of cols for a single matrix in the batch. | |
batch_size | Number of matrices in the batch. |
const char*
held in add_batch_kernel_code.
This kernel uses the helper macros available in helpers.cl.