pub struct TropicalGemm<T: TropicalSemiring> { /* private fields */ }Expand description
Builder for configuring tropical GEMM operations.
Provides a fluent API for setting options like transposition, alpha/beta scaling, and output preferences.
§Example
use tropical_gemm::{TropicalGemm, TropicalMaxPlus, TropicalSemiring};
let a = vec![1.0f32; 6]; // 2x3
let b = vec![1.0f32; 6]; // 3x2
let mut c = vec![TropicalMaxPlus::tropical_zero(); 4]; // 2x2
TropicalGemm::<TropicalMaxPlus<f32>>::new(2, 2, 3)
.execute(&a, 3, &b, 2, &mut c, 2);Implementations§
Source§impl<T: TropicalSemiring + KernelDispatch> TropicalGemm<T>
impl<T: TropicalSemiring + KernelDispatch> TropicalGemm<T>
Sourcepub fn execute(
self,
a: &[T::Scalar],
lda: usize,
b: &[T::Scalar],
ldb: usize,
c: &mut [T],
ldc: usize,
)
pub fn execute( self, a: &[T::Scalar], lda: usize, b: &[T::Scalar], ldb: usize, c: &mut [T], ldc: usize, )
Execute the GEMM operation.
§Arguments
a: Matrix A datalda: Leading dimension of Ab: Matrix B dataldb: Leading dimension of Bc: Output matrix C (must be pre-allocated)ldc: Leading dimension of C
Auto Trait Implementations§
impl<T> Freeze for TropicalGemm<T>
impl<T> RefUnwindSafe for TropicalGemm<T>where
T: RefUnwindSafe,
impl<T> Send for TropicalGemm<T>
impl<T> Sync for TropicalGemm<T>
impl<T> Unpin for TropicalGemm<T>where
T: Unpin,
impl<T> UnwindSafe for TropicalGemm<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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more