Armadillo: a template-based C++ library for linear algebra

Armadillo: библиотека C++ на основе шаблонов для линейной алгебры
Conrad Sanderson, Ryan R. Curtin
2016-06-10

Armadillo C++ libraryGPU-accelerated matrix multiplicationLAPACK integrationlinear algebratemplate metaprogramming
The C++ language is often used for implementing functionality that is performance and/or resource sensitive. While the standard C++ library provides many useful algorithms (such as sorting), in its current form it does not provide direct handling of linear algebra (matrix maths). Armadillo is an open source linear algebra library for the C++ language, aiming towards a good balance between speed and ease of use. Its high-level Application Programming Interface (API) is deliberately similar to the widely Matlab and Octave languages (Eaton et al. 2015), so that mathematical operations can be expressed in a familiar and natural manner. The library is useful for algorithm development directly in C++, or relatively quick conversion of research code into production environments. Armadillo provides efficient objects for vectors, matrices and cubes (third order tensors), as well as over 200 associated functions for manipulating data stored in the objects. Integer, floating point and complex numbers are supported, as well as dense and sparse storage formats. Various matrix factorisations are provided through integration with LAPACK (Demmel 1997), or one of its high performance drop-in replacements such as Intel MKL (Intel 2016) or OpenBLAS (Xianyi, Qian, and Saar 2016). It is also possible to use Armadillo in conjunction with NVBLAS to obtain GPU-accelerated matrix multiplication (NVIDIA 2015). Armadillo is used as a base for other open source projects, such as MLPACK, a C++ library for machine learning and pattern recognition (Curtin et al. 2013), and RcppArmadillo, a bridge between the R language and C++ in order to speed up computations (Eddelbuettel and Sanderson 2014). Armadillo internally employs an expression evaluator based on template metaprogramming techniques (Abrahams and Gurtovoy 2004), to automatically combine several operations in order to increase speed and efficiency. An overview of the internal architecture is given in (Sanderson 2010).
1
Armadillo integrates with LAPACK, Intel MKL, and OpenBLAS for matrix factorizations, and can use NVBLAS for GPU-accelerated matrix multiplication.
2
Armadillo is an open-source C++ linear algebra library designed to balance computational performance with ease of use.
3
Its Matlab- and Octave-like high-level API enables familiar expression of mathematical operations and supports rapid algorithm development and research-code conversion.
4
Template-metaprogramming-based expression evaluation automatically combines operations to improve execution speed and efficiency; the library also underpins projects including MLPACK and RcppArmadillo.
5
The library provides vector, matrix, and third-order tensor objects, over 200 data-manipulation functions, multiple numeric types, and dense or sparse storage.

Armadillo, an open-source template-based C++ linear algebra library

The library’s speed, resource efficiency, usability, and support for matrix, vector, tensor, factorization, dense/sparse, and GPU-accelerated linear-algebra operations

Publication Details
Publication Date
2016-06-10
Journal
Publisher
ISSN
Access Type
Author Information
Authors
Conrad Sanderson
Ryan R. Curtin
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat
Make a presentation
100%