GemmBackend

Trait GemmBackend 

Source
pub trait GemmBackend: Send + Sync {
    // Required methods
    unsafe fn dgemm(
        &self,
        m: usize,
        n: usize,
        k: usize,
        a: *const f64,
        b: *const f64,
        c: *mut f64,
    );
    unsafe fn zgemm(
        &self,
        m: usize,
        n: usize,
        k: usize,
        a: *const Complex<f64>,
        b: *const Complex<f64>,
        c: *mut Complex<f64>,
    );
    fn name(&self) -> &'static str;

    // Provided method
    fn is_ilp64(&self) -> bool { ... }
}
Expand description

GEMM backend trait for runtime dispatch

Required Methods§

Source

unsafe fn dgemm( &self, m: usize, n: usize, k: usize, a: *const f64, b: *const f64, c: *mut f64, )

Matrix multiplication: C = A * B (f64)

§Arguments
  • m, n, k - Matrix dimensions (M x K) * (K x N) = (M x N)
  • a - Pointer to matrix A (row-major, M x K)
  • b - Pointer to matrix B (row-major, K x N)
  • c - Pointer to output matrix C (row-major, M x N) Note: Leading dimension is calculated internally based on row-major to column-major conversion
Source

unsafe fn zgemm( &self, m: usize, n: usize, k: usize, a: *const Complex<f64>, b: *const Complex<f64>, c: *mut Complex<f64>, )

Matrix multiplication: C = A * B (Complex)

§Arguments
  • m, n, k - Matrix dimensions (M x K) * (K x N) = (M x N)
  • a - Pointer to matrix A (row-major, M x K)
  • b - Pointer to matrix B (row-major, K x N)
  • c - Pointer to output matrix C (row-major, M x N) Note: Leading dimension is calculated internally based on row-major to column-major conversion
Source

fn name(&self) -> &'static str

Returns backend name for debugging

Provided Methods§

Source

fn is_ilp64(&self) -> bool

Returns true if this backend uses 64-bit integers (ILP64)

Implementors§