Made a cast explicit

This commit is contained in:
Benoit Steiner 2016-05-02 19:50:22 -07:00
parent 73ef5371e4
commit da50419df8

View File

@ -294,7 +294,7 @@ static EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half float_to_half_rtne(float ff)
const FP32 f16max = { (127 + 16) << 23 };
const FP32 denorm_magic = { ((127 - 15) + (23 - 10) + 1) << 23 };
unsigned int sign_mask = 0x80000000u;
__half o(0);
__half o(static_cast<unsigned short>(0x0u));
unsigned int sign = f.u & sign_mask;
f.u ^= sign;