numerics 0.1.0
Loading...
Searching...
No Matches
SIMD Kernel Implementation Note

The SIMD backend contains explicit AVX/NEON dense matrix kernels and fallback paths for platforms without those instruction sets.

Public Entry Point

void matmul(const Matrix &A, const Matrix &B, Matrix &C, Backend b=default_backend)
C = A * B.
Definition matrix.cpp:20

The dispatch path is:

num::matmul
-> num::backends::opt::matmul

Implementation Location

src/core/backends/opt/matrix.cpp
src/core/backends/simd/impl.hpp

The optimized backend is private to the library. Users select it with the Backend enum rather than including implementation headers.

Kernel Role

The SIMD path is the custom dense-kernel counterpart to BLAS:

num::matmul(A, B, C, num::Backend::simd); // custom SIMD path
num::matmul(A, B, C, num::Backend::blas); // system BLAS path

Use it for:

  • benchmarking the custom kernel against BLAS,
  • validating the blocked/register-blocked implementations,
  • running without an external BLAS.

FFT SIMD Backend

The spectral module has independent FFT backends:

Those are separate from the dense matrix Backend::simd path.

Benchmark

./build/benchmarks/numerics_bench --benchmark_filter="BM_Matmul|BM_FFT"