pub struct BlockLanczosParams {
pub block_size: usize,
pub basis_size: Option<usize>,
pub max_restarts: usize,
pub tol: f64,
}Expand description
Parameters for the block thick-restart Lanczos eigensolver.
Fields§
§block_size: usizeVectors per block, i.e. the width of every operator call. Wider blocks mean fewer, larger calls, which is what pays where each call carries a fixed launch and readback cost. Capped at half the operator dimension.
basis_size: Option<usize>Krylov basis vectors held at once, rounded down to whole blocks. None
derives it as for LanczosParams, rounded up to whole blocks, at least
twice the retained Ritz block and with room for
BLOCK_LANCZOS_MIN_NEW_BLOCKS new blocks per cycle.
max_restarts: usizeMaximum restart cycles.
tol: f64Relative residual tolerance, tested against tol * ||A|| as in
LanczosParams::tol.
Implementations§
Source§impl BlockLanczosParams
impl BlockLanczosParams
Sourcepub fn new() -> Self
pub fn new() -> Self
Defaults, chosen for the cubecl GPU path. Backends whose per-call cost grows faster with the block width override the block size.
§Returns
Self with blocks of 32, a derived basis size, 64 restarts and a
relative tolerance of 1e-6. That is tight enough that an f32
operator’s singular values agree with an f64 solve to f32 precision,
while the scalar solver’s 1e-8 sits near the f32 round-off and would
mostly burn the restart budget.
Trait Implementations§
Source§impl Clone for BlockLanczosParams
impl Clone for BlockLanczosParams
impl Copy for BlockLanczosParams
Source§impl Debug for BlockLanczosParams
impl Debug for BlockLanczosParams
Auto Trait Implementations§
impl Freeze for BlockLanczosParams
impl RefUnwindSafe for BlockLanczosParams
impl Send for BlockLanczosParams
impl Sync for BlockLanczosParams
impl Unpin for BlockLanczosParams
impl UnsafeUnpin for BlockLanczosParams
impl UnwindSafe for BlockLanczosParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.