1 /*This is only for "make install" target.*/
3 #if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX)
4 #define OPENBLAS_WINDOWS_ABI
5 #define OPENBLAS_OS_WINDOWS
8 #define DOUBLE_DEFINED DOUBLE
13 #ifdef OPENBLAS_NEEDBUNDERSCORE
14 #define BLASFUNC(FUNC) FUNC##_
16 #define BLASFUNC(FUNC) FUNC
19 #ifdef OPENBLAS_QUAD_PRECISION
23 #elif defined OPENBLAS_EXPRECISION
24 #define xdouble long double
26 #define xdouble double
29 #if defined(OPENBLAS_OS_WINDOWS) && defined(OPENBLAS___64BIT__)
30 typedef long long BLASLONG;
31 typedef unsigned long long BLASULONG;
33 typedef long BLASLONG;
34 typedef unsigned long BLASULONG;
37 #ifdef OPENBLAS_USE64BITINT
38 typedef BLASLONG blasint;
43 #if defined(XDOUBLE) || defined(DOUBLE)
44 #define FLOATRET FLOAT
47 #define FLOATRET double
49 #define FLOATRET float
53 /* Inclusion of a standard header file is needed for definition of __STDC_*
54 predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs
55 as a side effect of including either <features.h> or <stdc-predef.h>. */
58 /* C99 supports complex floating numbers natively, which GCC also offers as an
59 extension since version 3.0. If neither are available, use a compatible
60 structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
61 #if ((defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || \
62 (__GNUC__ >= 3 && !defined(__cplusplus))) && !(defined(FORCE_OPENBLAS_COMPLEX_STRUCT)))
63 #define OPENBLAS_COMPLEX_C99
67 typedef float _Complex openblas_complex_float;
68 typedef double _Complex openblas_complex_double;
69 typedef xdouble _Complex openblas_complex_xdouble;
70 #define openblas_make_complex_float(real, imag) ((real) + ((imag) * _Complex_I))
71 #define openblas_make_complex_double(real, imag) ((real) + ((imag) * _Complex_I))
72 #define openblas_make_complex_xdouble(real, imag) ((real) + ((imag) * _Complex_I))
73 #define openblas_complex_float_real(z) (creal(z))
74 #define openblas_complex_float_imag(z) (cimag(z))
75 #define openblas_complex_double_real(z) (creal(z))
76 #define openblas_complex_double_imag(z) (cimag(z))
77 #define openblas_complex_xdouble_real(z) (creal(z))
78 #define openblas_complex_xdouble_imag(z) (cimag(z))
80 #define OPENBLAS_COMPLEX_STRUCT
81 typedef struct { float real, imag; } openblas_complex_float;
82 typedef struct { double real, imag; } openblas_complex_double;
83 typedef struct { xdouble real, imag; } openblas_complex_xdouble;
84 #define openblas_make_complex_float(real, imag) {(real), (imag)}
85 #define openblas_make_complex_double(real, imag) {(real), (imag)}
86 #define openblas_make_complex_xdouble(real, imag) {(real), (imag)}
87 #define openblas_complex_float_real(z) ((z).real)
88 #define openblas_complex_float_imag(z) ((z).imag)
89 #define openblas_complex_double_real(z) ((z).real)
90 #define openblas_complex_double_imag(z) ((z).imag)
91 #define openblas_complex_xdouble_real(z) ((z).real)
92 #define openblas_complex_xdouble_imag(z) ((z).imag)