Advanced expression templates programming (original) (raw)
Abstract
Expression Templates (ET) are a powerful tool for development of user-friendly numerical libraries. By this concept and by operator overloading in C++, numerical algorithms can be implemented in a mathematical notation without decreasing the performance in comparison to optimized C or FORTRAN codes. In this paper, we present new Expression Template techniques. First, we explain the concept of “Easy Expression Templates”, which are easier to implement than classical ET. Then, we explain “Fast Expression Templates”. This concept leads to an optimal performance even on special architectures like vector machines. Furthermore, concepts for storing expressions and code optimizing are presented. In order to verify the usability of these programming techniques in real applications, we discuss a template library which calculates local stiffness matrices arising from Finite Element discretizations.
Similar content being viewed by others
References
- Basetti, F., Davis, K., Quinlan, D.: C++ Expression Templates Performance Issues in Scientific Computing. CRPC-TR97705-S (1997)
- Ciarlet, P.G.: The Finite Element Method for Elliptic Problems. SIAM (2002)
- Haney S.: Beating the abstraction penalty in C++ using expression templates. In: Dubois, P. (eds) Computers in Physics, vol 10, No. 6, pp. 552–557. American Institute Of Physics, USA (1996)
Google Scholar - Haney, S., Crotinger, J., Karmesin, S., Smith, S.: PETE: the portable expression templates engine. Dr. Dobb’s J. Softw. Tools, 24(10):88, pp. 90–92, 94–95 (1998)
- Härdtlein, J., Linke, A., Pflaum, C.: Fast expression templates. In: Suneram, V.S., Albada, G.D.V., Sloot, P.M.A., Dongarra, J.J. (eds.), Computational Science—ICCS 2005, volume 3515 of LNCS. Springer, ISBN-10 3-540-26043-9, ISBN-13 978-3-540-26043-1, ISSN 03-2-9743. pp. 1055–1063 (2005)
- Härdtlein, J., Pflaum, C.: Efficient and user-friendly computation of local stiffness matrices. In: Hülsemann, F., Kowarschik, M., Rüde, U. (eds.), 18th Symposium Simulationstechnique ASIM 2005 Proceedings, volume 15 of Frontiers in Simulation. ASIM, SCS Publishing House, ISBN 3-936150-41. pp. 748–753 (2005)
- Kirby, R.C., Logg, A.: Efficient compilation of a class of variational forms. ACM Trans. Math. Softw. 33(3), Article 17 (2007)
Google Scholar - Los Alamos National Laboratories. POOMA. http://www.acl.lanl.gov/pooma
- Linke, A., Pflaum, C.: Fast expression templates for the SR 8000 supercomputer. In: Stiegritz, J., Davis K. (eds.) Proceedings of the Workshop on Parallel/High-Performance Object-Oriented Scientific Computing (POOSC). Technical Report, FZJ-ZAM-IB-2003-09, (2003)
- Pflaum C.: Expression templates for partial differential equations. Comput. Visual. Sci. 4, 1–8 (2001)
Article MATH Google Scholar - High Performance Center Stuttgart: The NEC SX-6 Cluster Documentation. http://www.hlrs.de/hw-access/platforms/sx6/user_doc (2005)
- Veldhuizen T.: Expression templates. C++ Report 7(5), 26–31 (1995)
Google Scholar - Veldhuizen, T.: Techniques for Scientific C++. Indiana University Computer Science Technical Report No 542, Version 0.4 (2000)
- Veldhuizen, T.: Blitz++ User’s Guide—Version 1.2. http://oonumerics.org/blitz/manual/blitz.html. (2001)
- Vandevoorde D., Josuttis N.: C++ Templates—The Complete Guide. Addison-Wesley, Reading (2003)
Google Scholar - Walter, J., Koch, M.: uBLAS, Boost C++ Libraries - Basic Linear Algebra. http://www.boost.org/libs/numeric/ublas/doc/index.htm. (2002)
- Wolters C.H., Köstler H., Möller C., Härdtlein J., Grasedyck L., Hackbusch W.: Numerical mathematics of the subtraction method for the modeling of a current dipole in EEG source reconstruction using finite element head models. SIAM J. Sci. Comput 30(1), 24–45 (2007)
Article MATH MathSciNet Google Scholar
Author information
Authors and Affiliations
- Department of Computer Science 10, University of Erlangen-Nuremberg, Cauerstr. 6, 91058, Erlangen, Germany
J. Härdtlein & C. Pflaum - Weierstrass Institute for Applied Analysis and Stochastics, Mohrenstr. 39, 10117, Berlin, Germany
A. Linke - Institute for Biomagnetism and Biosignalanalysis, University of Muenster, 48149, Muenster, Germany
C. H. Wolters
Authors
- J. Härdtlein
- C. Pflaum
- A. Linke
- C. H. Wolters
Corresponding author
Correspondence toC. Pflaum.
Additional information
Communicated by G. Wittum.
Rights and permissions
About this article
Cite this article
Härdtlein, J., Pflaum, C., Linke, A. et al. Advanced expression templates programming.Comput. Visual Sci. 13, 59 (2010). https://doi.org/10.1007/s00791-009-0128-2
- Received: 04 December 2006
- Accepted: 21 May 2008
- Published: 16 November 2009
- DOI: https://doi.org/10.1007/s00791-009-0128-2