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

◆ indexing_rev() [1/2]

__kernel void stan::math::opencl_kernels::indexing_rev ( __global double *  adj,
const __global int *  index,
const __global double *  res,
int  size 
)

Increments adjoint of the indexing operation argument given the indices and adjoints of the indexing result.

This kernel uses global atomics and is the fastest for large sizes of the indexed matrix.

Parameters
[in,out]adjadjoint to increment
index
resadjoint of the result of indexing
sizeNumber of matrices in the batch.
Note
Code is a const char* held in add_batch_kernel_code.

Definition at line 33 of file indexing_rev.hpp.