42 using idx_t = size_type<matrix_t>;
43 using T = type_t<matrix_t>;
44 using real_t = real_type<T>;
45 using range = pair<idx_t, idx_t>;
47 const idx_t n = nrows(L);
55 for (idx_t j = n; j-- > 0;) {
58 real(L(j, j)) * real(L(j, j)) + imag(L(j, j)) * imag(L(j, j));
59 for (idx_t k = 0; k < j; ++k) {
61 real_part_of_ljj += real(L(j, k)) * real(L(j, k)) +
62 imag(L(j, k)) * imag(L(j, k));
64 L(j, j) = real_part_of_ljj;
66 for (idx_t i = j; i-- > 0;) {
67 L(j, i) = L(j, i) *
conj(L(i, i));
68 for (idx_t k = 0; k < i; ++k) {
69 L(j, i) += L(j, k) *
conj(L(i, k));
78 const idx_t n0 = n / 2;
80 auto L00 = slice(L, range(0, n0), range(0, n0));
81 auto L10 = slice(L, range(n0, n), range(0, n0));
82 auto L11 = slice(L, range(n0, n), range(n0, n));
88 herk(Uplo::Lower, Op::NoTrans, real_t(1), L10, real_t(1), L11);
91 trmm(Side::Right, Uplo::Lower, Op::ConjTrans, Diag::NonUnit, T(1), L00,
void mult_llh(matrix_t &L, const mult_llh_Opts &opts={})
in-place multiplication of lower triangular matrix L and upper triangular matrix L^H.
Definition mult_llh.hpp:40
void herk(Uplo uplo, Op trans, const alpha_t &alpha, const matrixA_t &A, const beta_t &beta, matrixC_t &C)
Hermitian rank-k update:
Definition herk.hpp:68
void trmm(Side side, Uplo uplo, Op trans, Diag diag, const alpha_t &alpha, const matrixA_t &A, matrixB_t &B)
Triangular matrix-matrix multiply:
Definition trmm.hpp:72
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
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