提交 cafcfc4d 编写于 作者: R Roman Donchenko 提交者: OpenCV Buildbot

Merge pull request #2749 from jet47:fix-bug-3678

......@@ -850,7 +850,7 @@ CUDA_TEST_P(Integral, Accuracy)
INSTANTIATE_TEST_CASE_P(CUDA_Arithm, Integral, testing::Combine(
ALL_DEVICES,
DIFFERENT_SIZES,
testing::Values(cv::Size(128, 128), cv::Size(113, 113), cv::Size(768, 1066)),
WHOLE_SUBMAT));
///////////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -439,8 +439,6 @@ namespace integral_detail
T sum = (tidx < cols) && (y < rows) ? *p : 0;
y += blockDim.y;
sums[threadIdx.x][threadIdx.y] = sum;
__syncthreads();
......@@ -467,14 +465,17 @@ namespace integral_detail
if (threadIdx.y > 0)
sum += sums[threadIdx.x][threadIdx.y - 1];
if (tidx < cols)
sum += stepSum;
stepSum += sums[threadIdx.x][blockDim.y - 1];
__syncthreads();
if ((tidx < cols) && (y < rows))
{
sum += stepSum;
stepSum += sums[threadIdx.x][blockDim.y - 1];
*p = sum;
}
__syncthreads();
y += blockDim.y;
}
#else
__shared__ T smem[32][32];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册