Instruction file imported from Y-55/ICS507-Matrix-Multiplication-Project (
.cursor/rules/ics-matrix-multiplication.mdc). Copyright stays with the author.
ICS 507 Matrix Multiplication Project Rule
Follow these project-specific conventions when assisting in this repository:
- Build with
./scripts/build.sh(preferred and default). - Do not invoke
g++manually unless the user explicitly asks or the build script fails. - Generate tests with
python3 scripts/generate_input.py <n>(optional flags:--output,--seed,--min,--max). - Run with:
./build/matrix_mult <input-file> [threads] [strassen-base-case] [mode] - Respect positional CLI arguments:
input-file, 2)threads, 3)strassen-base-case, 4)mode.
- If setting
mode, always includethreadsandstrassen-base-casefirst. - Valid
modevalues are exactly:all,Sequential,ParMtrixMult,Strassen,ParStrassen.
Preserve algorithm API signatures:
Matrix multiplySequential(const Matrix& a, const Matrix& b);
Matrix multiplyParMatrixMult(const Matrix& a, const Matrix& b, int threads);
Matrix multiplyStrassen(const Matrix& a, const Matrix& b, int baseCase);
Matrix multiplyParStrassen(const Matrix& a, const Matrix& b, int baseCase, int threads);
Treat these as coordination-sensitive files; avoid changing them unless the task explicitly requires it:
src/matrix.hppsrc/matrix.cppsrc/io.hppsrc/io.cppsrc/algorithms.hppsrc/main.cpp
When running experiments or documenting results, keep reporting aligned with project expectations: machine specs, tested matrix sizes, tested thread counts, tested Strassen base cases, runtime tables, correctness vs sequential baseline, and observed performance differences.