Attaining both performance and abstraction is a challenge often faced by software engineers. This is especially the case with mathematical software, where despite the existence of languages such as C++ which enable the usage of numerical abstractions, Fortran remains a popular language due to the high effective of available compilers. The pursuit for high performance numerical code with C++ abstractions has led to the development of linear algebra libraries that use the C++ template system to control aspects of compilation.
This report will detail the investigation into an alternative approach. By delaying evaluation of linear algebra operations until their result is required, it is possible to collect information about these operations that would not have been available at compile time. When the result is required, code is generated and compiled at runtime to perform these operations. This code is more specialised than the code that could be generated at compile time and more amenable to optimisation.
The design and implementation of a prototype library using these techniques will be discussed along with a number of optimisations investigated for improving its performance. A comparison will be carried out with the Matrix Template Library, a state of the art C++ linear algebra library using a benchmark set of linear iterative solvers.
pubs.doc.ic.ac.uk: built & maintained by Ashok Argent-Katwala.