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§
Sourceunsafe fn dgemm(
&self,
m: usize,
n: usize,
k: usize,
a: *const f64,
b: *const f64,
c: *mut f64,
)
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
Sourceunsafe fn zgemm(
&self,
m: usize,
n: usize,
k: usize,
a: *const Complex<f64>,
b: *const Complex<f64>,
c: *mut Complex<f64>,
)
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