vix.ing · top · new · best · stats · spec

Compile-Time Symbolic Differentiation Using C++ Expression Templates

2017/05/04 by Drosos Kourounis, Kourounis, Drosos, Leonidas Gergidis +7
Computer Science · #FOS: Computer and information sciences #Symbolic Computation (cs.SC) #cs.SC

paper · pdf · doi:10.48550/arxiv.1705.01729

arxiv created 2017/05/04 · arxiv updated 2017/05/05

Abstract

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.

Related