| |
| |
| #ifdef NEEDBUNDERSCORE |
| #define BLASFUNC(FUNC) FUNC##_ |
| #else |
| #define BLASFUNC(FUNC) FUNC |
| #endif |
| |
| #ifdef QUAD_PRECISION |
| typedef struct { |
| unsigned long x[2]; |
| } xdouble; |
| #elif defined EXPRECISION |
| #define xdouble long double |
| #else |
| #define xdouble double |
| #endif |
| |
| #if defined(OS_WINDOWS) && defined(__64BIT__) |
| typedef long long BLASLONG; |
| typedef unsigned long long BLASULONG; |
| #else |
| typedef long BLASLONG; |
| typedef unsigned long BLASULONG; |
| #endif |
| |
| #ifdef USE64BITINT |
| typedef BLASLONG blasint; |
| #else |
| typedef int blasint; |
| #endif |
| |
| #if defined(XDOUBLE) || defined(DOUBLE) |
| #define FLOATRET FLOAT |
| #else |
| #ifdef NEED_F2CCONV |
| #define FLOATRET double |
| #else |
| #define FLOATRET float |
| #endif |
| #endif |
| |
| |
| |
| |
| #include <stdio.h> |
| |
| |
| |
| |
| #if defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || __GNUC__ >= 3 |
| #define OPENBLAS_COMPLEX_C99 |
| #include <complex.h> |
| typedef float _Complex openblas_complex_float; |
| typedef double _Complex openblas_complex_double; |
| #define openblas_make_complex_float(real, imag) ((real) + ((imag) * _Complex_I)) |
| #define openblas_make_complex_double(real, imag) ((real) + ((imag) * _Complex_I)) |
| #define openblas_complex_float_real(z) (creal(z)) |
| #define openblas_complex_float_imag(z) (cimag(z)) |
| #define openblas_complex_double_real(z) (creal(z)) |
| #define openblas_complex_double_imag(z) (cimag(z)) |
| #else |
| #define OPENBLAS_COMPLEX_STRUCT |
| typedef struct { float real, imag; } openblas_complex_float; |
| typedef struct { double real, imag; } openblas_complex_double; |
| #define openblas_make_complex_float(real, imag) {(real), (imag)} |
| #define openblas_make_complex_double(real, imag) {(real), (imag)} |
| #define openblas_complex_float_real(z) ((z).real) |
| #define openblas_complex_float_imag(z) ((z).imag) |
| #define openblas_complex_double_real(z) ((z).real) |
| #define openblas_complex_double_imag(z) ((z).imag) |
| #endif |