Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/openblas_config_template.h

kusano 2b45e8
/*This is only for "make install" target.*/
kusano 2b45e8
kusano 2b45e8
#ifdef NEEDBUNDERSCORE
kusano 2b45e8
#define BLASFUNC(FUNC) FUNC##_
kusano 2b45e8
#else
kusano 2b45e8
#define BLASFUNC(FUNC) FUNC
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef QUAD_PRECISION
kusano 2b45e8
typedef struct {
kusano 2b45e8
  unsigned long x[2];
kusano 2b45e8
}  xdouble;
kusano 2b45e8
#elif defined EXPRECISION
kusano 2b45e8
#define xdouble long double
kusano 2b45e8
#else
kusano 2b45e8
#define xdouble double
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(OS_WINDOWS) && defined(__64BIT__)
kusano 2b45e8
typedef long long BLASLONG;
kusano 2b45e8
typedef unsigned long long BLASULONG;
kusano 2b45e8
#else
kusano 2b45e8
typedef long BLASLONG;
kusano 2b45e8
typedef unsigned long BLASULONG;
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef USE64BITINT
kusano 2b45e8
typedef BLASLONG blasint;
kusano 2b45e8
#else
kusano 2b45e8
typedef int blasint;
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(XDOUBLE) || defined(DOUBLE)
kusano 2b45e8
#define FLOATRET	FLOAT
kusano 2b45e8
#else
kusano 2b45e8
#ifdef NEED_F2CCONV
kusano 2b45e8
#define FLOATRET	double
kusano 2b45e8
#else
kusano 2b45e8
#define FLOATRET	float
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
/* Inclusion of a standard header file is needed for definition of __STDC_*
kusano 2b45e8
   predefined macros with some compilers (e.g. GCC 4.7 on Linux).  This occurs
kusano 2b45e8
   as a side effect of including either <features.h> or <stdc-predef.h>. */</stdc-predef.h></features.h>
kusano 2b45e8
#include <stdio.h></stdio.h>
kusano 2b45e8
kusano 2b45e8
/* C99 supports complex floating numbers natively, which GCC also offers as an
kusano 2b45e8
   extension since version 3.0.  If neither are available, use a compatible
kusano 2b45e8
   structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
kusano 2b45e8
#if defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || __GNUC__ >= 3
kusano 2b45e8
  #define OPENBLAS_COMPLEX_C99
kusano 2b45e8
  #include <complex.h></complex.h>
kusano 2b45e8
  typedef float _Complex openblas_complex_float;
kusano 2b45e8
  typedef double _Complex openblas_complex_double;
kusano 2b45e8
  #define openblas_make_complex_float(real, imag)   ((real) + ((imag) * _Complex_I))
kusano 2b45e8
  #define openblas_make_complex_double(real, imag)  ((real) + ((imag) * _Complex_I))
kusano 2b45e8
  #define openblas_complex_float_real(z)            (creal(z))
kusano 2b45e8
  #define openblas_complex_float_imag(z)            (cimag(z))
kusano 2b45e8
  #define openblas_complex_double_real(z)           (creal(z))
kusano 2b45e8
  #define openblas_complex_double_imag(z)           (cimag(z))
kusano 2b45e8
#else
kusano 2b45e8
  #define OPENBLAS_COMPLEX_STRUCT
kusano 2b45e8
  typedef struct { float real, imag; } openblas_complex_float;
kusano 2b45e8
  typedef struct { double real, imag; } openblas_complex_double;
kusano 2b45e8
  #define openblas_make_complex_float(real, imag)   {(real), (imag)}
kusano 2b45e8
  #define openblas_make_complex_double(real, imag)  {(real), (imag)}
kusano 2b45e8
  #define openblas_complex_float_real(z)            ((z).real)
kusano 2b45e8
  #define openblas_complex_float_imag(z)            ((z).imag)
kusano 2b45e8
  #define openblas_complex_double_real(z)           ((z).real)
kusano 2b45e8
  #define openblas_complex_double_imag(z)           ((z).imag)
kusano 2b45e8
#endif