tropical_gemm_portable

Function tropical_gemm_portable 

Source
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 C
  • n: Number of columns in B and C
  • k: Number of columns in A / rows in B
  • a: Pointer to matrix A data
  • lda: Leading dimension of A
  • trans_a: Whether A is transposed
  • b: Pointer to matrix B data
  • ldb: Leading dimension of B
  • trans_b: Whether B is transposed
  • c: 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