Using it for years, and mostly happy with that library. The performance is awesome for very long vectors / large matrices. It’s less than ideal for small things when the size is known at compile-time. If one knows SIMD intrinsics, in some of these cases the Eigen’s implementation can be outperformed by a large factor like 2-4. Also it’s very hard to mess with RAM layout of some things (like sparse matrices), just too…
Eigen: A C++ template library for linear algebra
21–30 of 85 posts
Re: Eigen: A C++ template library for linear algebra
#22BLAS vs Eigen Go
Re: Eigen: A C++ template library for linear algebra
#23God bless Eigen, I am using it to implement the state matrices of a Kalman Filter and it's a joy to use its APIs.
Eigen has one of if not the best linear algebra APIs I've ever seen. In particular, vectors are column vectors by default and you never need to touch row vectors (if I can editorialize, row vectors shouldn't exist at all), and vectors are not simply "n-by-1" matrices -- they're true vectors.
Re: Eigen: A C++ template library for linear algebra
#24Using it for years, and mostly happy with that library. The performance is awesome for very long vectors / large matrices. It’s less than ideal for small things when the size is known at compile-time. If one knows SIMD intrinsics, in some of these cases the Eigen’s implementation can be outperformed by a large factor like 2-4. Also it’s very hard to mess with RAM layout of some things (like sparse matrices), just too…
Re: Eigen: A C++ template library for linear algebra
#25Earlier quoted context omitted.
Eigen has one of if not the best linear algebra APIs I've ever seen. In particular, vectors are column vectors by default and you never need to touch row vectors (if I can editorialize, row vectors shouldn't exist at all), and vectors are not simply "n-by-1" matrices -- they're true vectors.
Could you elaborate a bit more about the difference between Nx1 matrices and "true vectors"?
Re: Eigen: A C++ template library for linear algebra
#26This library is used heavily inside Tensorflow. It is “production ready”.
Re: Eigen: A C++ template library for linear algebra
#27BLAS vs Eigen Go
Category error.
One is a standard the other a library. BLAS covers a subset of what Eigen does, and Eigen can use BLAS/LAPACK routines directly from other libraries (e.g. MKL) for those things.
Re: Eigen: A C++ template library for linear algebra
#28BLAS vs Eigen Go
Re: Eigen: A C++ template library for linear algebra
#29My only complaint is that using OpenMP Eigen can be slower with SMT than without SMT. They even suggest telling to use half as many threads as you have "cores" when "cores" means twice as many due to SMT. Otherwise, we've seen a 8-10x performance increase in SolveSpace (CAD) in some situations after switching from home-grown matrix operations to Eigen.
I tested all this very heavily before Eigen had AVX-512 support. In that environment there might be some differences and I would suggest you benchmark both configurations.
Re: Eigen: A C++ template library for linear algebra
#30Eigen is a great library. A similar one to consider that can at times be slightly easier to use coming from a python background is armadillo: http://arma.sourceforge.net/
I wonder how Eigen compares to xtensor, which was inspired by Numpy and has support for views, slicing, and broadcasting? https://github.com/xtensor-stack/xtensor