diff --git a/Eigen/src/Core/arch/CUDA/TypeCasting.h b/Eigen/src/Core/arch/CUDA/TypeCasting.h index 38f7500ee..9b4fbe205 100644 --- a/Eigen/src/Core/arch/CUDA/TypeCasting.h +++ b/Eigen/src/Core/arch/CUDA/TypeCasting.h @@ -97,7 +97,7 @@ struct type_casting_traits { }; }; -template<> EIGEN_STRONG_INLINE half2 pcast(const float4& a) { +template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE half2 pcast(const float4& a) { // Simply discard the second half of the input return __float22half2_rn(make_float2(a.x, a.y)); }