-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
npy_config.h
187 lines (148 loc) · 3.55 KB
/
npy_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#ifndef NUMPY_CORE_SRC_COMMON_NPY_CONFIG_H_
#define NUMPY_CORE_SRC_COMMON_NPY_CONFIG_H_
#include "config.h"
#include "npy_cpu_features.h"
#include "npy_cpu_dispatch.h"
#include "numpy/numpyconfig.h"
#include "numpy/npy_cpu.h"
#include "numpy/npy_os.h"
/* blocklist */
/* Disable broken Sun Workshop Pro math functions */
#ifdef __SUNPRO_C
#undef HAVE_ATAN2
#undef HAVE_ATAN2F
#undef HAVE_ATAN2L
#endif
/* Disable broken functions on z/OS */
#if defined (__MVS__)
#undef HAVE_POWF
#undef HAVE_EXPF
#undef HAVE___THREAD
#endif
/* Disable broken MS math functions */
#if defined(__MINGW32_VERSION)
#undef HAVE_ATAN2
#undef HAVE_ATAN2F
#undef HAVE_ATAN2L
#undef HAVE_HYPOT
#undef HAVE_HYPOTF
#undef HAVE_HYPOTL
#endif
#if defined(_MSC_VER)
#undef HAVE_CASIN
#undef HAVE_CASINF
#undef HAVE_CASINL
#undef HAVE_CASINH
#undef HAVE_CASINHF
#undef HAVE_CASINHL
#undef HAVE_CATAN
#undef HAVE_CATANF
#undef HAVE_CATANL
#undef HAVE_CATANH
#undef HAVE_CATANHF
#undef HAVE_CATANHL
#undef HAVE_CSQRT
#undef HAVE_CSQRTF
#undef HAVE_CSQRTL
#undef HAVE_CLOG
#undef HAVE_CLOGF
#undef HAVE_CLOGL
#undef HAVE_CACOS
#undef HAVE_CACOSF
#undef HAVE_CACOSL
#undef HAVE_CACOSH
#undef HAVE_CACOSHF
#undef HAVE_CACOSHL
#endif
/* MSVC _hypot messes with fp precision mode on 32-bit, see gh-9567 */
#if defined(_MSC_VER) && !defined(_WIN64)
#undef HAVE_CABS
#undef HAVE_CABSF
#undef HAVE_CABSL
#undef HAVE_HYPOT
#undef HAVE_HYPOTF
#undef HAVE_HYPOTL
#endif
/* Intel C for Windows uses POW for 64 bits longdouble*/
#if defined(_MSC_VER) && defined(__INTEL_COMPILER)
#if defined(HAVE_POWL) && (NPY_SIZEOF_LONGDOUBLE == 8)
#undef HAVE_POWL
#endif
#endif /* defined(_MSC_VER) && defined(__INTEL_COMPILER) */
/* powl gives zero division warning on OS X, see gh-8307 */
#if defined(HAVE_POWL) && defined(NPY_OS_DARWIN)
#undef HAVE_POWL
#endif
#ifdef __CYGWIN__
/* Loss of precision */
#undef HAVE_CASINHL
#undef HAVE_CASINH
#undef HAVE_CASINHF
/* Loss of precision */
#undef HAVE_CATANHL
#undef HAVE_CATANH
#undef HAVE_CATANHF
/* Loss of precision and branch cuts */
#undef HAVE_CATANL
#undef HAVE_CATAN
#undef HAVE_CATANF
/* Branch cuts */
#undef HAVE_CACOSHF
#undef HAVE_CACOSH
/* Branch cuts */
#undef HAVE_CSQRTF
#undef HAVE_CSQRT
/* Branch cuts and loss of precision */
#undef HAVE_CASINF
#undef HAVE_CASIN
#undef HAVE_CASINL
/* Branch cuts */
#undef HAVE_CACOSF
#undef HAVE_CACOS
/* log2(exp2(i)) off by a few eps */
#undef HAVE_LOG2
/* np.power(..., dtype=np.complex256) doesn't report overflow */
#undef HAVE_CPOWL
#undef HAVE_CEXPL
#include <cygwin/version.h>
#if CYGWIN_VERSION_DLL_MAJOR < 3003
/* https://cygwin.com/pipermail/cygwin-announce/2021-October/010268.html */
/* Builtin abs reports overflow */
#undef HAVE_CABSL
#undef HAVE_HYPOTL
#endif
#if CYGWIN_VERSION_DLL_MAJOR < 3002
/* https://cygwin.com/pipermail/cygwin-announce/2021-March/009987.html */
/* Segfault */
#undef HAVE_MODFL
/* sqrt(-inf) returns -inf instead of -nan */
#undef HAVE_SQRTL
#endif
#endif
/* Disable broken gnu trig functions */
#if defined(HAVE_FEATURES_H)
#include <features.h>
#if defined(__GLIBC__)
#if !__GLIBC_PREREQ(2, 18)
#undef HAVE_CASIN
#undef HAVE_CASINF
#undef HAVE_CASINL
#undef HAVE_CASINH
#undef HAVE_CASINHF
#undef HAVE_CASINHL
#undef HAVE_CATAN
#undef HAVE_CATANF
#undef HAVE_CATANL
#undef HAVE_CATANH
#undef HAVE_CATANHF
#undef HAVE_CATANHL
#undef HAVE_CACOS
#undef HAVE_CACOSF
#undef HAVE_CACOSL
#undef HAVE_CACOSH
#undef HAVE_CACOSHF
#undef HAVE_CACOSHL
#endif /* __GLIBC_PREREQ(2, 18) */
#endif /* defined(__GLIBC_PREREQ) */
#endif /* defined(HAVE_FEATURES_H) */
#endif /* NUMPY_CORE_SRC_COMMON_NPY_CONFIG_H_ */