12#ifndef TLAPACK_LASET_HH
13#define TLAPACK_LASET_HH
37template <TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
46 const idx_t m = nrows(
A);
47 const idx_t n = ncols(
A);
51 uplo != Uplo::General);
53 if (
uplo == Uplo::Upper) {
56 for (idx_t j = 1; j < n; ++j) {
57 const idx_t
M = min(m, j);
58 for (idx_t i = 0; i <
M; ++i)
62 else if (
uplo == Uplo::Lower) {
65 const idx_t
N = min(m, n);
66 for (idx_t j = 0; j <
N; ++j) {
67 for (idx_t i = j + 1; i < m; ++i)
73 for (idx_t j = 0; j < n; ++j)
74 for (idx_t i = 0; i < m; ++i)
79 const idx_t
N = min(m, n);
80 for (idx_t i = 0; i <
N; ++i)
void laset(uplo_t uplo, const type_t< matrix_t > &alpha, const type_t< matrix_t > &beta, matrix_t &A)
Initializes a matrix to diagonal and off-diagonal values.
Definition laset.hpp:38
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
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