Fast expression templates

  • Authors:
  • Jochen Härdtlein;Alexander Linke;Christoph Pflaum

  • Affiliations:
  • Department of Computer Science 10, System Simulation Group, University of Erlangen, Erlangen, Germany;Department of Computer Science 10, System Simulation Group, University of Erlangen, Erlangen, Germany;Department of Computer Science 10, System Simulation Group, University of Erlangen, Erlangen, Germany

  • Venue:
  • ICCS'05 Proceedings of the 5th international conference on Computational Science - Volume Part II
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Expression templates (ET) can significantly reduce the implementation effort of mathematical software. For some compilers, especially for those of supercomputers, however, it can be observed that classical ET implementations do not deliver the expected performance. This is because aliasing of pointers in combination with the complicated ET constructs becomes much more difficult. Therefore, we introduced the concept of enumerated variables, which are provided with an additional integer template parameter. Based on this new implementation of ET we obtain a C++ code whose performance is very close to the handcrafted C code. The performance results of these so-called Fast ET are presented for the Hitachi SR8000 supercomputer and the NEC SX6, both with automatic vectorization and parallelization. Additionally we studied the combination of Fast ET and OpenMP on a high performance Opteron cluster.