std::linalg: Linear Algebra Coming to Standard C++ - Mark Hoemmen - CppCon 2023

Discover the development of std::linalg, a standard C++ library for linear algebra, designed to be flexible, generic, and extensible, with a focus on providing a single interface for various linear algebra operations.

Key takeaways
  • The goal is to create a linear algebra library in C++ that is a standard library, not a specific implementation.
  • The library is designed to be flexible and generic, with an abstraction layer that can be used with different underlying implementations.
  • The library uses a data structure called MDSpan to represent a view of the matrix elements, which can be used with different layouts and accessors.
  • The library provides a single interface for performing linear algebra operations, including matrix multiply, triangular solves, and outer product updates.
  • The library is designed to be extensible and customizable, with multiple customization options for MDSpan.
  • The library is intended to be used with dense and sparse matrices, and provides optimizations for each type.
  • The library is designed to follow the idioms of the BLAS (Basic Linear Algebra Subprograms) and the LAPACK (Linear Algebra Package) libraries.
  • The library provides a way to specify the layout and accessor for the matrix elements, and allows for customization of the accessors.
  • The library has multiple implementation layers, starting with a high-level interface and going down to a low-level implementation.
  • The library is designed to be flexible and generic, with the goal of providing a standard way of performing linear algebra operations in C++.