Skip to main content

RustBlas

Struct RustBlas 

Source
pub struct RustBlas { /* private fields */ }
Expand description

Pure Rust implementation of BLAS operations.

This implementation provides exact rational arithmetic operations, ensuring correctness for linear programming solvers that require exact solutions.

Implementations§

Source§

impl RustBlas

Source

pub fn new() -> Self

Creates a new RustBlas instance with default configuration.

Source

pub fn with_config(config: BlasConfig) -> Self

Creates a new RustBlas instance with custom configuration.

Trait Implementations§

Source§

impl BlasOps for RustBlas

Source§

fn gemm_into( &self, trans_a: Transpose, trans_b: Transpose, alpha: &Rational64, a: &Matrix, b: &Matrix, beta: &Rational64, c: &mut Matrix, )

General matrix-matrix multiplication. Read more
Source§

fn gemv_into( &self, trans: Transpose, alpha: &Rational64, a: &Matrix, x: &[Rational64], beta: &Rational64, y: &mut [Rational64], )

General matrix-vector multiplication. Read more
Source§

fn trsm( &self, side: Side, uplo: UpLo, trans: Transpose, diag: Diag, alpha: &Rational64, a: &Matrix, b: &mut Matrix, )

Triangular solve with multiple right-hand sides. Read more
Source§

fn trsv( &self, uplo: UpLo, trans: Transpose, diag: Diag, a: &Matrix, b: &mut [Rational64], )

Triangular solve for a single vector. Read more
Source§

fn config(&self) -> &BlasConfig

Returns the configuration for this BLAS implementation.
Source§

fn gemm(&self, a: &Matrix, b: &Matrix) -> Matrix

General matrix-matrix multiplication (convenience method). Read more
Source§

fn gemv(&self, a: &Matrix, x: &[Rational64]) -> Vec<Rational64>

General matrix-vector multiplication (convenience method). Read more
Source§

fn should_use_blas_gemm(&self, m: usize, n: usize, k: usize) -> bool

Checks if BLAS should be used for gemm based on matrix dimensions.
Source§

fn should_use_blas_gemv(&self, m: usize, n: usize) -> bool

Checks if BLAS should be used for gemv based on matrix dimensions.
Source§

fn should_use_blas_trsm(&self, n: usize, nrhs: usize) -> bool

Checks if BLAS should be used for trsm based on matrix dimensions.
Source§

impl Clone for RustBlas

Source§

fn clone(&self) -> RustBlas

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RustBlas

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RustBlas

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.