The Matrix Template Library 4

  |   Home   |   Documentation   |  

Many things can be realized on a computer very elegantly and efficiently today thanks to progress in software and programming languages. One thing that cannot be done elegantly on a computer these days is computing. At least not computing fast.

In the Matrix Template Library 4 we aim for a natural mathematical notation without sacrifying performancs. You can write an expression like x = y * z and the library will perform the according operation: scaling a vector, multiplying a sparse matrix with a dense vector or two sparse matrices. Some operations like dense matrix product use tuned BLAS implementation. In parallel, all described operations in this manual are also realized in C++ so that the library can be used without BLAS and is not limited to types supported by BLAS. For short, general applicability is combined with maximal available performance. We developed new techniques to allow for:

  • Unrolling of dynamicly sized data with user-define block and tile sizes;
  • Combining multiple vector assignments in a single statement (and more importingly perform them in one single loop);
  • Storing matrices recursively in a never-before realized generality;
  • Performing operations on recursive and non-recursive matrices recursively;
  • Filling compressed sparse matrices efficiently;
and much more.

The library is still in an early stage of development but we believe that it already allows to write efficient applications.

Features

The Matrix Template Library is:

Generic, Orthogonal, and Comprehensive:
MTL includes a large number of data formats and algorithms, including most popular sparse and dense matrix formats and functionality equivalent to Level 3 BLAS.
Flexible and Extensible:
The MTL4 interface is designed to allow new functionality to be easily incorporated.
High Performance: The first benchmarks with MTL4 on current compilers showed very good performance. A page with performance plots is under construction.
Reliable:
MTL 4 is tested on a regular basis.
Portable:
MTL 4 is written in ANSI C++ and can be compiled and used on any target platform with an ANSI C++ compiler. Currently, compilers known to work on the following platforms are
  • Linux
    • g++ 4.0.1
    • g++ 4.1.1
    • g++ 4.1.2
    • g++ 4.2.0
    • g++ 4.2.1
    • g++ 4.2.2
    • icc 9.0
  • Macintosh
    • g++ 4.0.1
  • Windows
    • VC 8.0 from Visual Studio 2005

Current Release

This is Alpha 1 version of MTL 4. If you would like to be kept informed as new releases of MTL are made available, please subscribe to our announcement list.

MTL 4 is developed from scratch and does not contain source code from earlier versions. However, it is strongly inspired by the design and many implementation details of MTL 2.

Authors

Peter Gottschling and Andrew Lumsdaine.

Contributions

We thank Torsten Höfler for the automatic configuration of BLAS in scons and Bill Greene for his help porting MTL 4 to MS VC 8.0.