64 using T = type_t<matrix_t>;
65 using real_t = real_type<T>;
66 using idx_t = size_type<matrix_t>;
67 using range = pair<idx_t, idx_t>;
71 const idx_t n = nrows(A);
72 const idx_t nb = opts.nb;
83 return potf2(uplo, A);
87 if (uplo == Uplo::Upper) {
88 for (idx_t j = 0; j < n; j += nb) {
89 idx_t jb = min(nb, n - j);
92 auto AJJ = slice(A, range{j, j + jb}, range{j, j + jb});
94 int info =
potf2(UPPER_TRIANGLE, AJJ);
98 "The leading minor of the reported order is not "
100 " and the factorization could not be completed.");
105 auto B = slice(A, range{j, j + jb}, range{j + jb, n});
106 auto C = slice(A, range{j + jb, n}, range{j + jb, n});
108 trsm(LEFT_SIDE, UPPER_TRIANGLE, CONJ_TRANS, NON_UNIT_DIAG,
110 herk(UPPER_TRIANGLE, CONJ_TRANS, -one, B, one, C);
115 for (idx_t j = 0; j < n; j += nb) {
116 idx_t jb = min(nb, n - j);
119 auto AJJ = slice(A, range{j, j + jb}, range{j, j + jb});
121 int info =
potf2(LOWER_TRIANGLE, AJJ);
125 "The leading minor of the reported order is not "
127 " and the factorization could not be completed.");
132 auto B = slice(A, range{j + jb, n}, range{j, j + jb});
133 auto C = slice(A, range{j + jb, n}, range{j + jb, n});
135 trsm(RIGHT_SIDE, LOWER_TRIANGLE, CONJ_TRANS, NON_UNIT_DIAG,
137 herk(LOWER_TRIANGLE, NO_TRANS, -one, B, one, C);
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 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 potrf_rl(uplo_t uplo, matrix_t &A, const BlockedCholeskyOpts &opts={})
Computes the Cholesky factorization of a Hermitian positive definite matrix A using a blocked algorit...
Definition potrf_blocked_right_looking.hpp:62
int potf2(uplo_t uplo, matrix_t &A)
Computes the Cholesky factorization of a Hermitian positive definite matrix A using a level-2 algorit...
Definition potf2.hpp:58
#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