From fb15bdfb21da2c38beea6e87c7b08a19610821d6 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 23 Apr 2015 12:43:17 +0300 Subject: [PATCH] fix racecheck warning in scanRows kernel --- modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu b/modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu index af65bbf3e3..21593bbd70 100644 --- a/modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu +++ b/modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu @@ -280,7 +280,8 @@ __global__ void scanRows(T_in *d_src, Ncv32u texOffs, Ncv32u srcWidth, Ncv32u sr __shared__ T_out shmem[NUM_SCAN_THREADS * 2]; __shared__ T_out carryElem; - carryElem = 0; + if (threadIdx.x == 0) + carryElem = 0; __syncthreads(); while (numBuckets--)