fix bug #3562:
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Thu, 20 Feb 2014 06:24:52 +0000 (10:24 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Thu, 20 Feb 2014 06:24:52 +0000 (10:24 +0400)
add missing __syncthreads to edgesHysteresisLocalKernel

modules/gpu/src/cuda/canny.cu

index 1dc179e..468eec4 100644 (file)
@@ -293,8 +293,12 @@ namespace canny
                 n += smem[threadIdx.y + 2][threadIdx.x + 2] == 2;
             }
 
+            __syncthreads();
+
             if (n > 0)
                 smem[threadIdx.y + 1][threadIdx.x + 1] = 2;
+
+            __syncthreads();
         }
 
         const int e = smem[threadIdx.y + 1][threadIdx.x + 1];