exmat - The Expression Template Matrix Library |
The goal of exmat is to provide an easy to use, yet very efficient matrix library. Overloaded operators allow to write algebraic expressions like v=A*u +u in C++, instead of bunch of boring functions. This syntactic sugar comes with runtime cost, one way to eliminate the overhead is to use Expression Templates (ET).
Using ET, we can further boost up the efficient by analyzing the expression at compile time and generate the most efficient code for that expression
This library is:
The element type of the matrix is generic, it can be any type of the C++ build-in type like int, float, double.
Other types like complex or arbitrary precision type can also be used as the element type.
Matrix expression can be make up of any element type, that is, an integer matrix can be added to a float matrix and then assign to a double matrix.
You can write matrix expression using +, -, *, / operators as usual mathematic notation.
There are 3 levels of error checking policy you can apply on each class of matrix.
Specialized, hand made comparable optimized code can be generated for different expressions.
SIMD code can be used on small size matrix.
Provide a interface to use BLAS as the math kernel, which is highly optimized for out of cache operations.
This library have been compiled and tested under:
Due to this compiler didn't support partial template specialization and template template parameters, some functionality of exmat is not supported for this compiler.
The Microsoft Visual C++ Toolkit 2003 (free version of .net 2003 C++ compiler) is available for download.
Tested with version 3.4.1 using MinGW 3.1.0-1, 3.2.2-5 under Red Hat Linux 9, version 3.3.1 under Cygwin.
Other versions may or may not work properly.
Tested under win32 platform only.
Books / Articles
Modern C++ Design
Generic Programming and Design Patterns AppliedGenerative Programming
Methods, Tools, and Application
Tools
CodeplayVectorC
Optimizing C/C++ Compilers for games, graphics and audio software.distcc
A fast, free distributed C/C++ compiler
*Ricky Lung Man Tat email
Technetium email
Send me an email if you find exmat useful, or if you want to contribute to exmat