pub struct BatchedTriSolve { /* private fields */ }Expand description
Batched sparse triangular solve.
Solves L_i * x_i = b_i for each lower-triangular CSR matrix L_i
and right-hand side b_i in the batch.
Implementations§
Source§impl BatchedTriSolve
impl BatchedTriSolve
Sourcepub fn execute<T: GpuFloat + Add<Output = T> + Mul<Output = T> + AddAssign>(
l_batch: &[CsrMatrix<T>],
b_batch: &[Vec<T>],
) -> SparseResult<Vec<Vec<T>>>
pub fn execute<T: GpuFloat + Add<Output = T> + Mul<Output = T> + AddAssign>( l_batch: &[CsrMatrix<T>], b_batch: &[Vec<T>], ) -> SparseResult<Vec<Vec<T>>>
Execute batched forward-substitution on the host.
Each L_i must be square and lower-triangular with non-zero diagonal.
§Errors
Returns SparseError::InvalidArgument on batch size mismatch.
Returns SparseError::DimensionMismatch if matrices are not square.
Returns SparseError::SingularMatrix if a zero diagonal is encountered.
Returns SparseError::Cuda on download failure.
Sourcepub fn execute_host<T: GpuFloat + Add<Output = T> + Mul<Output = T> + AddAssign>(
row_ptrs: &[Vec<i32>],
col_indices: &[Vec<i32>],
values: &[Vec<T>],
sizes: &[usize],
rhs: &[Vec<T>],
) -> SparseResult<Vec<Vec<T>>>
pub fn execute_host<T: GpuFloat + Add<Output = T> + Mul<Output = T> + AddAssign>( row_ptrs: &[Vec<i32>], col_indices: &[Vec<i32>], values: &[Vec<T>], sizes: &[usize], rhs: &[Vec<T>], ) -> SparseResult<Vec<Vec<T>>>
Execute batched forward-substitution from host-side arrays.
§Errors
Returns SparseError::InvalidArgument on length mismatch.
Returns SparseError::SingularMatrix on zero diagonal.
Trait Implementations§
Source§impl Debug for BatchedTriSolve
impl Debug for BatchedTriSolve
Auto Trait Implementations§
impl Freeze for BatchedTriSolve
impl RefUnwindSafe for BatchedTriSolve
impl Send for BatchedTriSolve
impl Sync for BatchedTriSolve
impl Unpin for BatchedTriSolve
impl UnsafeUnpin for BatchedTriSolve
impl UnwindSafe for BatchedTriSolve
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