pub struct MatrixLogPlan { /* private fields */ }Expand description
Execution plan for the matrix logarithm.
Uses inverse scaling and squaring:
- Reduce
Avia repeated matrix square roots until||A - I||is small. - Apply Padé approximation of
log(I + X)for the reduced matrix. - Scale the result back by
2^s.
Implementations§
Source§impl MatrixLogPlan
impl MatrixLogPlan
Sourcepub fn new(config: MatrixLogConfig) -> SolverResult<Self>
pub fn new(config: MatrixLogConfig) -> SolverResult<Self>
Creates a plan from a validated configuration.
Sourcepub fn max_sqrt_iters(&self) -> u32
pub fn max_sqrt_iters(&self) -> u32
Returns the maximum allowed square-root iterations.
Sourcepub fn generate_ptx(&self) -> SolverResult<String>
pub fn generate_ptx(&self) -> SolverResult<String>
Generates PTX source for the matrix logarithm kernels.
The generated code contains entry points for:
- shift kernel — computes
X = A - I. - square-root iteration kernel — Denman–Beavers step applied to A
until
||A - I||is below threshold. - Padé log kernel — evaluates the
[m/m]Padé approximant tolog(I + X)for smallX. - scale-back kernel — multiplies the result by
2^s.
Trait Implementations§
Source§impl Clone for MatrixLogPlan
impl Clone for MatrixLogPlan
Source§fn clone(&self) -> MatrixLogPlan
fn clone(&self) -> MatrixLogPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MatrixLogPlan
impl RefUnwindSafe for MatrixLogPlan
impl Send for MatrixLogPlan
impl Sync for MatrixLogPlan
impl Unpin for MatrixLogPlan
impl UnsafeUnpin for MatrixLogPlan
impl UnwindSafe for MatrixLogPlan
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
Mutably borrows from an owned value. Read more