pub struct BlasConfig {
pub gemm_threshold: usize,
pub gemv_threshold: usize,
pub trsm_threshold: usize,
pub block_size: usize,
}Expand description
Configuration for BLAS operation thresholds.
Controls when to use optimized BLAS routines vs. inline operations. For small matrices, inline operations may be faster due to reduced overhead.
Fields§
§gemm_threshold: usizeThreshold for matrix-matrix multiplication (gemm). Use BLAS when m * n * k > this threshold.
gemv_threshold: usizeThreshold for matrix-vector multiplication (gemv). Use BLAS when m * n > this threshold.
trsm_threshold: usizeThreshold for triangular solve (trsm). Use BLAS when n * nrhs > this threshold.
block_size: usizeBlock size for blocked operations.
Implementations§
Source§impl BlasConfig
impl BlasConfig
Sourcepub fn new(
gemm_threshold: usize,
gemv_threshold: usize,
trsm_threshold: usize,
) -> Self
pub fn new( gemm_threshold: usize, gemv_threshold: usize, trsm_threshold: usize, ) -> Self
Creates a new configuration with custom thresholds.
Sourcepub fn small_matrix() -> Self
pub fn small_matrix() -> Self
Configuration optimized for small matrices (always use inline).
Sourcepub fn large_matrix() -> Self
pub fn large_matrix() -> Self
Configuration optimized for large matrices (always use BLAS when available).
Trait Implementations§
Source§impl Clone for BlasConfig
impl Clone for BlasConfig
Source§fn clone(&self) -> BlasConfig
fn clone(&self) -> BlasConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlasConfig
impl Debug for BlasConfig
Auto Trait Implementations§
impl Freeze for BlasConfig
impl RefUnwindSafe for BlasConfig
impl Send for BlasConfig
impl Sync for BlasConfig
impl Unpin for BlasConfig
impl UnsafeUnpin for BlasConfig
impl UnwindSafe for BlasConfig
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