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

◆ inv_lower_tri_multiply()

__kernel void stan::math::opencl_kernels::inv_lower_tri_multiply ( __global double *  A,
__global double *  temp,
const int  A_rows,
const int  rows 
)

Calculates B = C * A.

C is an inverse matrix and A is lower triangular.

This kernel is used in the final iteration of the batched lower triangular inversion. For a full guide to the inverse lower triangular kernels see the link here. The full inverse requires calculation of the lower left rectangular matrix within the lower left triangular C3 = -C2*A3*C1. where C2 is the inverse of the bottom right lower triangular, C1 is the inverse of the upper left lower and A3 is the original lower triangulars lower left rectangular. This kernel takes the output from neg_rect_lower_tri_multiply and applies the submatrix multiplication to get the final output for C3. Inverse Calculation

Graphically, this kernel calculates the C2 * A3. The kernel is executed using (N, N, m) threads, where N is the size of the input matrices.

Parameters
[in]Ainput matrix that is being inverted.
[out]tempoutput matrix with results of the batched matrix multiplications
A_rowsThe number of rows for A.
rowsThe number of rows in a single matrix of the batch
Note
Code is a const char* held in inv_lower_tri_multiply_kernel_code. Used in math/opencl/tri_inverse.hpp. This kernel uses the helper macros available in helpers.cl.

Definition at line 46 of file inv_lower_tri_multiply.hpp.