Contributing¶
Contributions are welcome — new optimization levels, tutorials, examples, tests, docs, or bug fixes all help.
Good ways to contribute¶
- Add an optimization level —
src/matmat/optim15.corsrc/matvec/optim15.cplus its math note underdocs/research/<family>/optim15.md. - Improve an existing level — performance, clarity, or a portable
sse_compat.hso the x86 matmat levels build everywhere. - Add tutorials — new step-by-step guides under
docs/tutorials/. - Extend the tests — more sizes, edge cases, fringe paths.
- 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 asoptim<N>.cin the matchingsrc/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.