Optimize cdot function for POWER10
[platform/upstream/openblas.git] / openblas_config_template.h
1 /*This is only for "make install" target.*/
2
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
6
7 #ifdef DOUBLE
8 #define DOUBLE_DEFINED DOUBLE
9 #undef  DOUBLE
10 #endif
11 #endif
12
13 #ifdef OPENBLAS_NEEDBUNDERSCORE
14 #define BLASFUNC(FUNC) FUNC##_
15 #else
16 #define BLASFUNC(FUNC) FUNC
17 #endif
18
19 #ifdef OPENBLAS_QUAD_PRECISION
20 typedef struct {
21   unsigned long x[2];
22 }  xdouble;
23 #elif defined OPENBLAS_EXPRECISION
24 #define xdouble long double
25 #else
26 #define xdouble double
27 #endif
28
29 #if defined(OPENBLAS_OS_WINDOWS) && defined(OPENBLAS___64BIT__)
30 typedef long long BLASLONG;
31 typedef unsigned long long BLASULONG;
32 #else
33 typedef long BLASLONG;
34 typedef unsigned long BLASULONG;
35 #endif
36
37 #ifndef BFLOAT16
38 #include <stdint.h>
39 typedef uint16_t bfloat16;
40 #endif
41
42 #ifdef OPENBLAS_USE64BITINT
43 typedef BLASLONG blasint;
44 #else
45 typedef int blasint;
46 #endif
47
48 #if defined(XDOUBLE) || defined(DOUBLE)
49 #define FLOATRET        FLOAT
50 #else
51 #ifdef NEED_F2CCONV
52 #define FLOATRET        double
53 #else
54 #define FLOATRET        float
55 #endif
56 #endif
57
58 /* Inclusion of a standard header file is needed for definition of __STDC_*
59    predefined macros with some compilers (e.g. GCC 4.7 on Linux).  This occurs
60    as a side effect of including either <features.h> or <stdc-predef.h>. */
61 #include <stdio.h>
62
63 /* C99 supports complex floating numbers natively, which GCC also offers as an
64    extension since version 3.0.  If neither are available, use a compatible
65    structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
66 #if ((defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || \
67       (__GNUC__ >= 3 && !defined(__cplusplus))) && !(defined(FORCE_OPENBLAS_COMPLEX_STRUCT))) && !defined(_MSC_VER)
68   #define OPENBLAS_COMPLEX_C99
69 #ifndef __cplusplus
70   #include <complex.h>
71 #endif
72   typedef float _Complex openblas_complex_float;
73   typedef double _Complex openblas_complex_double;
74   typedef xdouble _Complex openblas_complex_xdouble;
75   #define openblas_make_complex_float(real, imag)    ((real) + ((imag) * _Complex_I))
76   #define openblas_make_complex_double(real, imag)   ((real) + ((imag) * _Complex_I))
77   #define openblas_make_complex_xdouble(real, imag)  ((real) + ((imag) * _Complex_I))
78   #define openblas_complex_float_real(z)             (creal(z))
79   #define openblas_complex_float_imag(z)             (cimag(z))
80   #define openblas_complex_double_real(z)            (creal(z))
81   #define openblas_complex_double_imag(z)            (cimag(z))
82   #define openblas_complex_xdouble_real(z)           (creal(z))
83   #define openblas_complex_xdouble_imag(z)           (cimag(z))
84 #else
85   #define OPENBLAS_COMPLEX_STRUCT
86   typedef struct { float real, imag; } openblas_complex_float;
87   typedef struct { double real, imag; } openblas_complex_double;
88   typedef struct { xdouble real, imag; } openblas_complex_xdouble;
89   #define openblas_make_complex_float(real, imag)    {(real), (imag)}
90   #define openblas_make_complex_double(real, imag)   {(real), (imag)}
91   #define openblas_make_complex_xdouble(real, imag)  {(real), (imag)}
92   #define openblas_complex_float_real(z)             ((z).real)
93   #define openblas_complex_float_imag(z)             ((z).imag)
94   #define openblas_complex_double_real(z)            ((z).real)
95   #define openblas_complex_double_imag(z)            ((z).imag)
96   #define openblas_complex_xdouble_real(z)           ((z).real)
97   #define openblas_complex_xdouble_imag(z)           ((z).imag)
98 #endif
99
100 /* Inclusion of Linux-specific header is needed for definition of cpu_set_t. */
101 #ifdef OPENBLAS_OS_LINUX
102 #include <sched.h>
103 #endif