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);
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)
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
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
@ General
0 <= i <= m, 0 <= j <= n.
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.