2#include <batchlas/export.hh>
94 return "MatrixFormat(?)";
98 template <MatrixFormat F>
102 template <MatrixFormat F>
167 return "BackendLibrary(?)";
185 return "Transpose(?)";
234 return "SvdVectors(?)";
347 return "SortOrder(?)";
363 return "ApplyOrder(?)";
401 return "SyevxAlgorithm(?)";
428 return "SyevxSelect(?)";
467 return "SyevxPreconditioner(?)";
495 return "OrthoAlgorithm(?)";
525 return "ComputePrecision(?)";
541 return "VectorOrientation(?)";
563 return "NormType(?)";
594 template <
typename CharT,
typename Traits,
typename E>
595 requires std::is_enum_v<E> &&
requires(E e) {
to_string(e); }
596 std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, E value) {
A std::complex scalar (std::complex<float>, std::complex<double>).
Any scalar the numerical entry points accept: real or complex floating point.
A real floating-point scalar (float, double).
std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > &os, E value)
Prints any BatchLAS enum as its enumerator spelling, via its to_string().
constexpr SvdVectors canonical_jobu(SvdVectors job, int64_t m, int64_t k)
Rewrites a U job of Thin to All when both request the same shape (k == m).
constexpr SvdVectors canonical_jobvh(SvdVectors job, int64_t n, int64_t k)
Rewrites a V^H job of Thin to All when both request the same shape (k == n).
SyevxPreconditioner
Preconditioner of the LOBPCG path of syevx; the other algorithms ignore it.
constexpr int64_t svd_u_cols(SvdVectors job, int64_t m, int64_t k)
Number of columns of U that job writes.
constexpr std::string_view to_string(MatrixFormat v)
Spelling of v as in source.
constexpr int64_t svd_vh_rows(SvdVectors job, int64_t n, int64_t k)
Number of rows of V^H that job writes.
@ Auto
ILU(k) if configured, else the environment default, else None.
@ ILUK
Supplied or syevx-built ILU(k) factor; CSR, smallest eigenpairs only.
@ Jacobi
diag(A)^{-1}; dense and CSR, smallest eigenpairs only.
@ JacobiShifted
(diag(A) - lambda I)^{-1}; dense and CSR, either end.
JobType
Whether an eigensolver computes eigenvectors (LAPACK jobz).
Transpose
The operator op() applied to an operand: op(A) = A, A^T or A^H.
Diag
Whether a triangular operand's diagonal is read or assumed to be one.
NormType
Matrix norm computed by norm and used by the condition estimators.
SyevxSelect
Which part of the spectrum syevx returns.
SortOrder
Order in which eigenvalues (and their vectors) are returned.
Backend
Library family an entry point dispatches to, used as a template argument.
ComputePrecision
Internal compute precision of a GEMM (the cuBLAS cublasComputeType_t).
Uplo
Which triangle of a symmetric, Hermitian or triangular operand is referenced.
SvdVectors
Which singular vectors gesvd computes for one factor (LAPACK jobu / jobvt).
BackendLibrary
A vendor library inside a Backend; selects library-specific type and handle mappings.
VectorOrientation
How a VectorView is reinterpreted as a MatrixView: 1 x n or n x 1.
constexpr bool is_std_complex_v
Value of is_std_complex<T>.
typename base_type< T >::type float_t
Shorthand for base_type<T>::type: the precision of T (tolerances, norms, eigenvalues).
OrthoAlgorithm
Algorithm used by ortho to orthonormalise the columns of a batch of blocks.
MatrixFormat
Storage format of a Matrix / MatrixView, used as a template argument.
Layout
Storage order argument of the host CBLAS / LAPACKE calls.
ApplyOrder
Order in which a sequence of plane rotations is applied (steqr sweeps).
SyevxAlgorithm
Algorithm family of the partial symmetric/Hermitian eigensolver syevx.
Side
Side on which a special operand multiplies: op(A) * B or B * op(A).
@ NoEigenVectors
Eigenvalues only (jobz = 'N').
@ EigenVectors
Eigenvalues and eigenvectors (jobz = 'V').
@ ConjTrans
op(A) = A^H (the same as Trans for real scalars).
@ Unit
The diagonal is taken as 1 and not read.
@ NonUnit
The stored diagonal is used.
@ Inf
Maximum absolute row sum.
@ One
Maximum absolute column sum.
@ Max
Maximum absolute entry (not a consistent norm).
@ Frobenius
sqrt(sum |a_ij|^2).
@ Spectral
Largest singular value; symmetric/Hermitian input only.
@ Value
Every eigenvalue in the half-open interval (vl, vu].
@ Index
SyevxParams::il .. iu inclusive, 0-based in the ascending spectrum.
@ Extremal
neigs eigenpairs from one end; SyevxParams::find_largest picks the end.
@ Ascending
Smallest first.
@ Descending
Largest first.
@ MAGMA
Reserved; no dispatch target, never available.
@ NETLIB
Host CBLAS / LAPACKE; the fallback for any device.
@ SYCL
Native SYCL kernels on a GPU with no vendor library (AdaptiveCpp Metal); float and complex<float> onl...
@ ROCM
AMD GPU: rocBLAS / rocSOLVER / rocSPARSE and the native SYCL kernels.
@ MKL
Reserved; no dispatch target, never available.
@ CUDA
NVIDIA GPU: cuBLAS / cuSOLVER / cuSPARSE and the native SYCL kernels.
@ AUTO
A request, not a backend: the Queue resolves it from its device on first query.
@ F64
64-bit float accumulation.
@ F32
32-bit float accumulation.
@ F16
Half-precision inputs, 32-bit accumulation (CUBLAS_COMPUTE_32F_FAST_16F).
@ Default
The precision of the scalar type.
@ TF32
TensorFloat-32 inputs, 32-bit accumulation (CUBLAS_COMPUTE_32F_FAST_TF32).
@ BF16
bfloat16 inputs, 32-bit accumulation (CUBLAS_COMPUTE_32F_FAST_16BF).
@ Upper
The upper triangle (i <= j).
@ Lower
The lower triangle (i >= j).
@ None
Do not compute this factor.
@ Thin
Economy factor with k = min(m, n) vectors (LAPACK 'S').
@ All
Full square factor (LAPACK 'A').
@ ROCSOLVER
Backend::ROCM.
@ ROCSPARSE
Backend::ROCM.
@ LAPACKE
Backend::NETLIB.
@ Column
An n x 1 matrix; requires inc == 1.
@ Row
A 1 x n matrix; ld is the vector's inc.
@ CGS2
Classical Gram-Schmidt with one reorthogonalisation pass.
@ SVQB2
SVQB applied twice.
@ ShiftChol3
Shifted CholeskyQR3; more robust than Chol2 on ill-conditioned blocks.
@ Householder
Householder QR.
@ SVQB
SVQB (orthonormalisation through the Gram matrix's eigendecomposition).
@ NUM_ALGORITHMS
Count of the enumerators above, not an algorithm.
@ Cholesky
One CholeskyQR pass; rarely accurate enough on its own.
@ Chol2
CholeskyQR applied twice; the default.
@ BLOCKED_ELL
Blocked ELLPACK.
@ CSC
Compressed Sparse Column.
@ Dense
Column-major dense storage with leading dimension and batch stride.
@ CSR
Compressed Sparse Row.
@ ColMajor
Column-major (CblasColMajor).
@ RowMajor
Row-major (CblasRowMajor).
@ Forward
First rotation first (a QR sweep).
@ Backward
Last rotation first (a QL sweep).
@ Auto
Heuristic selection on format, n, batch size and jobz (the default).
@ DirectSubset
Two-stage reduction, bisection + inverse iteration on the subset (real, dense).
@ LOBPCG
Locally Optimal Block Preconditioned Conjugate Gradient; the CSR default.
@ Direct
Full syev on a copy of A, then select the requested eigenpairs.
@ Filtered
Chebyshev-filtered subspace iteration (dense and CSR); only when asked for.
@ Right
The special operand is on the right.
@ Left
The special operand is on the left.
T type
The component type R of std::complex<R>.
Real type underlying a scalar: T itself for a real T, R for std::complex<R>.
True for std::complex<R>, false otherwise.