pub struct PcgDiagnostics {
pub iterations: usize,
pub matvec_calls: usize,
pub precond_apply_calls: usize,
pub ridge_escalations: usize,
pub final_relative_residual: f64,
pub stopping_reason: PcgStopReason,
pub mixed_precision_status: MixedPrecisionStatus,
pub used_device_arrow: bool,
pub injected_host_procedural_matvec: bool,
}Expand description
Per-solve instrumentation counters returned alongside the PCG solution.
All fields default to zero; callers that do not need diagnostics simply ignore the value. The struct is Copy so passing it through return tuples is zero-overhead.
Fields§
§iterations: usizeNumber of CG iterations executed.
matvec_calls: usizeTotal calls to the Schur matvec A·p.
precond_apply_calls: usizeTotal calls to the preconditioner M^{-1}·r.
ridge_escalations: usizeNumber of times the LM ridge was escalated before a successful factor.
final_relative_residual: f64Relative residual at termination; 0.0 when the RHS was zero.
stopping_reason: PcgStopReasonWhy the loop stopped.
mixed_precision_status: MixedPrecisionStatusMixed-precision certificate outcome for this solve.
used_device_arrow: boolTrue only when the reduced-Schur solve was actually executed on the
device: either the fully device-resident batched Arrow-Schur Direct
sequence (try_device_arrow_direct → solve_arrow_newton_step) or the
device-resident matrix-free SAE PCG (solve_sae_matrix_free_pcg, which
runs the matvec in CUDA kernels over device-resident frames). It is NOT
set merely because a GPU runtime exists and a dispatch gate fired (#1209).
injected_host_procedural_matvec: boolTrue when a reduced-Schur matvec backend was injected through
maybe_inject_gpu_schur_matvec but the matvec itself runs as a
host (CPU Rust/Rayon) procedural closure — both the matrix-free
build_row_procedural_matvec branch and the cuda::build_schur_matvec_backend
branch return host closures that evaluate Σ_i Y_iᵀ(Y_i x) on the CPU,
even when a CUDA context was opened to build the per-row factors. This
path must NOT report used_device_arrow: the arithmetic is host-side
(#1209). Distinct field so perf accounting never mistakes a host
procedural matvec for true device execution.
Trait Implementations§
Source§impl Clone for PcgDiagnostics
impl Clone for PcgDiagnostics
Source§fn clone(&self) -> PcgDiagnostics
fn clone(&self) -> PcgDiagnostics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PcgDiagnostics
Source§impl Debug for PcgDiagnostics
impl Debug for PcgDiagnostics
Source§impl Default for PcgDiagnostics
impl Default for PcgDiagnostics
Source§fn default() -> PcgDiagnostics
fn default() -> PcgDiagnostics
Auto Trait Implementations§
impl Freeze for PcgDiagnostics
impl RefUnwindSafe for PcgDiagnostics
impl Send for PcgDiagnostics
impl Sync for PcgDiagnostics
impl Unpin for PcgDiagnostics
impl UnsafeUnpin for PcgDiagnostics
impl UnwindSafe for PcgDiagnostics
Blanket Implementations§
impl<T> Allocation for T
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.