Algorithm-specific entry points (CTA, blocked, two-stage, Jacobi, direct, LOBPCG, filtered), algorithm and range selection, and workspace queries behind syev, syevx, lanczos and ritz_values.
| size_t batchlas::syevx_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| JobType | jobz = JobType::NoEigenVectors, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V = MatrixView< T, MatrixFormat::Dense >(), | ||
| const SyevxParams< T > & | params = SyevxParams< T >() ) |
Required workspace, in bytes, for syevx(); arguments as for the call minus the workspace.
Unlike the solve, this accepts SyevxSelect::Value: sizing writes no counts.
|
inline |
syevx_buffer_size() on an owning A without eigenvectors.
Definition at line 318 of file extensions.hh.
|
inline |
syevx_buffer_size() with the solve's m argument, which is ACCEPTED AND IGNORED, so a value-range caller writes sizing and solve with one argument list.
Definition at line 333 of file extensions.hh.
|
inline |
The m-taking syevx_buffer_size() on an owning A; m is ignored.
Definition at line 347 of file extensions.hh.
| SyevxResolvedRange batchlas::syevx_resolve_range | ( | int64_t | n, |
| size_t | neigs, | ||
| SyevxSelect | select, | ||
| bool | find_largest, | ||
| int64_t | il, | ||
| int64_t | iu, | ||
| SortOrder | order ) |
Normalizes a range request into a SyevxResolvedRange.
Legality is NOT checked here; it clamps rather than throws so it stays usable when sizing.
| n | Matrix dimension |
| neigs | Capacity of W and V per batch item (see syevx) |
| select | SyevxParams::select |
| find_largest | SyevxParams::find_largest (Extremal only) |
| il,iu | SyevxParams::il / iu (Index only; iu < 0 means n-1) |
| order | SyevxParams::order (Index and Value only) |
|
inline |
syevx_resolve_range() reading the range fields from params; distinguished from the 7-argument form by arity.
Definition at line 400 of file extensions.hh.
| SyevxAlgorithm batchlas::syevx_select_algorithm | ( | MatrixFormat | format, |
| int64_t | n, | ||
| size_t | neigs, | ||
| SyevxAlgorithm | requested, | ||
| bool | subset_supported, | ||
| JobType | jobz = JobType::EigenVectors, | ||
| int64_t | batch_size = 1, | ||
| SyevxSelect | select = SyevxSelect::Extremal ) |
Resolves SyevxParams::method (and the BATCHLAS_SYEVX_ALGORITHM override) to a concrete, implemented algorithm.
Never returns Auto, and is deterministic so that syevx and syevx_buffer_size always agree on the choice.
| format | Matrix format of A (sparse formats run LOBPCG unless Filtered is requested explicitly) |
| n | Matrix dimension |
| neigs | Number of requested eigenpairs |
| requested | Algorithm requested via SyevxParams::method |
| subset_supported | Whether DirectSubset is available for this T/format |
| jobz | Whether eigenvectors are wanted; load-bearing for the choice |
| batch_size | Load-bearing: the subset solver starves at small batch |
| select | Excludes the algorithms that cannot answer the requested range |
| batchlas::invalid_argument | for sparse input, or an explicit LOBPCG/Filtered method, with a non-extremal range. The same request made through BATCHLAS_SYEVX_ALGORITHM degrades to Direct with a one-time warning. |
| Event batchlas::syevx_direct | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| Span< int32_t > | m, | ||
| size_t | neigs, | ||
| Span< std::byte > | workspace, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Partial eigensolve by full decomposition followed by selection.
Runs syev on a private copy of A. Dense input only, but every scalar type and every SyevxSelect range: the universal fallback.
| W | Eigenvalue output, stride neigs; entries past min(m[b], neigs) untouched |
| V | Eigenvector output. Columns past min(m[b], neigs) are written as EXACTLY ZERO – unlike W – so this path and syevx_direct_subset agree. |
| m | Per-item count in the requested range, or an empty span to not report it. m[b] > neigs is the truncation signal; the LOWEST neigs are kept. |
Other parameters as for syevx().
|
inline |
syevx_direct without the m output; Extremal and Index only.
Distinguished from the form above by ARITY, so no {} trap can fire.
Definition at line 469 of file extensions.hh.
| size_t batchlas::syevx_direct_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params ) |
Required workspace, in bytes, for syevx_direct().
Takes no m: sizing writes no counts, and this path's workspace is range-independent.
| Event batchlas::syevx_direct_subset | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| Span< int32_t > | m, | ||
| size_t | neigs, | ||
| Span< std::byte > | workspace, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Partial eigensolve by two-stage reduction plus a subset tridiagonal solve (stebz + stein) and a narrowed back-transform.
Real scalars and dense input only; zero capacity is rejected (stein requires k >= 1).
W, V and m follow the same contract as syevx_direct, with stein doing the zeroing. The descending reversal is applied last, in the finalize kernel: stein's cluster detection walks consecutive eigenvalues and requires ascending input. Other parameters as for syevx().
| batchlas::unsupported | for complex or sparse input |
| batchlas::invalid_argument | for neigs == 0, an out-of-range index block, vl >= vu, a too-short m, or an out-of-order Queue |
|
inline |
syevx_direct_subset without the m output; arity-disambiguated as above.
Definition at line 527 of file extensions.hh.
| size_t batchlas::syevx_direct_subset_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params ) |
Required workspace, in bytes, for syevx_direct_subset().
Sizing writes no counts, but it is NOT range-independent: a Value range needs room for up to n eigenvalues per item, so the sizes come from syevx_resolve_range().
|
inlineconstexpr |
Whether syevx_direct_subset supports this scalar type and format.
Definition at line 558 of file extensions.hh.
| Event batchlas::syevx_lobpcg | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| Span< std::byte > | workspace, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Partial eigensolve by LOBPCG (locally optimal block preconditioned conjugate gradient).
Dense and CSR input; extremal ranges only.
Iterates a block of neigs (+ SyevxParams::extra_directions) vectors until the residuals meet the tolerances or SyevxParams::iterations is reached; optionally preconditioned by ILU(k) for the smallest eigenpairs. Parameters as for syevx().
| size_t batchlas::syevx_lobpcg_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params ) |
Required workspace, in bytes, for syevx_lobpcg().
| Event batchlas::syevx_filtered | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| Span< std::byte > | workspace, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Chebyshev-filtered subspace iteration: amplifies the wanted end of the spectrum, then Rayleigh-Ritz.
Needs only matvecs; dense and CSR input, extremal ranges only.
The polynomial degree is SyevxParams::filter_degree (0 picks a default). Parameters as for syevx().
| size_t batchlas::syevx_filtered_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| size_t | neigs, | ||
| JobType | jobz, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const SyevxParams< T > & | params ) |
Required workspace, in bytes, for syevx_filtered().
| size_t batchlas::lanczos_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| Span< typename base_type< T >::type > | W, | ||
| JobType | jobz = JobType::NoEigenVectors, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V = MatrixView< T, MatrixFormat::Dense >(), | ||
| const LanczosParams< T > & | params = LanczosParams< T >() ) |
Required workspace, in bytes, for lanczos(); arguments as for the call itself.
| Event batchlas::syev_cta | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a_in, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| const Span< std::byte > & | ws, | ||
| SteqrParams< T > | steqr_params = SteqrParams< T >(), | ||
| size_t | cta_wg_size_multiplier = 0, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
CTA-optimized symmetric eigen-solver (SYEV-like), n <= 32; real symmetric and complex Hermitian.
Overwrites A with eigenvectors when jobz == EigenVectors. Eigenvalues ascend when SteqrParams::sort is set (default). cta_wg_size_multiplier == 0 lets the tridiagonal solve pick its tuned value and runs the reduction and back-transform at 1.
This and the other syev_* tiers are what syev() routes between; call one directly only to pin a tier. As in syev(), a_in's uplo triangle is read, eigenvalues gets n real values per item, and info is the per-item convergence status or empty.
| size_t batchlas::syev_cta_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a, | ||
| JobType | jobz, | ||
| SteqrParams< T > | steqr_params = SteqrParams< T >() ) |
Required workspace, in bytes, for syev_cta().
| Event batchlas::syev_cta_fused | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a_in, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| const Span< std::byte > & | ws = Span< std::byte >(), | ||
| SteqrParams< T > | steqr_params = SteqrParams< T >(), | ||
| size_t | cta_wg_size_multiplier = 0, | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Fused (single-kernel) variant of syev_cta.
Runs end to end inside one sub-group partition, so results track syev_cta only to within the reassociation that fusing implies. Unlike syev_cta, A is left untouched when jobz == NoEigenVectors. ws is accepted for API symmetry and ignored. cta_wg_size_multiplier == 0 picks a tuned value per scalar type and width.
| size_t batchlas::syev_cta_fused_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a, | ||
| JobType | jobz, | ||
| SteqrParams< T > | steqr_params = SteqrParams< T >() ) |
Required workspace, in bytes, for syev_cta_fused().
| Event batchlas::syev_jacobi_cta | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a_in, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| const Span< std::byte > & | ws = Span< std::byte >(), | ||
| JacobiParams< T > | params = JacobiParams< T >(), | ||
| Span< int32_t > | info = Span< int32_t >() ) |
CTA-optimized Jacobi symmetric/Hermitian eigen-solver, n <= 32; real symmetric and complex Hermitian.
Trades throughput for high relative accuracy on graded or badly scaled input. The underlying theorem (Demmel & Veselic, SIMAX 13(4), 1992) is proved for symmetric positive definite input; indefinite matrices are solved correctly but do not inherit the bound. Overwrites A with eigenvectors when jobz == EigenVectors and leaves it untouched otherwise; ws is accepted for API symmetry and ignored.
| size_t batchlas::syev_jacobi_cta_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a, | ||
| JobType | jobz, | ||
| JacobiParams< T > | params = JacobiParams< T >() ) |
Required workspace, in bytes, for syev_jacobi_cta().
| Event batchlas::syev_blocked | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a_in, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| const Span< std::byte > & | ws, | ||
| StedcParams< typename base_type< T >::type > | stedc_params = StedcParams< typename base_type< T >::type >(), | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Blocked symmetric/Hermitian eigen-solver (SYEV-like) for medium/large n: sytrd_blocked -> stedc -> ormqr_blocked.
Overwrites A with eigenvectors when jobz == EigenVectors. Uplo::Upper input is first mirrored into the lower triangle, in place, and then takes the Lower path.
| size_t batchlas::syev_blocked_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| StedcParams< typename base_type< T >::type > | stedc_params = StedcParams< typename base_type< T >::type >() ) |
Required workspace, in bytes, for syev_blocked(); the same for either uplo.
| Event batchlas::syev_two_stage | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a_in, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| const Span< std::byte > & | ws, | ||
| StedcParams< typename base_type< T >::type > | stedc_params = StedcParams< typename base_type< T >::type >(), | ||
| Span< int32_t > | info = Span< int32_t >() ) |
Two-stage symmetric/Hermitian eigen-solver (SYEV-like) for large n: sytrd_sy2sb -> sytrd_sb2st -> stedc, then phase/sign recovery and a reflector back-transform.
Band width from choose_two_stage_kd (override with BATCHLAS_SYEV_TWO_STAGE_KD). Uplo::Upper input is mirrored into the lower triangle first, as in syev_blocked().
| size_t batchlas::syev_two_stage_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | a, | ||
| JobType | jobz, | ||
| Uplo | uplo, | ||
| StedcParams< typename base_type< T >::type > | stedc_params = StedcParams< typename base_type< T >::type >() ) |
Required workspace, in bytes, for syev_two_stage().
| size_t batchlas::ritz_values_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MFormat > & | A, | ||
| const MatrixView< T, MatrixFormat::Dense > & | V, | ||
| const VectorView< typename base_type< T >::type > & | ritz_vals ) |
Required workspace size, in bytes, for ritz_values().
| size_t batchlas::syev_buffer_size | ( | Queue & | ctx, |
| const MatrixView< T, MatrixFormat::Dense > & | A, | ||
| Span< typename base_type< T >::type > | eigenvalues, | ||
| JobType | jobtype, | ||
| Uplo | uplo ) |
Workspace, in bytes, that syev() needs for the same arguments.
Makes the same kernel choice as the call, so the size is for the tier that will run. info does not affect it.