One header. Works in CUDA kernels. Works on bare-metal ESP32. Zero dependencies.
Eisenstein integer constraint checking: norm, multiply, conjugate, disk check, constraint check with margin, XOR dual-path anomaly detection.
- Exact integer arithmetic (no float drift)
- Hexagonal symmetry (6-fold rotation)
- 6.8× denser than Pythagorean triples
- Norm N(a,b) = a²-ab+b² is always non-negative
- Closed under multiplication (ring property)
include/eisenstein.cuh— drop-in header, ~200 linestest_eisenstein.cu— CPU + GPU test suite- Batch constraint check kernel (CUDA)
- Batch XOR dual-path kernel (CUDA)
nvcc -O3 -arch=sm_86 -I include test_eisenstein.cu -o test_eisenstein && ./test_eisenstein
- NVIDIA GPUs (CUDA 11.5+, sm_86/sm_89)
- CPUs (host functions)
- ESP32, STM32, any C99 compiler (use
#include "eisenstein.cuh"without CUDA) - FPGA soft processors
- fleet-constraint-kernel: uses this header for constraint math
- guard2mask-gpu: uses this for Eisenstein workspace bounds
- flux-vm-gpu: uses EIS_CHECK/EIS_NORM opcodes from this
- snap-lut-eisenstein: FPGA snap tables using same Eisenstein math
- fleet-proto-rs: Rust constraint types that mirror these C types
Apache 2.0