You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

openblas_config_template.h 2.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*This is only for "make install" target.*/
  2. #ifdef NEEDBUNDERSCORE
  3. #define BLASFUNC(FUNC) FUNC##_
  4. #else
  5. #define BLASFUNC(FUNC) FUNC
  6. #endif
  7. #ifdef QUAD_PRECISION
  8. typedef struct {
  9. unsigned long x[2];
  10. } xdouble;
  11. #elif defined EXPRECISION
  12. #define xdouble long double
  13. #else
  14. #define xdouble double
  15. #endif
  16. #if defined(OS_WINDOWS) && defined(__64BIT__)
  17. typedef long long BLASLONG;
  18. typedef unsigned long long BLASULONG;
  19. #else
  20. typedef long BLASLONG;
  21. typedef unsigned long BLASULONG;
  22. #endif
  23. #ifdef USE64BITINT
  24. typedef BLASLONG blasint;
  25. #else
  26. typedef int blasint;
  27. #endif
  28. #if defined(XDOUBLE) || defined(DOUBLE)
  29. #define FLOATRET FLOAT
  30. #else
  31. #ifdef NEED_F2CCONV
  32. #define FLOATRET double
  33. #else
  34. #define FLOATRET float
  35. #endif
  36. #endif
  37. /* Inclusion of a standard header file is needed for definition of __STDC_*
  38. predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs
  39. as a side effect of including either <features.h> or <stdc-predef.h>. */
  40. #include <stdio.h>
  41. /* C99 supports complex floating numbers natively, which GCC also offers as an
  42. extension since version 3.0. If neither are available, use a compatible
  43. structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
  44. #if defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || __GNUC__ >= 3
  45. #define OPENBLAS_COMPLEX_C99
  46. #include <complex.h>
  47. typedef float _Complex openblas_complex_float;
  48. typedef double _Complex openblas_complex_double;
  49. #define openblas_make_complex_float(real, imag) ((real) + ((imag) * _Complex_I))
  50. #define openblas_make_complex_double(real, imag) ((real) + ((imag) * _Complex_I))
  51. #define openblas_complex_float_real(z) (creal(z))
  52. #define openblas_complex_float_imag(z) (cimag(z))
  53. #define openblas_complex_double_real(z) (creal(z))
  54. #define openblas_complex_double_imag(z) (cimag(z))
  55. #else
  56. #define OPENBLAS_COMPLEX_STRUCT
  57. typedef struct { float real, imag; } openblas_complex_float;
  58. typedef struct { double real, imag; } openblas_complex_double;
  59. #define openblas_make_complex_float(real, imag) {(real), (imag)}
  60. #define openblas_make_complex_double(real, imag) {(real), (imag)}
  61. #define openblas_complex_float_real(z) ((z).real)
  62. #define openblas_complex_float_imag(z) ((z).imag)
  63. #define openblas_complex_double_real(z) ((z).real)
  64. #define openblas_complex_double_imag(z) ((z).imag)
  65. #endif