Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lapacke or clapack if programming in c/c++ in linux

Tags:

fedora

lapack

My purpose of using LAPACK is to calculate the cholesky of a matrix. I am programming in C/C++ in Fedora, but I am confused over which lapack to install - LAPACK with lapacke or clapack?

like image 269
user506146 Avatar asked Jul 04 '11 06:07

user506146


1 Answers

The basic difference between the two is the need for a Fortran compiler.

CLAPACK is basically just the reference NETLIB LAPACK routines passed through the old f2c converter, allowing the library to be compiled with a C compiler.

LAPACKE is an attempt (started by Intel IIRC) to define a formal C language interface for Fortran LAPACK libraries. It has the advantage that it is LAPACK implementation independent and will hide toolchain specific C to Fortran interoperability so that the programmer doesn't have to worry about them. LAPACKE also has the distinct advantage of working correctly with the C99 complex intrinsic type.

I would not expect a major performance difference between the two (the choice of BLAS dictates most of that), but I would probably favor LAPACKE + the LAPACK and BLAS implmementation of choice, if I were to start from scratch today.

like image 177
talonmies Avatar answered Sep 20 '22 18:09

talonmies