elli-gf2
elli-gf2 is a small cross-language GF(2) elimination library with machine-first backends.
It currently provides four exact strategies:
SparseList— human-semantic sparse sorted-list reductionPackedCached— packed-bitset sparse-friendly reductionDenseMacro— bit-packed dense macro-op reductionAuto— heuristic selector between backends
The current idea is simple:
different GF(2) workloads favor different machine-level execution shapes, so
elli-gf2chooses the best backend it knows rather than forcing one universal implementation.
What it can do today
- exact GF(2) elimination
- backend auto-selection
- generated workload benchmarking
- user-supplied sparse matrix files
- Rust library usage
- C ABI usage
- Python usage via
ctypes
Quickstart
Rust library
use ;
let rows = 2048;
let cols = generate_er_sparse;
let summary = reduce;
println!;
println!;
CLI benchmark
Load your own matrix
Matrix file format:
- first line:
rows=<N> - each following non-comment line is one column
- each column line is a whitespace-separated list of row indices
- empty lines count as empty columns
- comment lines begin with
#
Example:
rows=8
0 2 4
1 4
2 3 7
0 7
1 2 5
3 6
Cross-language usage
C ABI
Header:
include/elli_gf2.h
Example:
examples/c_file_smoke.c
Build and run:
Python
Recommended setup:
Example:
=
Current backend behavior
Observed selector behavior on representative families:
er_sparse→DenseMacroldpc_like→PackedCachedbanded→DenseMacro
This is intentional: elli-gf2 is a backend family plus selector, not a one-kernel-fits-all design.
Project layout
elli-gf2/
Cargo.toml
pyproject.toml
README.md
include/
elli_gf2.h
examples/
c_file_smoke.c
c_smoke.c
python_file_smoke.py
python_smoke.py
rust_file_smoke.rs
sample_matrix.txt
python/
elli_gf2/
__init__.py
scripts/
share_smoke.sh
src/
lib.rs
abi.rs
io.rs
bin/
bench_cli.rs
load_cli.rs
smoke.rs
One-command repo smoke test
Status
This is an early research-driven library, but it already provides:
- exact GF(2) elimination
- multiple machine-first backends
- automatic backend selection
- Rust, C, and Python entry points
- file-based input for user-supplied matrices