Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ add_batch()

__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.

Parameters
[out]Bbuffer of the result matrix.
[in]Abuffer containing the entire batch.
rowsNumber of rows for a single matrix in the batch.
colsNumber of cols for a single matrix in the batch.
batch_sizeNumber of matrices in the batch.
Note
Code is a const char* held in add_batch_kernel_code. This kernel uses the helper macros available in helpers.cl.

Definition at line 32 of file add.hpp.