I wonder what is the difference between LAPACKE and LAPACK. I want to do Eigen analysis with QZ
decomposition, but I'm not sure if I should start with LAPACKE or LAPACK. I appreciate any help.
Asked
Active
Viewed 9,892 times
17

Megidd
- 7,089
- 6
- 65
- 142
-
1From the Stack Overflow tag descriptions and reading various Google search results and Wikipedia, it looks like LAPACK is a FORTRAN library written in FORTRAN, and LAPACKE is a C wrapper library around the FORTRAN LAPACK library. – ajp15243 Nov 11 '14 at 22:11
2 Answers
19
LAPACKE is the C wrapper for the standard F90 LAPACK library. Honestly, its easier (and more efficient) to do things directly with LAPACK just as long as you store things column-major. LAPACKE ends up calling (in some fashion) the LAPACK routines anyways.

Dave Williams
- 376
- 1
- 3
- 13
-
2That's right. Eventually, I ended up using LAPACKE in my C++ code, because in this way I don't need to be worried about memory allocations. Also, when using LAPACKE, I used the column major option (LAPACK_COL_MAJOR) by storing my arrays in column major fashion, because in this way, LAPACKE consumes less memory (no need for transformation from row major to column major). – Megidd Dec 19 '14 at 13:24
11
You probably want to use LAPACKE as it frees you from writing helpers for converting from/to row-major mode to column major mode for matrices before/after LAPACK calls.

Kostya
- 1,552
- 1
- 10
- 16