Add complex type definitions for MSVC

This commit is contained in:
Martin Kroeker 2023-12-11 21:52:00 +01:00 committed by GitHub
parent d9f1478068
commit 330101e0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -37,7 +37,15 @@
*/
#ifndef LAPACK_COMPLEX_CUSTOM
#if defined(_MSC_VER)
#define _CRT_USE_C_COMPLEX_H
#include <complex.h>
#define LAPACK_COMPLEX_CUSTOM
#define lapack_complex_float _Fcomplex
#define lapack_complex_double _Dcomplex
#endif
#else
/* Complex type (single precision) */
#ifndef lapack_complex_float
#ifndef __cplusplus
@ -74,6 +82,7 @@
#define lapack_complex_double_imag(z) (cimag(z))
#endif
#endif
#endif /* LAPACK_COMPLEX_CUSTOM */