Title: Run-time automatic instantiation of algorithms using C++ templates

Authors: T. Quintino, H. Deconinck

Addresses: Aerospace and Aeronautics Department, von Karman Institute for Fluid Dynamics, 72 Chaussee de Waterloo, 1640 St-Genesius-Rode, Belgium. ' Aerospace and Aeronautics Department, von Karman Institute for Fluid Dynamics, 72 Chaussee de Waterloo, 1640 St-Genesius-Rode, Belgium

Abstract: Algorithms for scientific computations implemented with template C++ code are both generic and highly efficient. Nevertheless, once compiled, they become statically bound to some functionality. To allow the end-user to change functionality and configure the algorithms with external policies they must retain their generality at run-time. For this purpose, we introduce a technique that uses delayed run-time instantiation of C++ template algorithms. It generates code from a predefined collection of algorithms, configured with policy classes chosen at run-time. The code is then compiled into a dynamically library that is loaded on demand by the end-user into the scientific simulation tool.

Keywords: metaprogramming; high performance; component architecture; C++ templates; simulation environments; delayed run-time instantiation.

DOI: 10.1504/IJCSE.2009.029167

International Journal of Computational Science and Engineering, 2009 Vol.4 No.4, pp.314 - 324

Published online: 08 Nov 2009 *

Full-text access for editors Access for subscribers Purchase this article Comment on this article