12#ifndef TLAPACK_LARF_HH
13#define TLAPACK_LARF_HH
63 const idx_t
k = size(
C0);
64 const idx_t m = nrows(
C1);
65 const idx_t n = ncols(
C1);
74 if (m == 0 || n == 0) {
75 for (idx_t i = 0; i <
k; ++i)
86 for (idx_t i = 0; i <
k; ++i)
94 for (idx_t i = 0; i <
k; ++i)
99 for (idx_t i = 0; i <
k; ++i)
104 for (idx_t j = 0; j < n; ++j)
105 for (idx_t i = 0; i < m; ++i)
109 for (idx_t i = 0; i <
k; ++i)
116 for (idx_t i = 0; i <
k; ++i)
124 for (idx_t i = 0; i <
k; ++i)
129 for (idx_t i = 0; i <
k; ++i)
131 for (idx_t j = 0; j < n; ++j)
132 for (idx_t i = 0; i < m; ++i)
139 for (idx_t i = 0; i <
k; ++i)
191 const idx_t m = nrows(
C1);
192 const idx_t n = ncols(
C1);
277 const idx_t
k = size(
C0);
278 const idx_t m = nrows(
C1);
279 const idx_t n = ncols(
C1);
288 if (m == 0 || n == 0) {
289 for (idx_t i = 0; i <
k; ++i)
296 std::vector<T>
work_;
340 const idx_t m = nrows(
C);
341 const idx_t n = ncols(
C);
352 if (m == 0 || n == 0)
return;
371 : rows(
C,
range{0, m - 1});
373 : slice(
v,
range{0, m - 1});
379 : cols(
C,
range{0, n - 1});
381 : slice(
v,
range{0, n - 1});
433 const idx_t m = nrows(
C);
434 const idx_t n = ncols(
C);
437 auto&&
C0 = row(
C, 0);
439 auto&&
x = slice(
v,
range{1, m});
443 auto&&
C0 = col(
C, 0);
445 auto&&
x = slice(
v,
range{1, n});
512 const idx_t m = nrows(
C);
513 const idx_t n = ncols(
C);
524 if (m == 0 || n == 0)
return;
528 std::vector<T>
work_;
#define TLAPACK_SVECTOR
Macro for tlapack::concepts::SliceableVector compatible with C++17.
Definition concepts.hpp:909
#define TLAPACK_SCALAR
Macro for tlapack::concepts::Scalar compatible with C++17.
Definition concepts.hpp:915
#define TLAPACK_STOREV
Macro for tlapack::concepts::StoreV compatible with C++17.
Definition concepts.hpp:936
#define TLAPACK_SIDE
Macro for tlapack::concepts::Side compatible with C++17.
Definition concepts.hpp:927
#define TLAPACK_SMATRIX
Macro for tlapack::concepts::SliceableMatrix compatible with C++17.
Definition concepts.hpp:899
#define TLAPACK_DIRECTION
Macro for tlapack::concepts::Direction compatible with C++17.
Definition concepts.hpp:930
#define TLAPACK_WORKSPACE
Macro for tlapack::concepts::Workspace compatible with C++17.
Definition concepts.hpp:912
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
void larf(side_t side, storage_t storeMode, vector_t const &x, const tau_t &tau, vectorC0_t &C0, matrixC1_t &C1)
Applies an elementary reflector defined by tau and v to a m-by-n matrix C decomposed into C0 and C1.
Definition larf.hpp:261
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 gemv(Op trans, const alpha_t &alpha, const matrixA_t &A, const vectorX_t &x, const beta_t &beta, vectorY_t &y)
General matrix-vector multiply:
Definition gemv.hpp:57
void ger(const alpha_t &alpha, const vectorX_t &x, const vectorY_t &y, matrixA_t &A)
General matrix rank-1 update:
Definition ger.hpp:42
void geru(const alpha_t &alpha, const vectorX_t &x, const vectorY_t &y, matrixA_t &A)
General matrix rank-1 update:
Definition geru.hpp:43
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
constexpr WorkInfo larf_worksize(side_t side, storage_t storeMode, vector_t const &x, const tau_t &tau, const vectorC0_t &C0, const matrixC1_t &C1)
Worspace query of larf().
Definition larf.hpp:180
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 T conj(const T &x) noexcept
Extends std::conj() to real datatypes.
Definition utils.hpp:100
constexpr internal::RightSide RIGHT_SIDE
right side
Definition types.hpp:296
constexpr internal::Transpose TRANSPOSE
transpose
Definition types.hpp:262
@ Forward
Forward direction.
@ Backward
Backward direction.
constexpr internal::ConjTranspose CONJ_TRANS
conjugate transpose
Definition types.hpp:264
@ Rowwise
Rowwise storage.
@ Columnwise
Columnwise storage.
constexpr internal::NoTranspose NO_TRANS
no transpose
Definition types.hpp:260
constexpr internal::LeftSide LEFT_SIDE
left side
Definition types.hpp:294
Output information in the workspace query.
Definition workspace.hpp:16