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

◆ get_twisted_factorization()

int stan::math::opencl_kernels::get_twisted_factorization ( const __global double_d l,
const __global double_d d,
double_d  shift,
__global double_d l_plus,
__global double_d u_minus,
__global double_d s 
)

Calculates shifted LDL and UDU factorizations.

Combined with twist index they form twisted factorization for calculation of an eigenvector corresponding to eigenvalue that is equal to the shift. Tha algorithm is sometimes called diferential twisted quotient-differences with shifts (dtwqds). L * D * L^T - shift * I = L+ * D+ * L+^T = U- * D- * U-^T D, D+ and D- are diagonal, L and L+ are lower unit triangular (diagonal elements are 1, all elements except diagonal and subdiagonal are 0), U- is upper unit triangular (diagonal elements are 1, all elements except diagonal and superdiagonal are 0)

Parameters
lSubdiagonal of L.
dDiagonal of D.
shiftShift.
[out]l_plusSubdiagonal of L+.
[out]u_minusSuperdiagonal of U-.
sTemporary array of the same size as d.
Returns
Twist index.

Definition at line 220 of file mrrr.hpp.