10#ifndef TLAPACK_TRGE_UNG2R_HH
11#define TLAPACK_TRGE_UNG2R_HH
17template <TLAPACK_SMATRIX matrix_t, TLAPACK_VECTOR vector_t>
29 idx_t m = nrows(
W) - n;
38 auto v = slice(
W,
range{n, m + n}, n - 1);
48 for (idx_t j = 0; j < n - 1; j++)
51 W(n - 1, n - 1) = T(1) -
tau[n - 1];
53 for (idx_t i = n - 1; i-- > 0;) {
54 auto v = slice(
W,
range{n, m + n}, i);
60 for (idx_t j = 0; j < i; j++)
63 W(i, i) = T(1) -
tau[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
void larf_work(side_t side, storage_t storeMode, vector_t const &x, const tau_t &tau, vectorC0_t &C0, matrixC1_t &C1, work_t &work)
Applies an elementary reflector defined by tau and v to a m-by-n matrix C decomposed into C0 and C1....
Definition larf.hpp:48
void scal(const alpha_t &alpha, vector_t &x)
Scale vector by constant, .
Definition scal.hpp:30
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
constexpr internal::GeneralAccess GENERAL
General access.
Definition types.hpp:180
constexpr internal::ColumnwiseStorage COLUMNWISE_STORAGE
Columnwise storage.
Definition types.hpp:414
constexpr internal::LeftSide LEFT_SIDE
left side
Definition types.hpp:294