Gaigen 2:: a geometric algebra implementation generator

Geometric Algebra (GA) is an algebra that encodes geometry much better than standard techniques, which are mainly based on linear algebra with various extensions. Compared to standard techniques, GA has clearer semantics and a richer, more consistent language. This expresses itself, among others, in a much greater genericity of functions over the algebra. Exploiting this genericity efficiently is a problem that can be solved through generative programming.This paper describes our Geometric Algebra Implementation Generator Gaigen 2. Gaigen 2 synthesizes highly efficient GA implementations from the specification of the algebra. Functions over such algebras can be defined in a high-level coordinate-free domain-specific language, and Gaigen 2 transforms these functions into low-level coordinate-based code. This code can be emitted in any target language through a custom back-end. Benchmarks of our implementation show that the combination of GA and Gaigen 2 can rival the performance of standard geometry techniques, despite the greater abstraction and genericity of GA.To obtain this high performance, Gaigen 2 must adapt the generated code to the program that links to it. This is done via a profiling feedback loop. While running, the generated code makes a connection to the code generator. The generated code sends information about functions that should be optimized. The code generator registers this information and sends back new type information. After the program terminates, the code is regenerated according to the recorded profile. This profiling feedback technique may also be useful to implement other types of algebras.

[1]  Deepak Tolani Analytic inverse kinematics techniques for anthropometric limbs , 1998 .

[2]  Stephen Mann,et al.  Geometric Algebra: A Computational Framework for Geometrical Applications (Part 2) , 2002, IEEE Computer Graphics and Applications.

[3]  David Hestenes,et al.  Generalized homogeneous coordinates for computational geometry , 2001 .

[4]  Jack J. Dongarra,et al.  Automated empirical optimizations of software and the ATLAS project , 2001, Parallel Comput..

[5]  Stephen Mann,et al.  Computing singularities of 3D vector fields with geometric algebra , 2002, IEEE Visualization, 2002. VIS 2002..

[6]  C. Doran,et al.  Geometric Algebra for Physicists , 2003 .

[7]  Joan Lasenby,et al.  Using Geometric Algebra for Optical Motion Capture , 2001 .

[8]  Leo Dorst,et al.  Modeling 3D Euclidean Geometry , 2003, IEEE Computer Graphics and Applications.

[9]  Leo Dorst,et al.  The making of GABLE: a geometric algebra learning environment in Matlab , 2001 .

[10]  Leo Dorst,et al.  Performance and elegance of five models of 3 D Euclidean geometry in a ray tracing application ∗ , 2003 .

[11]  Chris Doran,et al.  PHYSICAL APPLICATIONS OF GEOMETRIC ALGEBRA , 2006 .

[12]  Franz Franchetti,et al.  SPIRAL: Code Generation for DSP Transforms , 2005, Proceedings of the IEEE.

[13]  Norman I. Badler,et al.  Real-Time Inverse Kinematics Techniques for Anthropomorphic Limbs , 2000, Graph. Model..

[14]  Eduardo Bayro-Corrochano,et al.  Advanced Geometric Approach for Graphics and Visual Guided Robot Object Manipulation , 2005, Proceedings of the 2005 IEEE International Conference on Robotics and Automation.

[15]  Yuefan Deng,et al.  New trends in high performance computing , 2001, Parallel Computing.

[16]  Leo Dorst,et al.  An Algebraic Foundation for Object-Oriented Euclidean Geometry (Innovative Teaching of Mathematics with Geometric Algebra) , 2004 .