mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #12639 from tomoaki0705:fixFp16CudaFailure
This commit is contained in:
commit
9faacfbc0d
@ -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…
Reference in New Issue
Block a user