Skip to content

Commit 330101e

Browse files
authored
Add complex type definitions for MSVC
1 parent d9f1478 commit 330101e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lapack-netlib/LAPACKE/include/lapack.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@
3737
*/
3838

3939
#ifndef LAPACK_COMPLEX_CUSTOM
40+
#if defined(_MSC_VER)
41+
#define _CRT_USE_C_COMPLEX_H
42+
#include <complex.h>
43+
#define LAPACK_COMPLEX_CUSTOM
44+
#define lapack_complex_float _Fcomplex
45+
#define lapack_complex_double _Dcomplex
46+
#endif
4047

48+
#else
4149
/* Complex type (single precision) */
4250
#ifndef lapack_complex_float
4351
#ifndef __cplusplus
@@ -74,6 +82,7 @@
7482
#define lapack_complex_double_imag(z) (cimag(z))
7583
#endif
7684

85+
#endif
7786
#endif /* LAPACK_COMPLEX_CUSTOM */
7887

7988

0 commit comments

Comments
 (0)