pub struct OptimizedCSRStorage { /* private fields */ }Expand description
Optimized CSR storage with SIMD acceleration and buffer pooling.
Implementations§
Source§impl OptimizedCSRStorage
impl OptimizedCSRStorage
Sourcepub fn from_coo(
coo: &COOStorage,
rows: DimensionType,
cols: DimensionType,
) -> Result<Self>
pub fn from_coo( coo: &COOStorage, rows: DimensionType, cols: DimensionType, ) -> Result<Self>
Create optimized CSR storage from COO format.
Sourcepub fn multiply_vector_simd(&self, x: &[Precision], result: &mut [Precision])
pub fn multiply_vector_simd(&self, x: &[Precision], result: &mut [Precision])
Fallback non-SIMD matrix-vector multiplication.
Sourcepub fn multiply_vector_optimized(
&self,
x: &[Precision],
result: &mut [Precision],
)
pub fn multiply_vector_optimized( &self, x: &[Precision], result: &mut [Precision], )
Cache-optimized matrix-vector multiplication.
Sourcepub fn multiply_vector_streaming<F>(
&self,
x: &[Precision],
callback: F,
chunk_size: usize,
) -> Result<()>
pub fn multiply_vector_streaming<F>( &self, x: &[Precision], callback: F, chunk_size: usize, ) -> Result<()>
Streaming matrix-vector multiplication for large matrices.
Sourcepub fn performance_stats(&self) -> OptimizedMatrixStats
pub fn performance_stats(&self) -> OptimizedMatrixStats
Get performance statistics.
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset performance counters.
Sourcepub fn get_temp_buffer(&mut self, size: usize) -> Vec<Precision> ⓘ
pub fn get_temp_buffer(&mut self, size: usize) -> Vec<Precision> ⓘ
Get a temporary buffer from the pool.
Sourcepub fn return_temp_buffer(&mut self, buffer: Vec<Precision>)
pub fn return_temp_buffer(&mut self, buffer: Vec<Precision>)
Return a temporary buffer to the pool.
Sourcepub fn storage(&self) -> &CSRStorage
pub fn storage(&self) -> &CSRStorage
Access the underlying CSR storage.
Auto Trait Implementations§
impl !Freeze for OptimizedCSRStorage
impl RefUnwindSafe for OptimizedCSRStorage
impl Send for OptimizedCSRStorage
impl Sync for OptimizedCSRStorage
impl Unpin for OptimizedCSRStorage
impl UnwindSafe for OptimizedCSRStorage
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