12#ifndef TLAPACK_LARFB_HH
13#define TLAPACK_LARFB_HH
85 const idx_t m = nrows(
C);
86 const idx_t n = ncols(
C);
128 const idx_t m = nrows(
C);
129 const idx_t n = ncols(
C);
135 trans != Op::NoTrans &&
trans != Op::ConjTrans &&
138 direction != Direction::Forward);
143 ? ((ncols(
V) ==
k) && (
side == Side::Left) ? (nrows(
V) == m)
145 : ((nrows(
V) ==
k) && (
side == Side::Left) ? (ncols(
V) == m)
150 if (m <= 0 || n <= 0 ||
k <= 0)
return 0;
157 if (direction == Direction::Forward) {
158 if (
side == Side::Left) {
187 for (idx_t j = 0; j < n; ++j)
188 for (idx_t i = 0; i <
k; ++i)
220 for (idx_t j = 0; j <
k; ++j)
221 for (idx_t i = 0; i < m; ++i)
226 if (
side == Side::Left) {
231 const auto V1 = rows(
V,
range{0, m -
k});
232 const auto V2 = rows(
V,
range{m -
k, m});
255 for (idx_t j = 0; j < n; ++j)
256 for (idx_t i = 0; i <
k; ++i)
264 const auto V1 = rows(
V,
range{0, n -
k});
265 const auto V2 = rows(
V,
range{n -
k, n});
288 for (idx_t j = 0; j <
k; ++j)
289 for (idx_t i = 0; i < m; ++i)
295 if (direction == Direction::Forward) {
296 if (
side == Side::Left) {
325 for (idx_t j = 0; j < n; ++j)
326 for (idx_t i = 0; i <
k; ++i)
358 for (idx_t j = 0; j <
k; ++j)
359 for (idx_t i = 0; i < m; ++i)
364 if (
side == Side::Left) {
369 const auto V1 = cols(
V,
range{0, m -
k});
370 const auto V2 = cols(
V,
range{m -
k, m});
393 for (idx_t j = 0; j < n; ++j)
394 for (idx_t i = 0; i <
k; ++i)
402 const auto V1 = cols(
V,
range{0, n -
k});
403 const auto V2 = cols(
V,
range{n -
k, n});
426 for (idx_t j = 0; j <
k; ++j)
427 for (idx_t i = 0; i < m; ++i)
528 const idx_t m = nrows(
C);
529 const idx_t n = ncols(
C);
536 if (m <= 0 || n <= 0 ||
k <= 0)
return 0;
541 std::vector<T>
work_;
constexpr internal::LowerTriangle LOWER_TRIANGLE
Lower Triangle access.
Definition types.hpp:188
constexpr internal::UpperTriangle UPPER_TRIANGLE
Upper Triangle access.
Definition types.hpp:186
constexpr internal::RightSide RIGHT_SIDE
right side
Definition types.hpp:296
constexpr internal::UnitDiagonal UNIT_DIAG
The main diagonal is assumed to consist of 1's.
Definition types.hpp:222
constexpr internal::GeneralAccess GENERAL
General access.
Definition types.hpp:180
constexpr internal::NonUnitDiagonal NON_UNIT_DIAG
The main diagonal is not assumed to consist of 1's.
Definition types.hpp:220
constexpr internal::ConjTranspose CONJ_TRANS
conjugate transpose
Definition types.hpp:264
constexpr internal::NoTranspose NO_TRANS
no transpose
Definition types.hpp:260
constexpr internal::LeftSide LEFT_SIDE
left side
Definition types.hpp:294
#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
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
int larfb(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const matrixT_t &Tmatrix, matrixC_t &C)
Applies a block reflector or its conjugate transpose to a m-by-n matrix C, from either the left or ...
Definition larfb.hpp:512
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
void lacpy(uplo_t uplo, const matrixA_t &A, matrixB_t &B)
Copies a matrix from A to B.
Definition lacpy.hpp:38
void trmm(Side side, Uplo uplo, Op trans, Diag diag, const alpha_t &alpha, const matrixA_t &A, matrixB_t &B)
Triangular matrix-matrix multiply:
Definition trmm.hpp:72
void gemm(Op transA, Op transB, const alpha_t &alpha, const matrixA_t &A, const matrixB_t &B, const beta_t &beta, matrixC_t &C)
General matrix-matrix multiply:
Definition gemm.hpp:61
#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 larfb_worksize(side_t side, trans_t trans, direction_t direction, storage_t storeMode, const matrixV_t &V, const matrixT_t &Tmatrix, const matrixC_t &C)
Worspace query of larfb()
Definition larfb.hpp:73
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 bool is_complex
True if T is a complex scalar type.
Definition scalar_type_traits.hpp:192
Output information in the workspace query.
Definition workspace.hpp:16