From fc3660285fe326744eb67711126d2764a1f97100 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 23 Mar 2016 09:56:50 -0700 Subject: [PATCH] Made type conversion explicit --- Eigen/src/Core/arch/CUDA/TypeCasting.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/CUDA/TypeCasting.h b/Eigen/src/Core/arch/CUDA/TypeCasting.h index 4c0433267..b2a9724de 100644 --- a/Eigen/src/Core/arch/CUDA/TypeCasting.h +++ b/Eigen/src/Core/arch/CUDA/TypeCasting.h @@ -114,8 +114,8 @@ template<> EIGEN_STRONG_INLINE half2 pcast(const float4& a) { #if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 300 return __float22half2_rn(make_float2(a.x, a.y)); #else - half r1 = a.x; - half r2 = a.y; + half r1 = static_cast(a.x); + half r2 = static_cast(a.y); half2 r; r.x = 0; r.x |= r1.x;