12#ifndef TLAPACK_TREVC_HH
13#define TLAPACK_TREVC_HH
28 size_t block_size = 64;
30 size_t block_size_solve = 64;
68 const idx_t n = ncols(T);
191 const idx_t n = nrows(T);
196 mm = std::min<idx_t>(ncols(
Vl), ncols(
Vr));
206 if (n == 0)
return 0;
218 if (T(j + 1, j) !=
TT(0)) {
245 const idx_t nb =
opts.block_size;
251 for (idx_t j = 0; j < n; ++j) {
261 for (idx_t
ii = 0;
ii < n;) {
262 idx_t i = n - 1 -
ii;
271 for (idx_t
jj = 0;
jj < i + 1;
jj++) {
297 i_start = (i >= nb) ? i - nb + 1 : 0;
312 opts.block_size_solve);
345 for (idx_t i = 0; i < n;) {
354 for (idx_t j = i; j < n; j++) {
363 for (idx_t j =
i_start + 1; j < n; j++) {
393 opts.block_size_solve);
518 std::vector<TT>
work_;
520 std::vector<real_type<TT>>
rwork_;
#define TLAPACK_SIDE
Macro for tlapack::concepts::Side compatible with C++17.
Definition concepts.hpp:927
#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 lacpy(uplo_t uplo, const matrixA_t &A, matrixB_t &B)
Copies a matrix from A to B.
Definition lacpy.hpp:38
size_type< vector_t > iamax(const vector_t &x, const IamaxOpts< abs_f > &opts)
Return .
Definition iamax.hpp:234
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
WorkInfo trevc3_worksize(const side_t side, const HowMny howmny, select_t &select, const matrix_T_t &T, matrix_Vl_t &Vl, matrix_Vr_t &Vr, const Trevc3Opts &opts={})
Worspace query of TREVC3()
Definition trevc3.hpp:58
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
int trevc3_work(const side_t side, const HowMny howmny, select_t &select, const matrix_T_t &T, matrix_Vl_t &Vl, matrix_Vr_t &Vr, rwork_t &rwork, work_t &work, const Trevc3Opts &opts={})
TREVC3 computes some or all of the right and/or left eigenvectors of an upper quasi-triangular matrix...
Definition trevc3.hpp:176
constexpr real_type< T > abs1(const T &x)
1-norm absolute value, |Re(x)| + |Im(x)|
Definition utils.hpp:133
HowMny
Definition trevc.hpp:23
@ Back
all eigenvectors, backtransformed by input matrix
@ Select
selected eigenvectors
void trevc3_backsolve(const matrix_T_t &T, matrix_X_t &X, vector_colN_t &colN, work_t &work, size_type< matrix_T_t > ks, size_type< matrix_T_t > ke, size_type< matrix_T_t > blocksize)
Calculate the ks-th through ke-th (not inclusive) right eigenvector of T using a blocked backsubstitu...
Definition trevc3_backsolve.hpp:32
@ General
0 <= i <= m, 0 <= j <= n.
void trevc3_forwardsolve(const matrix_T_t &T, matrix_X_t &X, vector_colN_t &colN, work_t &work, size_type< matrix_T_t > ks, size_type< matrix_T_t > ke, size_type< matrix_T_t > blocksize)
Calculate the ks-th through ke-th (not inclusive) left eigenvector of T using a blocked backsubstitut...
Definition trevc3_forwardsolve.hpp:31
int trevc3(const side_t side, const HowMny howmny, select_t &select, const matrix_T_t &T, matrix_Vl_t &Vl, matrix_Vr_t &Vr, const Trevc3Opts &opts={})
TREVC3 computes some or all of the right and/or left eigenvectors of an upper quasi-triangular matrix...
Definition trevc3.hpp:506
Options struct for multishift_qr().
Definition trevc3.hpp:26
Output information in the workspace query.
Definition workspace.hpp:16