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.
['Tiago Quintino', 'Herman Deconinck']
Run-time automatic instantiation of algorithms using C++ templates