53 using T = type_t<matrix_t>;
54 using idx_t = size_type<matrix_t>;
55 using range = pair<idx_t, idx_t>;
56 using real_t = real_type<T>;
58 const idx_t n = nrows(C);
72 if (diag == Diag::NonUnit) {
73 if (C(0, 0) != zero) {
74 C(0, 0) = real_t(1.) / C(0, 0);
79 "A diagonal of entry of triangular "
80 "matrix is exactly zero.");
89 if (uplo == Uplo::Lower) {
90 auto C00 = slice(C, range(0, n0), range(0, n0));
91 auto C10 = slice(C, range(n0, n), range(0, n0));
92 auto C11 = slice(C, range(n0, n), range(n0, n));
94 trsm(RIGHT_SIDE, LOWER_TRIANGLE, NO_TRANS, diag, T(-1), C00, C10);
95 trsm(LEFT_SIDE, LOWER_TRIANGLE, NO_TRANS, diag, T(+1), C11, C10);
100 "A diagonal of entry of triangular "
101 "matrix is exactly zero.");
109 "A diagonal of entry of triangular "
110 "matrix is exactly zero.");
123 auto C00 = slice(C, range(0, n0), range(0, n0));
124 auto C01 = slice(C, range(0, n0), range(n0, n));
125 auto C11 = slice(C, range(n0, n), range(n0, n));
127 trsm(LEFT_SIDE, UPPER_TRIANGLE, NO_TRANS, diag, T(-1), C00, C01);
128 trsm(RIGHT_SIDE, UPPER_TRIANGLE, NO_TRANS, diag, T(+1), C11, C01);
132 "A diagonal of entry of triangular "
133 "matrix is exactly zero.");
141 "A diagonal of entry of triangular "
142 "matrix is exactly zero.");
void trsm(Side side, Uplo uplo, Op trans, Diag diag, const alpha_t &alpha, const matrixA_t &A, matrixB_t &B)
Solve the triangular matrix-vector equation.
Definition trsm.hpp:76
int trtri_recursive(uplo_t uplo, Diag diag, matrix_t &C, const EcOpts &opts={})
TRTRI computes the inverse of a triangular matrix in-place Input is a triangular matrix,...
Definition trtri_recursive.hpp:48
#define tlapack_error_if(cond, info, detailedInfo)
Error handler with conditional.
Definition exceptionHandling.hpp:171
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113