pub enum MaterializationIntent {
InnerSolve,
LogdetFactorization,
OuterEvaluation,
OuterGradient,
}Expand description
What the consumer is going to do with the joint Hessian. This is the intent half of #738’s capability-vs-representation split: the call site states what it needs, and the workspace picks the cheapest representation that serves that need (rather than a single per-workspace preference being applied uniformly regardless of how the result is consumed).
The distinction matters because the same workspace serves several consumers with opposite ideal representations:
- the inner Newton/PCG solve only ever applies
H · v, so a matrix-free HVP (Operator) is ideal and a dense build is pure waste; - the REML logdet term factorizes
H + S_λ(Cholesky / eigendecomposition), so it must hold a dense matrix anyway — handing it anOperatoronly forces an immediate column-basis (ordense_forced) re-materialization, so a workspace with a structural direct-dense build should answerDensehere and skip the operator wrapper entirely.
Workspaces refine their representation choice per intent via
[ExactNewtonJointHessianWorkspace::hessian_source_preference_for_intent];
the default keeps the legacy single-preference behaviour so existing
workspaces are unchanged.
Variants§
InnerSolve
Inner Newton / PCG solve — only applies H · v. Matrix-free is ideal.
LogdetFactorization
REML/LAML logdet term — factorizes H + S_λ, needs a dense matrix.
OuterEvaluation
Outer-Hessian / EFS evaluation — builds the joint hyper terms; today these route through the same source as the gradient path.
OuterGradient
Outer-gradient / IFT term assembly.
Trait Implementations§
Source§impl Clone for MaterializationIntent
impl Clone for MaterializationIntent
Source§fn clone(&self) -> MaterializationIntent
fn clone(&self) -> MaterializationIntent
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 MaterializationIntent
Source§impl Debug for MaterializationIntent
impl Debug for MaterializationIntent
impl Eq for MaterializationIntent
Source§impl PartialEq for MaterializationIntent
impl PartialEq for MaterializationIntent
Source§fn eq(&self, other: &MaterializationIntent) -> bool
fn eq(&self, other: &MaterializationIntent) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MaterializationIntent
Auto Trait Implementations§
impl Freeze for MaterializationIntent
impl RefUnwindSafe for MaterializationIntent
impl Send for MaterializationIntent
impl Sync for MaterializationIntent
impl Unpin for MaterializationIntent
impl UnsafeUnpin for MaterializationIntent
impl UnwindSafe for MaterializationIntent
Blanket Implementations§
impl<T> Boilerplate 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,
impl<T> Scalar for T
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.