Skip to main content

krylovscope/
lib.rs

1//! # krylovscope
2//!
3//! Reusable spectral endpoint estimation for large symmetric operators.
4//!
5//! The CUDA path implements the validated RobustF64Q design: operator storage
6//! may remain `f32`, while resident Lanczos recurrence vectors and scalar
7//! reductions use native `f64`. The API supports generic matrix-free operators,
8//! built-in CSR/PDSM32 storage, explicit cold preparation, free-DOF masks, and
9//! multi-seed diagnostics.
10
11mod spectral;
12pub use spectral::RitzBounds;
13
14#[cfg(feature = "cuda")]
15pub use cubecl;
16#[cfg(feature = "cuda")]
17pub mod cuda;
18#[cfg(feature = "cuda")]
19pub mod estimator;
20#[cfg(feature = "cuda")]
21pub mod session;
22#[cfg(feature = "cuda")]
23pub mod sparse;
24
25#[cfg(feature = "cuda")]
26pub use cuda::{
27    CsrF32Operator, DiagonalF32Operator, Pass64, ResidentF64Operator, RobustStats, EVENT_BREAKDOWN,
28    EVENT_NONFINITE_ALPHA, EVENT_NONFINITE_BETA,
29};
30#[cfg(feature = "cuda")]
31pub use estimator::{
32    EnsembleEstimate, Estimate, EstimatorConfig, PreparationReport, SpectralEstimator, MAX_STEPS,
33};
34#[cfg(feature = "cuda")]
35pub use session::{
36    IndexConversion, SparseSession, SparseSessionConfig, SparseSessionReport, SparseView,
37    ValueConversion,
38};
39#[cfg(feature = "cuda")]
40pub use sparse::{HostSparseOperator, ValidationPolicy, ValidationReport};