Bojan Nikolic: Fast numerical computation in C++: Expression Templates
Channel: CppNow
Date: 2013-10-29

Expression templates are an important feature of C++ that enables very significant optimisation of numerical calculations. They are used in Boost's uBLAS library as well as other well-known numerical C++ libraries (e.g., the pioneering Blitz++, Armadillo). Yet, none of the "gold standard" numerical libraries (e.g., ATLAS and FFTW) are written in C++. Why not? In the first part of the talk I will review the challenge of optimising numerical computations, how expression templates are used to do this and the fundamental factors which limit what expression templates can achieve in practice.

In the second part of the talk I will present how some often-used numerical computation frameworks are able to achieve performance beyond that which is typically achieved by C++-only libraries. The critical features of these libraries are: complex code generation, adapting to the precise hardware they are run on, and ability to benchmark a sizable number of different implementations before selecting the one to be run.

Finally, I will discuss how one can improve C++ performance beyond that offered by expression templates on their own. I will present a new, prototype, framework demonstrating how this is done in practice.
---

*--*

---