pub struct ResidentArrowFrameHandle { /* private fields */ }Expand description
#1017 Phase 3: a device-resident Arrow-Schur frame whose constant Hessian
blocks (D = H_tt, B = H_tβ, border H_ββ) and their factors stay on the
device across the inner Newton loop. Construct once per frozen gate/basis
frame, then call ResidentArrowFrameHandle::solve_gradient once per
iterate with the fresh residual gradient — only the O(n·d + p) gradient
crosses to the device and only δ crosses back, in contrast to
solve_arrow_newton_step which re-uploads and re-factors the full system
every call. On a non-CUDA host construction returns
ArrowSchurGpuFailure::Unavailable.
Implementations§
Source§impl ResidentArrowFrameHandle
impl ResidentArrowFrameHandle
Sourcepub fn new(
sys: &ArrowSchurSystem,
ridge_t: f64,
ridge_beta: f64,
) -> Result<Self, ArrowSchurGpuFailure>
pub fn new( sys: &ArrowSchurSystem, ridge_t: f64, ridge_beta: f64, ) -> Result<Self, ArrowSchurGpuFailure>
Upload the constant Hessian blocks and perform the one-time factor work.
Sourcepub fn solve_gradient(
&self,
g_t: &[f64],
g_beta: &[f64],
) -> Result<ArrowSchurGpuSolution, ArrowSchurGpuFailure>
pub fn solve_gradient( &self, g_t: &[f64], g_beta: &[f64], ) -> Result<ArrowSchurGpuSolution, ArrowSchurGpuFailure>
Solve H δ = −gradient for a fresh gradient reusing the resident factors.
Sourcepub fn log_det_hessian(&self) -> f64
pub fn log_det_hessian(&self) -> f64
log|H| for the frame (constant; depends only on the factored Hessian).
Auto Trait Implementations§
impl Freeze for ResidentArrowFrameHandle
impl RefUnwindSafe for ResidentArrowFrameHandle
impl Send for ResidentArrowFrameHandle
impl Sync for ResidentArrowFrameHandle
impl Unpin for ResidentArrowFrameHandle
impl UnsafeUnpin for ResidentArrowFrameHandle
impl UnwindSafe for ResidentArrowFrameHandle
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> 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.