Armadillo

Armadillo

C++ Linear Algebra and Scientific Computing Library

Description

A matrix expression that takes three lines in Matlab turns into loops and manual memory handling in C++, and an algorithm that worked in a prototype gets rewritten for production. Armadillo exists to take the sting out of that step: it gives C++ a syntax that looks a lot like Matlab, with matrices, vectors and cubes as first-class types.

Behind it sits an expression template engine that fuses chained operations into a single pass, so no temporary matrices pile up; it reads like a script and runs close to hand-written code, with decompositions and solvers delegated to LAPACK or drop-ins such as MKL and OpenBLAS.

Features



Matlab-like syntax: High-level classes and functions that look close to Matlab, so research code converts to production with few changes.

Vectors, matrices and cubes: Dense and sparse storage, with integer, floating point and complex numbers supported.

Automatic expression fusion: Template meta-programming combines neighbouring operations into one step, cutting temporaries and memory traffic.

Matrix decompositions: Eigen, SVD, Cholesky and more via LAPACK or its fast replacements, plus solvers for linear systems.

OpenMP parallelism: Expensive operations can use multiple threads automatically.

Apache 2.0 license: Usable in both open-source and closed-source projects.