@@ -72,13 +72,21 @@ __DEVICE__ int fpclassify(double __x) {
72
72
__DEVICE__ float frexp (float __arg, int *__exp) {
73
73
return ::frexpf (__arg, __exp);
74
74
}
75
+
76
+ // For inscrutable reasons, the CUDA headers define these functions for us on
77
+ // Windows.
78
+ #ifndef _MSC_VER
75
79
__DEVICE__ bool isinf (float __x) { return ::__isinff (__x); }
76
80
__DEVICE__ bool isinf (double __x) { return ::__isinf (__x); }
77
81
__DEVICE__ bool isfinite (float __x) { return ::__finitef (__x); }
78
82
// For inscrutable reasons, __finite(), the double-precision version of
79
83
// __finitef, does not exist when compiling for MacOS. __isfinited is available
80
84
// everywhere and is just as good.
81
85
__DEVICE__ bool isfinite (double __x) { return ::__isfinited (__x); }
86
+ __DEVICE__ bool isnan (float __x) { return ::__isnanf (__x); }
87
+ __DEVICE__ bool isnan (double __x) { return ::__isnan (__x); }
88
+ #endif
89
+
82
90
__DEVICE__ bool isgreater (float __x, float __y) {
83
91
return __builtin_isgreater (__x, __y);
84
92
}
@@ -109,8 +117,6 @@ __DEVICE__ bool islessgreater(float __x, float __y) {
109
117
__DEVICE__ bool islessgreater (double __x, double __y) {
110
118
return __builtin_islessgreater (__x, __y);
111
119
}
112
- __DEVICE__ bool isnan (float __x) { return ::__isnanf (__x); }
113
- __DEVICE__ bool isnan (double __x) { return ::__isnan (__x); }
114
120
__DEVICE__ bool isnormal (float __x) { return __builtin_isnormal (__x); }
115
121
__DEVICE__ bool isnormal (double __x) { return __builtin_isnormal (__x); }
116
122
__DEVICE__ bool isunordered (float __x, float __y) {
0 commit comments