Mixed-precision iterative methods. mp-iterative composes two header-only libraries — MTL5 for linear algebra and Universal for parameterized number systems — to explore stationary and Krylov iterative solvers under custom arithmetic (half precision, posits, ...).
MTL5 deliberately has no dependency on Universal: it is the general linear-algebra layer. mp-iterative is the integration layer where MTL5's algorithms meet Universal's number types.
# Dependencies (MTL5 + Universal) are pulled automatically via FetchContent.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
# Run the smoke test
ctest --test-dir build --output-on-failure
# Run the Jacobi precision demo (optional args: problem size, iterations)
./build/applications/stationary/jacobi_precision/jacobi_precision
# Measurement benchmarks are OFF by default; enable and run a sweep
cmake -B build -DMPITERATIVE_BUILD_BENCHMARKS=ON && cmake --build build -j
./build/benchmarks/stationary/benchmark_sor 3d 12 # 1d|2d|3d, grid m; CSV on stdout
# ...or on a real SPD matrix from the SuiteSparse collection (not committed)
scripts/fetch_matrices.sh
./build/benchmarks/stationary/benchmark_gauss_seidel --matrix data/gr_30_30/gr_30_30.mtxUsing local checkouts instead of fetching from GitHub:
cmake -B build \
-DFETCHCONTENT_SOURCE_DIR_MTL5=../mtl5 \
-DFETCHCONTENT_SOURCE_DIR_UNIVERSAL=../universalThe repo is organized by iterative-method category, in order: stationary
methods (Jacobi, Gauss-Seidel, SOR), Krylov subspace methods (CG, BiCGSTAB,
GMRES, ...), and multigrid. Three parallel trees serve different purposes:
tests/ answer "does it work", applications/ demonstrate, benchmarks/
measure.
applications/
stationary/{jacobi,gauss_seidel,sor}_precision/ # residual per number type x strategy
benchmarks/ # measurement drivers (MPITERATIVE_BUILD_BENCHMARKS=ON)
stationary/ # benchmark_{jacobi,gauss_seidel,sor}: CSV sweeps
include/sw/mp_iterative/ # shared composition-layer headers
accumulator_strategies.hpp # naive/fma/quire capability gating
benchmark/ # harness: problems, matrix_source, reference, metrics, runner
scripts/fetch_matrices.sh # fetch SPD SuiteSparse matrices into data/ (not committed)
tests/
stationary/ # Jacobi/GS/SOR: quire + strategy tests
krylov/ # CG/BiCGSTAB/GMRES with quire accumulation
benchmark/ # harness unit tests (+ data/ Matrix Market fixture)
multigrid/ # (no tests yet)
docs/roadmap.md # milestones and known integration work
docs/benchmarks-stationary.md # first mixed-precision characterization report
MIT — see LICENSE.