34 #ifndef _LAPACKE_CONFIG_H_
35 #define _LAPACKE_CONFIG_H_
38 #if defined(LAPACK_COMPLEX_CPP)
47 #if defined(LAPACK_ILP64)
48 #define lapack_int long
50 #define lapack_int int
54 #ifndef lapack_logical
55 #define lapack_logical lapack_int
58 #ifndef LAPACK_COMPLEX_CUSTOM
60 #if defined(LAPACK_COMPLEX_STRUCTURE)
62 typedef struct {
float real, imag; } _lapack_complex_float;
63 typedef struct {
double real, imag; } _lapack_complex_double;
64 #define lapack_complex_float _lapack_complex_float
65 #define lapack_complex_double _lapack_complex_double
66 #define lapack_complex_float_real(z) ((z).real)
67 #define lapack_complex_float_imag(z) ((z).imag)
68 #define lapack_complex_double_real(z) ((z).real)
69 #define lapack_complex_double_imag(z) ((z).imag)
71 #elif defined(LAPACK_COMPLEX_C99)
74 #define lapack_complex_float float _Complex
75 #define lapack_complex_double double _Complex
76 #define lapack_complex_float_real(z) (creal(z))
77 #define lapack_complex_float_imag(z) (cimag(z))
78 #define lapack_complex_double_real(z) (creal(z))
79 #define lapack_complex_double_imag(z) (cimag(z))
81 #elif defined(LAPACK_COMPLEX_CPP)
83 #define lapack_complex_float std::complex<float>
84 #define lapack_complex_double std::complex<double>
85 #define lapack_complex_float_real(z) ((z).real())
86 #define lapack_complex_float_imag(z) ((z).imag())
87 #define lapack_complex_double_real(z) ((z).real())
88 #define lapack_complex_double_imag(z) ((z).imag())
93 #define lapack_complex_float float _Complex
94 #define lapack_complex_double double _Complex
95 #define lapack_complex_float_real(z) (creal(z))
96 #define lapack_complex_float_imag(z) (cimag(z))
97 #define lapack_complex_double_real(z) (creal(z))
98 #define lapack_complex_double_imag(z) (cimag(z))
107 #ifndef LAPACK_malloc
108 #define LAPACK_malloc( size ) malloc( size )
112 #define LAPACK_free( p ) free( p )
lapack_complex_double lapack_make_complex_double(double re, double im)
#define lapack_complex_float
#define lapack_complex_double
lapack_complex_float lapack_make_complex_float(float re, float im)