pub unsafe fn tropical_gemm_portable<T: TropicalSemiring>(
m: usize,
n: usize,
k: usize,
a: *const T::Scalar,
lda: usize,
trans_a: Transpose,
b: *const T::Scalar,
ldb: usize,
trans_b: Transpose,
c: *mut T,
ldc: usize,
)Expand description
Tropical GEMM: C = A ⊗ B
Computes C[i,j] = ⊕_k (A[i,k] ⊗ B[k,j])
This is a portable (non-SIMD) implementation using BLIS-style blocking for cache efficiency.
§Parameters
m: Number of rows in A and Cn: Number of columns in B and Ck: Number of columns in A / rows in Ba: Pointer to matrix A datalda: Leading dimension of Atrans_a: Whether A is transposedb: Pointer to matrix B dataldb: Leading dimension of Btrans_b: Whether B is transposedc: Pointer to matrix C data (output)ldc: Leading dimension of C
§Safety
- All pointers must be valid for the specified dimensions
- Memory regions must not overlap inappropriately