From e6eb1b99e19b5e8e99e1d8aa872363335a6a0a92 Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Sat, 10 Nov 2012 00:48:37 +0400 Subject: [PATCH] fix negative confidence bug --- modules/gpu/src/cuda/isf-sc.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/src/cuda/isf-sc.cu b/modules/gpu/src/cuda/isf-sc.cu index 3391bb1a06..ee9a9f674a 100644 --- a/modules/gpu/src/cuda/isf-sc.cu +++ b/modules/gpu/src/cuda/isf-sc.cu @@ -229,7 +229,7 @@ namespace icf { if(__any((confidence <= stages[(st + threadIdx.x)]))) st += 2048; } - if(st == stEnd && !threadIdx.x) + if(!threadIdx.x && st == stEnd && ((confidence - FLT_EPSILON) >= 0)) { int idx = atomicInc(ctr, ndetections); // store detection