pub struct BandMatrix<T: GpuFloat> {
pub data: DeviceBuffer<T>,
pub n: usize,
pub kl: usize,
pub ku: usize,
}Expand description
Band matrix descriptor.
Stores a banded matrix in LAPACK-style band storage format.
The storage array has (2*kl + ku + 1) rows and n columns for LU
(extra kl rows for fill-in during pivoting), or (kl + ku + 1) rows
and n columns for non-pivoted operations.
Fields§
§data: DeviceBuffer<T>Band storage data on the device.
n: usizeMatrix dimension (n x n).
kl: usizeNumber of sub-diagonals.
ku: usizeNumber of super-diagonals.
Implementations§
Source§impl<T: GpuFloat> BandMatrix<T>
impl<T: GpuFloat> BandMatrix<T>
Sourcepub fn new(n: usize, kl: usize, ku: usize) -> SolverResult<Self>
pub fn new(n: usize, kl: usize, ku: usize) -> SolverResult<Self>
Creates a new band matrix with the given dimensions.
Allocates a device buffer of size (2*kl + ku + 1) * n to accommodate
fill-in during LU factorization.
§Errors
Returns SolverError::Cuda if device allocation fails.
Sourcepub fn storage_len(&self) -> usize
pub fn storage_len(&self) -> usize
Returns the total number of elements in band storage.
Auto Trait Implementations§
impl<T> Freeze for BandMatrix<T>
impl<T> RefUnwindSafe for BandMatrix<T>where
T: RefUnwindSafe,
impl<T> Send for BandMatrix<T>
impl<T> Sync for BandMatrix<T>
impl<T> Unpin for BandMatrix<T>where
T: Unpin,
impl<T> UnsafeUnpin for BandMatrix<T>
impl<T> UnwindSafe for BandMatrix<T>where
T: UnwindSafe,
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