Compile-Time Symbolic Differentiation Using C++ Expression Templates

05/04/2017
by   Drosos Kourounis, et al.
0

Template metaprogramming is a popular technique for implementing compile time mechanisms for numerical computing. We demonstrate how expression templates can be used for compile time symbolic differentiation of algebraic expressions in C++ computer programs. Given a positive integer N and an algebraic function of multiple variables, the compiler generates executable code for the Nth partial derivatives of the function. Compile-time simplification of the derivative expressions is achieved using recursive templates. A detailed analysis indicates that current C++ compiler technology is already sufficient for practical use of our results, and highlights a number of issues where further improvements may be desirable.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/05/2019

On the Equivalence of Forward Mode Automatic Differentiation and Symbolic Differentiation

We show that forward mode automatic differentiation and symbolic differe...
research
04/24/2018

Automatic generation of CUDA code performing tensor manipulations using C++ expression templates

We present a C++ library, TLoops, which uses a hierarchy of expression t...
research
09/09/2022

Compiler Testing using Template Java Programs

We present JAttack, a framework that enables template-based testing for ...
research
02/22/2023

SymX: Energy-based Simulation from Symbolic Expressions

Optimization time integrators have proven to be effective at solving com...
research
08/08/2020

dxo: A System for Relational Algebra and Differentiation

We present dxo, a relational system for algebra and differentiation, wri...
research
02/06/2021

FastAD: Expression Template-Based C++ Library for Fast and Memory-Efficient Automatic Differentiation

Automatic differentiation is a set of techniques to efficiently and accu...
research
10/25/2017

Performance Portability Strategies for Grid C++ Expression Templates

One of the key requirements for the Lattice QCD Application Development ...

Please sign up or login with your details

Forgot password? Click here to reset