Skip to content

SuperInstance/eisenstein-cuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eisenstein-cuda — Eisenstein Integer Constraint Math for CUDA/C

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.

Why Eisenstein

  • 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)

What's Included

  • include/eisenstein.cuh — drop-in header, ~200 lines
  • test_eisenstein.cu — CPU + GPU test suite
  • Batch constraint check kernel (CUDA)
  • Batch XOR dual-path kernel (CUDA)

Quick Start

nvcc -O3 -arch=sm_86 -I include test_eisenstein.cu -o test_eisenstein && ./test_eisenstein

Works On

  • 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

Composable With

  • 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

License

Apache 2.0

About

Eisenstein integer constraint math for CUDA/C — norm, multiply, conjugate, disk check, XOR dual-path anomaly detection

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages