Fix nan() for windows

[ROCm/clr commit: fe5861770e]
Bu işleme şunda yer alıyor:
Yaxun Sam Liu
2019-02-07 17:29:36 -05:00
ebeveyn 37df9c83c1
işleme 80edf6693e
+7 -2
Dosyayı Görüntüle
@@ -899,6 +899,7 @@ __DEVICE__
inline
double nan(const char* tagp)
{
#if !_WIN32
union {
double val;
struct ieee_double {
@@ -906,8 +907,7 @@ double nan(const char* tagp)
uint32_t quiet : 1;
uint32_t exponent : 11;
uint32_t sign : 1;
} bits;
} bits;
static_assert(sizeof(double) == sizeof(ieee_double), "");
} tmp;
@@ -917,6 +917,11 @@ double nan(const char* tagp)
tmp.bits.mantissa = __make_mantissa(tagp);
return tmp.val;
#else
uint64_t val = __make_mantissa(tagp);
val |= 0xFFF << 51;
return reinterpret_cast<double>(val);
#endif
}
__DEVICE__
inline