Metaprogramming Applied to Numerical Problems
Abstract
From the discovery that the template system of C++ forms a Turing complete language in 1994, a programming technique called Template Metaprogramming has emerged that allows for the creation of faster, more generic and better code. Here, we apply Template Metaprogramming to implement a generic Runge-Kutta scheme that can be used to numerically solve ordinary differential equations. We show that using Template Metaprogramming results in a significantly improved performance compared to a classical implementation.
- Publication:
-
Numerical Analysis and Applied Mathematics ICNAAM 2011: International Conference on Numerical Analysis and Applied Mathematics
- Pub Date:
- September 2011
- DOI:
- 10.1063/1.3637933
- arXiv:
- arXiv:1110.3233
- Bibcode:
- 2011AIPC.1389.1582M
- Keywords:
-
- programming languages;
- computer software;
- subroutines;
- differential equations;
- 07.05.Bx;
- 07.05.Hd;
- 07.05.Kf;
- 02.30.Hq;
- Computer systems: hardware operating systems computer languages and utilities;
- Data acquisition: hardware and software;
- Data analysis: algorithms and implementation;
- data management;
- Ordinary differential equations;
- Physics - Computational Physics;
- Computer Science - Mathematical Software
- E-Print:
- 4 pages,2 figures,3 listings