Use the C versions of ACML. C code can be called from C++ without any problems, and acml.h already includes the correct extern "C" statements. So you do not need to worry about this.
You might have trouble with using STL objects as arguments. I don't think the STL forces data to be contiguious like plain old arrays, which LAPACK and BLAS being built around fortran expect.
Should work just as it does in C.
Or if you do not mind to abide by the terms of the LGPL, you can find a somewhat incomplete template based C++ interface to your favorite standard conforming LAPACK/BLAS implementation at
If somebody is using the C++ wrapper lib the location of the gitweb viewer changed to http://git.devilshawk.net . The lib can now easily be downloaded with "git clone git://devilshawk.net/numerics.git" .
The library additionally gained some nice features:
-) now builds a dynamic lib
-) benchmarking test application under tests dir
-) Operators +/-/* for things that can be mapped to DGEMM/ZGEMM calls (Beware if it can not be mapped, an exception will be thrown ). Now you can just write:
C = A * B;
in your code and DGEMM will be called
I am having trouble using C++ library #include <complex> with ACML. I think the C++ library is supposed to be standard and the #include <acml.h> also defines a 'complex' type/struct so my complier does not like it.
I have renamed all complex types in the ACML header COMPLEX_ACML and this allows comiplation (MSVS 2008), however I do not want to have to do this on every release of a new ACML version or get any users of my code to have to do it to there ACML distribution.
What other choices do I have?