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

  • Authors:
  • T. Quintino;H. Deconinck

  • Affiliations:
  • 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

  • Venue:
  • International Journal of Computational Science and Engineering
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.