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--)