Expression Templates in Ada

  • Authors:
  • Alexandre Duret-Lutz

  • Affiliations:
  • -

  • Venue:
  • Ada Europe '01 Proceedings of the 6th Ade-Europe International Conference Leuven on Reliable Software Technologies
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

High-order matrix or vector expressions tend to be penalized by the use of huge temporary variables. Expression templates is a C++ technique which can be used to avoid these temporaries, in a way that is transparent to the user. We present an Ada adaptation of this technique which - while not transparent - addresses the same efficiency issue as the original. We make intensive use of the signature idiom to combine packages together, and discuss its importance in generic programming. Finally, we express some concerns about generic programming in Ada.