From 6a5266df797d1c12076fc645fc82f344d24f25fd Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Tue, 25 Sep 2018 15:00:37 +0900 Subject: [PATCH] fix CvFp16Test failure --- modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp index 64a4574ffd..59fd8da45a 100644 --- a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp +++ b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp @@ -288,7 +288,7 @@ template <> __device__ __forceinline__ short cast_fp16(float v) { #if __CUDACC_VER_MAJOR__ >= 9 __half h(v); - return *(short*)&v; + return *(short*)&h; #else return (short)__float2half_rn(v); #endif