#geometry #vector-math #simd-vector #math #simd #vector

geometric_algebra

Generate(d) custom libraries for geometric algebras

7 releases

0.3.0 Sep 20, 2023
0.2.1 Nov 26, 2022
0.2.0 Oct 16, 2022
0.1.3 Jun 19, 2021
0.1.2 Apr 24, 2021

#2366 in Algorithms


Used in 2 crates

MIT license

3.5MB
54K SLoC

Rust 37K SLoC // 0.0% comments GLSL 16K SLoC // 0.0% comments

actions Docs crates.io

About

This repository allows you to describe geometric algebras with 1 to 16 generator elements and generate SIMD-ready, dependency-less libraries for them. It also comes with a set of prebuilt projective geometric algebras in 1D, 2D and 3D which are elliptic, parabolic (euclidian) or hyperbolic.

Architecture

  • DSL Parser: See examples
  • Algebra: Generates the multiplication tables
  • Compiler: Constructs an AST from the multiplication tables
  • Optimizer: Simplifies the AST
  • Legalizer: Inserts missing expressions in the AST
  • Emitter: Serializes the AST to source code

Supported SIMD ISAs

  • x86, x86_64: sse2
  • arm, aarch64: neon
  • wasm32: simd128

No runtime deps