Skip to main content

BatchedBlockSolver

Trait BatchedBlockSolver 

Source
pub trait BatchedBlockSolver {
    // Required methods
    fn factor_blocks(
        &self,
        rows: &[ArrowRowBlock],
        ridge_t: f64,
        d: usize,
        tolerate_ill_conditioning: bool,
    ) -> Result<ArrowFactorSlab, ArrowSchurError>;
    fn solve_block_vector(
        &self,
        factor: ArrayView2<'_, f64>,
        rhs: ArrayView1<'_, f64>,
    ) -> Array1<f64>;
    fn solve_block_matrix(
        &self,
        factor: ArrayView2<'_, f64>,
        rhs: ArrayView2<'_, f64>,
    ) -> Array2<f64>;
    fn sqrt_solve_block_matrix(
        &self,
        factor: ArrayView2<'_, f64>,
        rhs: ArrayView2<'_, f64>,
    ) -> Array2<f64>;
    fn block_gemm_subtract(
        &self,
        schur: &mut Array2<f64>,
        left: &Array2<f64>,
        right: &Array2<f64>,
    );
}
Expand description

CPU/GPU seam for BA point-block work.

BA systems spend most time in independent point-block factorizations, triangular solves, and Schur block products. MegBA maps exactly these operations to GPU kernels. This trait keeps that boundary explicit so a CUDA/Ceres backend can replace CpuBatchedBlockSolver without changing ArrowSchurSystem algebra.

Required Methods§

Source

fn factor_blocks( &self, rows: &[ArrowRowBlock], ridge_t: f64, d: usize, tolerate_ill_conditioning: bool, ) -> Result<ArrowFactorSlab, ArrowSchurError>

Factor every per-row point block H_tt^(i) + ridge_t I, as in BA’s point elimination stage.

tolerate_ill_conditioning lifts the per-row κ rejection (still requiring genuine PD); see ArrowSolveOptions::tolerate_ill_conditioning.

Source

fn solve_block_vector( &self, factor: ArrayView2<'_, f64>, rhs: ArrayView1<'_, f64>, ) -> Array1<f64>

Solve one factored point block against a vector RHS.

Source

fn solve_block_matrix( &self, factor: ArrayView2<'_, f64>, rhs: ArrayView2<'_, f64>, ) -> Array2<f64>

Solve one factored point block against a dense matrix RHS.

Source

fn sqrt_solve_block_matrix( &self, factor: ArrayView2<'_, f64>, rhs: ArrayView2<'_, f64>, ) -> Array2<f64>

Apply the Square-Root BA lower-triangular solve L_i^-1 rhs.

Source

fn block_gemm_subtract( &self, schur: &mut Array2<f64>, left: &Array2<f64>, right: &Array2<f64>, )

Subtract a row-local Schur product from the dense reduced system.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§