12#ifndef TLAPACK_GGHD3_HH
13#define TLAPACK_GGHD3_HH
72 const idx_t n = ncols(
A);
73 const idx_t nb =
opts.nb;
88 for (idx_t j = 0; j < n; ++j)
89 for (idx_t i = j + 1; i < n; ++i)
93 if (
nh <= 1)
return 0;
96 std::vector<real_t>
Cl_;
100 std::vector<real_t>
Cr_;
111 for (idx_t j =
ilo; j + 2 <
ihi; j = j + nb) {
113 idx_t
nnb = std::min<idx_t>(nb,
ihi - 2 - j);
125 for (idx_t i =
ihi - 1; i > j +
jbb + 1; --i) {
135 for (idx_t i =
ihi - 1; i > j +
jb + 1; --i) {
167 for (idx_t i =
nblst - 1; i >
jb; --i) {
192 for (idx_t
ib =
n2nb - 1;
ib != (idx_t)-1;
ib--) {
196 for (idx_t i =
nnb +
jb; i >
jb; --i) {
238 for (idx_t i =
nblst - 1; i >
jb; --i) {
262 for (idx_t
ib =
n2nb - 1;
ib != (idx_t)-1;
ib--) {
266 for (idx_t i =
nnb +
jb; i >
jb; --i) {
#define TLAPACK_SMATRIX
Macro for tlapack::concepts::SliceableMatrix compatible with C++17.
Definition concepts.hpp:899
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 lacpy(uplo_t uplo, const matrixA_t &A, matrixB_t &B)
Copies a matrix from A to B.
Definition lacpy.hpp:38
void rotg(T &a, T &b, T &c, T &s)
Construct plane rotation that eliminates b, such that:
Definition rotg.hpp:39
void rot(vectorX_t &x, vectorY_t &y, const c_type &c, const s_type &s)
Apply plane rotation:
Definition rot.hpp:44
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
void hessenberg_rq(T_t &T, CL_t &cl, SL_t &sl, CR_t &cr, SR_t &sr)
Applies a sequence of rotations to an upper triangular matrix T from the left (making it an upper Hes...
Definition hessenberg_rq.hpp:49
int rot_sequence(side_t side, direction_t direction, const C_t &c, const S_t &s, A_t &A)
Applies a sequence of plane rotations to an (m-by-n) matrix.
Definition rot_sequence.hpp:81
int gghd3(bool wantq, bool wantz, size_type< A_t > ilo, size_type< A_t > ihi, A_t &A, B_t &B, Q_t &Q, Z_t &Z, const Gghd3Opts &opts={})
Reduces a pair of real square matrices (A, B) to generalized upper Hessenberg form using unitary tran...
Definition gghd3.hpp:52
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
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::Forward FORWARD
Forward direction.
Definition types.hpp:381
constexpr internal::GeneralAccess GENERAL
General access.
Definition types.hpp:180
constexpr internal::ConjTranspose CONJ_TRANS
conjugate transpose
Definition types.hpp:264
constexpr internal::NoTranspose NO_TRANS
no transpose
Definition types.hpp:260
Options struct for gghd3.
Definition gghd3.hpp:26
size_t nb
Block size.
Definition gghd3.hpp:27