From 6c3e5b85bc543ba428725479c0e55345f1a02461 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 3 May 2016 09:38:42 -0700 Subject: [PATCH] Fixed compilation error with cuda >= 7.5 --- Eigen/src/Core/arch/CUDA/Half.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h index f6dfaff53..060c2c805 100644 --- a/Eigen/src/Core/arch/CUDA/Half.h +++ b/Eigen/src/Core/arch/CUDA/Half.h @@ -294,7 +294,8 @@ 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(static_cast(0x0u)); + __half o; + o.x = static_cast(0x0u); unsigned int sign = f.u & sign_mask; f.u ^= sign;