Skip to content

Contributing

Contributions are welcome — new optimization levels, tutorials, examples, tests, docs, or bug fixes all help.

Good ways to contribute

  1. Add an optimization levelsrc/matmat/optim15.c or src/matvec/optim15.c plus its math note under docs/research/<family>/optim15.md.
  2. Improve an existing level — performance, clarity, or a portable sse_compat.h so the x86 matmat levels build everywhere.
  3. Add tutorials — new step-by-step guides under docs/tutorials/.
  4. Extend the tests — more sizes, edge cases, fringe paths.
  5. Report bugs / request features — open an issue with your compiler, platform, and a minimal repro.

Guidelines

  • Use column-major storage (A(i,j) = a[j*lda + i]).
  • Keep each new level self-contained (its own main).
  • Match the naming: functions declared in include/gemm.h / include/matvec.h, levels as optim<N>.c in the matching src/ folder.
  • Document the math for any new level in docs/research/....
  • Keep the build green on at least macOS or Linux (ideally all three OSes): make && make test.
  • Keep code C99 and reasonably warning-clean (-Wall -Wextra).

Workflow

git clone <your-fork-url> matrix
cd matrix
make
make test
# ... make changes ...
make clean && make && make test

About the x86 SSE levels

src/matmat/optim11–14 use x86 SSE intrinsics and #include "sse_compat.h", which is not provided here. These are optional. A great contribution would be a portable sse_compat.h plus portable fallbacks so they build on Apple Silicon too.