diff options
author | 2016-03-23 09:56:50 -0700 | |
---|---|---|
committer | 2016-03-23 09:56:50 -0700 | |
commit | fc3660285fe326744eb67711126d2764a1f97100 (patch) | |
tree | cce1d8720d1737dbe93147799e4cbf90bbb611c8 /Eigen/src/Core/arch/CUDA/TypeCasting.h | |
parent | 0e6888260459b31dac1bd3411b0e8f688f6d22a2 (diff) |
Made type conversion explicit
Diffstat (limited to 'Eigen/src/Core/arch/CUDA/TypeCasting.h')
-rw-r--r-- | Eigen/src/Core/arch/CUDA/TypeCasting.h | 4 |
1 files 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<float4, half2>(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<half>(a.x); + half r2 = static_cast<half>(a.y); half2 r; r.x = 0; r.x |= r1.x; |