Merge pull request #12639 from tomoaki0705:fixFp16CudaFailure

pull/12666/head
Alexander Alekhin 6 years ago
commit 9faacfbc0d
  1. 2
      modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp

@ -288,7 +288,7 @@ template <> __device__ __forceinline__ short cast_fp16<float, short>(float v)
{
#if __CUDACC_VER_MAJOR__ >= 9
__half h(v);
return *(short*)&v;
return *(short*)&h;
#else
return (short)__float2half_rn(v);
#endif

Loading…
Cancel
Save