### linear-algebra

#### When to use eigen and when to use Blas

I did some basic reading on Eigen and Blas. Both library have support for matrix matrix, matrix vector multiplication. I don't understand which one should I use in which case? To me it seems, both have almost same performance. It would be nice if someone could give me some resource or just tell me what are the advantages one library have over another? Or how does these two differer in case of matrix and vector manipulation? Thanks in advance.

Use Eigen, it's more complete and much easier to use. Then, if you wonder if another fully optimized BLAS implementation could give you higher performance, then just recompile your code with -DEIGEN_USE_BLAS and link to your favorite blas and see by yourself. Also, when using Eigen, don't forget to enable compiler optimizations, e.g. -O3 and the instruction-sets your hardware supports, e.g., -mavx -mfma when using latest Eigen.

So the answer to this question is here. http://eigen.tuxfamily.org/index.php?title=FAQ#How_does_Eigen_compare_to_BLAS.2FLAPACK.3F More or less, I use Eigen mostly, because it has a comforable interface. If you need speed and multicore parallelism or have only little but time-consuming linear algebra stuff in your code, go for GotoBlas2. Usually it is fastest on Intel machines.

### Related Links

The significance of the rotation matrix after computing structure from motion

Changing the LAPACK implementation used by IDL linear algebra routines?

approximate polynomial by linear inequalities

Maximization in quadratic programming using CGAL

Efficient recalculation of weighted least squares regression when weights change

How does ATLAS tuning work?

Vector direction on 3d line

hlsl dot function

How do units flow through matrix operations?

Quaternion relative error measurement

gcc 2.95 floating point linear algebra not matching gcc 4.3.2

How do I find the plane at which two hyperplanes intersect?

How can I do blind fitting on a list of x, y value pairs if I don't know the form of f(x) = y?

Projection matrix and Eigenvalue

trying to read quadratic program in cplex, get error

Generalized Eigen Values and Vectors in Eigen Library