Stan Math Library
5.0.0
Automatic Differentiation
|
__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.
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.
[in] | A | input matrix that is being inverted. |
[out] | temp | output matrix with results of the batched matrix multiplications |
A_rows | The number of rows for A. | |
rows | The number of rows in a single matrix of the batch |
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.