C library for linear algebra [closed]
Asked Answered
J

3

14

Please, give me some tips for a HIGH PERFORMANCE C library for linear algebra (matrix algebra, eigenvalues, eigenvectors etc.). Can be both open-source or closed-source.

Jangro answered 29/8, 2011 at 9:53 Comment(2)
Who ever makes the effort to write a library like that and make it low perf? Shopping questions are off topic at SE.Stillbirth
GSL did. They made a very portable and wide functionality library, but they did not optimize it well both in multiplatform way and in platform-depended way.Busload
N
17
  1. CLAPACK (f2c'ed version of LAPACK)
  2. GSL - GNU Scientific Library

EDIT Thanks to comments from osgx:

  • CLAPACK is the library which uder the hood uses very high-performance BLAS library, as do other libraries, like ATLAS.
  • GSL is a standalone C library, not as fast as any based on BLAS. However its performance is still quite good (not extremely good though) and is used quite often; mostly because of its portability.

I know both LAPACK and GSL and I can recommend both of them. LAPACK is very low-level library and GSL may be more comfortable to use, but speaking of good performance -- BLAS-based library it is.

Nigritude answered 29/8, 2011 at 10:1 Comment(7)
Of course, as well as decompositions, etc. See: netlib.org/lapack/lawn41/node111.html (and the rest of the documentation).Nigritude
Which is better/faster for SVD and eigenvectors?Jangro
Good BLAS library (basic matrix-matrix; vector-matrix; vector-vector operations), e.g. ATLAS or GotoBLAS or Intel MKL + some LAPACK, which uses BLAS (all BLAS libraries have the same interface). The GSL will not use the high-performance BLAS.Busload
Actually LAPACK is based mostly on BLAS (level 3). I didn't use ATLAS, but as far as I know its performance is comparable to LAPACK.Nigritude
So we have an agreement: any library based on BLAS is good for high-performance computing. GSL is higher-level standalone library, but still relevant for many cases (not all though).Nigritude
Sorry, actually, gsl may link with external BLAS library (cblas function names).Busload
And basing of LAPACK on BLAS is the reason why LAPACK need little tuning of code to perform very good. All tuning is done in Good BLAS Library; autotuning in Atlas; handwriting of 100s kilobyte of asm in GotoBLAS; pirating GotoBLAS asm in MKL. Some tuning also was in AMD's ACML. But the GSL's internal BLAS is not tuned.Busload
M
5

ATLAS, maybe?

Edit: if you're open to C++, you should definitely check Eigen, it's a very neat library, and pretty fast too, according to the benchmarks.

Mamie answered 29/8, 2011 at 10:17 Comment(0)
F
0

Again if you are actually looking/open for modern C++ code, Armadillo is getting really hyped/popular. Also see their own benchmarking against IT++ and Newmat.

Fellers answered 13/2, 2013 at 10:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.