开发者

Data Types in Accelerate.framework

I'm working on a program that uses the Accelerate framework (for LAPACK) and I have several issues. The code is written in C but needs to include C++ headers. I renamed the file to .cpp but it caused two errors, shown below.

Data Types in Accelerate.framework

So I then realized tried to #include <Accelerate/Accelerate.h> to include the headers, since what our LAPACK coder did was retype the definitions (dgemm_(), dposv_(), etc.) at the beginning of the file and rely on the compiler/linker to work things out. So I commented out those and just did the #include. What came out was this:

Data Types in Accelerate.framework

So, how do I use the LAPACK functions using Accelerate in a 开发者_StackOverflow社区C++ file? I'm not that familiar with LAPACK, so I'm not sure how that framework normally works.


You should use call dgemm_ and dposv_ using the type __CLPK_integer or long instead of int. The error is because a long* cannot be implicitly converted to an int* in C++.

typedef long int    __CLPK_integer;
typedef long int    __CLPK_logical;
typedef float       __CLPK_real;
typedef double      __CLPK_doublereal;
typedef __CLPK_logical  (*__CLPK_L_fp)();
typedef long int    __CLPK_ftnlen;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜