13#ifndef TLAPACK_UNMQ_HH
14#define TLAPACK_UNMQ_HH
93 const idx_t m = nrows(
C);
94 const idx_t n = ncols(
C);
95 const idx_t
k = size(
tau);
97 const idx_t nb = min((idx_t)
opts.nb,
k);
145 const idx_t m = nrows(
C);
146 const idx_t n = ncols(
C);
147 const idx_t
k = size(
tau);
149 const idx_t nb = min((idx_t)
opts.nb,
k);
159 ? ((ncols(
V) ==
k) && (nrows(
V) ==
nQ))
160 : ((nrows(
V) ==
k) && (ncols(
V) ==
nQ)));
163 if (m <= 0 || n <= 0 ||
k <= 0)
return 0;
182 for (idx_t i =
i0; i !=
iN; i += inc) {
183 const idx_t
ib = min(nb,
k - i);
202 for (idx_t i =
i0; i !=
iN; i += inc) {
203 const idx_t
ib = min(nb,
k - i);
299 const idx_t m = nrows(
C);
300 const idx_t n = ncols(
C);
301 const idx_t
k = size(
tau);
304 if (m <= 0 || n <= 0 ||
k <= 0)
return 0;
309 std::vector<T>
work_;
#define TLAPACK_SVECTOR
Macro for tlapack::concepts::SliceableVector compatible with C++17.
Definition concepts.hpp:909
#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_OP
Macro for tlapack::concepts::Op compatible with C++17.
Definition concepts.hpp:933
#define TLAPACK_WORKSPACE
Macro for tlapack::concepts::Workspace compatible with C++17.
Definition concepts.hpp:912
int unmq(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const vector_t &tau, matrixC_t &C, const UnmqOpts &opts={})
Applies unitary matrix Q to a matrix C.
Definition unmq.hpp:282
int larfb_work(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const matrixT_t &Tmatrix, matrixC_t &C, work_t &work)
Applies a block reflector or its conjugate transpose to a m-by-n matrix C, from either the left or ...
Definition larfb.hpp:111
int larft(direction_t direction, storage_t storeMode, const matrixV_t &V, const vector_t &tau, matrixT_t &T)
Forms the triangular factor T of a block reflector H of order n, which is defined as a product of k e...
Definition larft.hpp:92
int unmq_work(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const vector_t &tau, matrixC_t &C, work_t &work, const UnmqOpts &opts={})
Applies unitary matrix Q to a matrix C. Workspace is provided as an argument.
Definition unmq.hpp:131
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
constexpr WorkInfo unmq_worksize(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const vector_t &tau, const matrixC_t &C, const UnmqOpts &opts={})
Worspace query of unmq()
Definition unmq.hpp:79
Concept for types that represent tlapack::Direction.
Concept for types that represent tlapack::Op.
Applies a Householder block reflector to a matrix.
Forms the triangular factor T of a block reflector.
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::RowwiseStorage ROWWISE_STORAGE
Rowwise storage.
Definition types.hpp:416
@ Forward
Forward direction.
@ Backward
Backward direction.
@ ConjTrans
conjugate transpose
constexpr internal::ColumnwiseStorage COLUMNWISE_STORAGE
Columnwise storage.
Definition types.hpp:414
@ Columnwise
Columnwise storage.
constexpr bool is_complex
True if T is a complex scalar type.
Definition scalar_type_traits.hpp:192
constexpr internal::NoTranspose NO_TRANS
no transpose
Definition types.hpp:260
Options struct for unmq.
Definition unmq.hpp:25
size_t nb
Block size.
Definition unmq.hpp:26
Output information in the workspace query.
Definition workspace.hpp:16