12#ifndef TLAPACK_TIK_SVD
13#define TLAPACK_TIK_SVD
45 const idx_t m = nrows(
A);
46 const idx_t n = ncols(
A);
47 const idx_t
k = ncols(
b);
51 std::vector<T>
tauv(n);
52 std::vector<T>
tauw(n);
68 std::vector<real_t>
d(n);
69 std::vector<real_t>
e(n - 1);
70 for (idx_t j = 0; j < n; ++j)
72 for (idx_t j = 0; j < n - 1; ++j)
92 for (idx_t j = 0; j < n; ++j)
93 for (idx_t i = 0; i <
k; ++i)
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
#define TLAPACK_REAL
Macro for tlapack::concepts::Real compatible with C++17.
Definition concepts.hpp:918
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 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
int svd_qr(Uplo uplo, bool want_u, bool want_vt, d_t &d, e_t &e, matrix_t &U, matrix_t &Vt)
Computes the singular values and, optionally, the right and/or left singular vectors from the singula...
Definition svd_qr.hpp:85
int unmqr(side_t side, trans_t trans, const matrixA_t &A, const tau_t &tau, matrixC_t &C, const UnmqrOpts &opts={})
Applies orthogonal matrix op(Q) to a matrix C using a blocked code.
Definition unmqr.hpp:158
int unmlq(side_t side, trans_t trans, const matrixA_t &A, const tau_t &tau, matrixC_t &C, const UnmlqOpts &opts={})
Applies orthogonal matrix op(Q) to a matrix C using a blocked code.
Definition unmlq.hpp:159
int bidiag(matrix_t &A, vector_t &tauv, vector_t &tauw, const BidiagOpts &opts={})
Reduces a general m by n matrix A to an upper real bidiagonal form B by a unitary transformation:
Definition bidiag.hpp:134
Multiplies the general m-by-n matrix C by Q from tlapack::geqrf()
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 real_type< T > real(const T &x) noexcept
Extends std::real() to real datatypes.
Definition utils.hpp:71
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