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

时间秒杀一切 提交于 2019-12-05 22:04:20

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/6567849/lapacke-or-clapack-if-programming-in-c-c-in-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!