Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

MKL_Complex16

Dan4
Beginner
1,147 Views
Hi,

I am using MKL's "zgetri" function in C. Since I am porting our code to use MKL, it is not possible to change our data type from "complex" to MKL's "Complex16" everywhere in the code. The MKL's User Guide gives a solution to this to add these lines:

#define MKL_Complex16 std::complex
#include "mkl.h"

I would like to know will it work correctly if I use my old matrices which use complex, of course if I use a column major matrix for compatibility sake with Fortran?

I used this method and when I compile the code I get this error:

../include/mkl_types.h(43): error: expected a ";"
} MKL_Complex16;
^

../include/mkl_types.h(43): warning #64: declaration does not declare anything
} MKL_Complex16;

why this happens? This is the solution from MKL's user guide. Thanks for you help.

Regards,

D.
0 Kudos
1 Reply
Gennady_F_Intel
Moderator
1,147 Views
Quoting - danltu.se
Hi,

I am using MKL's "zgetri" function in C. Since I am porting our code to use MKL, it is not possible to change our data type from "complex" to MKL's "Complex16" everywhere in the code. The MKL's User Guide gives a solution to this to add these lines:

#define MKL_Complex16 std::complex
#include "mkl.h"

I would like to know will it work correctly if I use my old matrices which use complex, of course if I use a column major matrix for compatibility sake with Fortran?

I used this method and when I compile the code I get this error:

../include/mkl_types.h(43): error: expected a ";"
} MKL_Complex16;
^

../include/mkl_types.h(43): warning #64: declaration does not declare anything
} MKL_Complex16;

why this happens? This is the solution from MKL's user guide. Thanks for you help.

Regards,

D.

Dan,
- it should work correctly :).
- do you mean the example 7-2 Calling a Complex BLAS Level 1 Function from C++?
--Gennady

0 Kudos
Reply