Site is under construction (June 2011) News * (03rd June 2011) Website under construction
Blitz++ is a (LGPLv3+) licensed meta-template library for array manipulation in C++ with a speed comparable to Fortran implementations, while preserving an object-oriented interface. These results are being obtained not through better optimizing compilers, preprocessors, or language extensions, but through the use of template techniques. By using templates cleverly, optimizations such as loop fusion, unrolling, tiling, and algorithm specialization can be performed automatically at compile time. Expression template techniques allows to to incorporate new and useful features - independent of compiler. Some examples of such extensions are flexible storage formats, tensor notation and index placeholders. Scientific computing requires domain-specific abstractions, such as arrays, matrices, and tensors. Building such abstractions into a language (such as arrays in Fortran 90) can result in fast code, but may also be limiting: such abstractions are hard to extend or modify, and economics restrict the number of features which may be included in a commercial compiler. An alternative is to use languages which allow library developers to create their own abstractions. Many problem domains which have been addressed in the past by custom languages (interval arithmetic, sparse arrays, adaptive mesh refinement) have now been successfully tackled by C++ libraries. Unfortunately, compilers have difficulty optimizing such libraries, because they lack semantic knowledge of the abstractions: instead of seeing sparse array operations, they see pointers and loops. The solution may be to move high-level optimizations out of compilers and into libraries. The Blitz++ library demonstrates how this may be done in C++. The mechanisms are somewhat crude, but the results are appealing: Blitz++ arrays offer functionality and efficiency competitive with Fortran 90, but without any language extensions. The Blitz++ library is able to parse and analyze array expressions at compile time, and performs loop transformations which have until now been the responsibility of optimizing compilers. Please see examples.
Supports Array up to 11-dimensions
Matrix, Tensors and Vectors
Arbitrary ordering including C-style and Fortran-style