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.
C library for linear algebra [closed]
Asked Answered
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
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.
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
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.
© 2022 - 2024 — McMap. All rights reserved.