Skip to content

Quickstart

Get the project building and running in about a minute.

1. Prerequisites

  • A C99 (or later) compiler — gcc, clang, or MSVC.
  • make (optional; you can run gcc directly).
  • No external libraries required.

2. Clone & build

git clone https://github.com/ajeetkbhardwaj/matrix.git
cd matrix
make

This builds every runnable optimization level plus the reference drivers into build/.

3. Run the test suite

make test

4. Run an optimization level

Each level is a runnable program that times the kernel and reports GFLOPS:

./build/matvec5
# Optimization 5 : Dot product took 0.0001234 seconds GFLOPS : 6.48

./build/matmat8

5. Build manually (no make)

# matvec level 5
gcc -O2 -I include -o build/matvec5 src/matvec/optim5.c

# matmul reference driver
gcc -O2 -I include -o build/ref_matmul gemm.c src/matmul.c

6. Preview the docs (optional)

pip install mkdocs mkdocs-material
mkdocs serve        # http://127.0.0.1:8000

Next steps

Read how to interpret GFLOPS and the roofline, or dive straight into the matmul ladder.