An active linear algebra library using delayed evaluation and runtime code generation. Russell, F. P; Mellor, M. R; Kelly, P. H.; and Beckmann, O. Proceedings of the Second International Workshop on Library-Centric Software Design (LCSD’06), 2006.
abstract   bibtex   
Active libraries can be defined as libraries which play an active part in the compilation (in particular, the optimisation) of their client code. This paper explores the idea of delay- ing evaluation of expressions built using library calls, then generating code at runtime for the particular compositions that occur. We explore this idea with a dense linear algebra library for C++. The key optimisations in this context are loop fusion and array contraction. Our library automatically fuses loops, identifies unnecessary intermediate temporaries, and contracts temporary arrays to scalars. Performance is evaluated using a benchmark suite of linear solvers from ITL (the Iterative Template Li- brary), and is compared with MTL (the Matrix Template Li- brary). Excluding runtime compilation overheads (caching means they occur only on the first iteration), for larger matrix sizes, performance matches or exceeds MTL – and in some cases is more than 60% faster.
@article{ russell2006active,
  title = {An active linear algebra library using delayed
                 evaluation and runtime code generation},
  author = {Francis P Russell and Michael R Mellor and Paul HJ
                 Kelly and Olav Beckmann},
  journal = {Proceedings of the Second International Workshop on
                 Library-Centric Software Design (LCSD’06)},
  pages = {5--13},
  year = {2006},
  abstract = {Active libraries can be defined as libraries which
                 play an active part in the compilation (in particular,
                 the optimisation) of their client code. This paper
                 explores the idea of delay- ing evaluation of
                 expressions built using library calls, then generating
                 code at runtime for the particular compositions that
                 occur. We explore this idea with a dense linear algebra
                 library for C++. The key optimisations in this context
                 are loop fusion and array contraction. Our library
                 automatically fuses loops, identifies unnecessary
                 intermediate temporaries, and contracts temporary
                 arrays to scalars. Performance is evaluated using a
                 benchmark suite of linear solvers from ITL (the
                 Iterative Template Li- brary), and is compared with MTL
                 (the Matrix Template Li- brary). Excluding runtime
                 compilation overheads (caching means they occur only on
                 the first iteration), for larger matrix sizes,
                 performance matches or exceeds MTL – and in some
                 cases is more than 60% faster.}
}
Downloads: 0