- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Being a c++ programmer, I got tired of transating the lapack calls into c++ template functions and decided to make use of an already existing library, namely lapack bindings, that connects lapack calls to boost ublas structures (classes).
These are header-only "libraries", that allow for a clapack interface of the lapack functions. In particular, no need is there, to use a clapack library (i.e. .lib).
I was thinking therefore, to include numeric bindings in my code and link everything with mkl.
I was wondering, therefore, if the c interface of mkl's lapack and the one from clapack, are identical
(or, compatible in case some type-promotions are to be allowed).
Thank you in advance for your help,
Petros
Being a c++ programmer, I got tired of transating the lapack calls into c++ template functions and decided to make use of an already existing library, namely lapack bindings, that connects lapack calls to boost ublas structures (classes).
These are header-only "libraries", that allow for a clapack interface of the lapack functions. In particular, no need is there, to use a clapack library (i.e. .lib).
I was thinking therefore, to include numeric bindings in my code and link everything with mkl.
I was wondering, therefore, if the c interface of mkl's lapack and the one from clapack, are identical
(or, compatible in case some type-promotions are to be allowed).
Thank you in advance for your help,
Petros
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petros,
Intel MKL supports LAPACKE that is C LAPACK extention interface. As far as I know, this interfaces is aligned w/ NETLIB version of LAPACKE.
BTW, it was recently announced that Eigen C++ package now supports MKL backend. So, you can consider this as an alternative library for highly abstracted C++ computations.
Regards,
Konstantin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Konsantin,
The problem w/ Eigen is that it does not allow for using your own allocator with the matrix containers, forbidding me from using a thread-scallable allocator.
However, as far as I understand CLAPACK is a LAPACK "passed through f2c". I guess my question is if the mkl interface is the one that would be obtained by doing exactly this and if this is guaranteed to be so.
Thank you for yor help,
Petros
The problem w/ Eigen is that it does not allow for using your own allocator with the matrix containers, forbidding me from using a thread-scallable allocator.
However, as far as I understand CLAPACK is a LAPACK "passed through f2c". I guess my question is if the mkl interface is the one that would be obtained by doing exactly this and if this is guaranteed to be so.
Thank you for yor help,
Petros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petros,
The CLAPACK has exactly the same interface like the Fortran LAPACK, where all parameters are passed by reference. And this is exactly the interface MKL provides for all variants of names bindings like dgetrf DGETRF dgetrf_ DGETRF. Just take care of integers size if you are on 64bit architecture: use lp64 for 4byte integers and ilp64 for 8byte integers.
And just in case MKL also provides additional interfaces. One of these is LAPACKE. which supposed to be more in C style: withnon vector input parameters passed by value and possibility to not worry about workspaces, plus support of column major storage. This is whatKonstantin talked about.
W.B.R.,
Alexander
The CLAPACK has exactly the same interface like the Fortran LAPACK, where all parameters are passed by reference. And this is exactly the interface MKL provides for all variants of names bindings like dgetrf DGETRF dgetrf_ DGETRF. Just take care of integers size if you are on 64bit architecture: use lp64 for 4byte integers and ilp64 for 8byte integers.
And just in case MKL also provides additional interfaces. One of these is LAPACKE. which supposed to be more in C style: withnon vector input parameters passed by value and possibility to not worry about workspaces, plus support of column major storage. This is whatKonstantin talked about.
W.B.R.,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Thank you very much for your response.
W.B.R.
P-
Thank you very much for your response.
W.B.R.
P-

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page