mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 14:06:35 +08:00
fix CvFp16Test failure
This commit is contained in:
parent
f4b9acb4db
commit
6a5266df79
@ -288,7 +288,7 @@ template <> __device__ __forceinline__ short cast_fp16<float, short>(float v)
|
|||||||
{
|
{
|
||||||
#if __CUDACC_VER_MAJOR__ >= 9
|
#if __CUDACC_VER_MAJOR__ >= 9
|
||||||
__half h(v);
|
__half h(v);
|
||||||
return *(short*)&v;
|
return *(short*)&h;
|
||||||
#else
|
#else
|
||||||
return (short)__float2half_rn(v);
|
return (short)__float2half_rn(v);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user