From ced3df73da5e952406b0fd1b67bec50f67a9c120 Mon Sep 17 00:00:00 2001 From: Julien <182520+JulienMaille@users.noreply.github.com> Date: Wed, 15 Jan 2020 21:06:25 +0100 Subject: [PATCH] Fix: rsqrt(float) was improperly put in the ifdef for half --- modules/dnn/src/cuda/math.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dnn/src/cuda/math.hpp b/modules/dnn/src/cuda/math.hpp index 99be13c376..5fb9f43445 100644 --- a/modules/dnn/src/cuda/math.hpp +++ b/modules/dnn/src/cuda/math.hpp @@ -133,8 +133,8 @@ namespace cv { namespace dnn { namespace cuda4dnn { namespace csl { namespace de #if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530) template <> inline __device__ __half rsqrt(__half val) { return hrsqrt(val); } template <> inline __device__ __half2 rsqrt(__half2 val) { return h2rsqrt(val); } - template <> inline __device__ float rsqrt(float val) { return rsqrtf(val); } #endif + template <> inline __device__ float rsqrt(float val) { return rsqrtf(val); } template <> inline __device__ double rsqrt(double val) { return ::rsqrt(val); } template __device__ T sigmoid(T val) { return T(1) / (T(1) + exp(-val)); }