1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

added synchronization after NPP calls

This commit is contained in:
Vladislav Vinogradov
2011-01-24 10:32:57 +00:00
parent 8abdb3721f
commit 811ba31897
7 changed files with 88 additions and 0 deletions
+4
View File
@@ -76,6 +76,8 @@ void cv::gpu::meanStdDev(const GpuMat& src, Scalar& mean, Scalar& stddev)
sz.height = src.rows;
nppSafeCall( nppiMean_StdDev_8u_C1R(src.ptr<Npp8u>(), src.step, sz, mean.val, stddev.val) );
cudaSafeCall( cudaThreadSynchronize() );
}
@@ -110,6 +112,8 @@ double cv::gpu::norm(const GpuMat& src1, const GpuMat& src2, int normType)
src2.ptr<Npp8u>(), src2.step,
sz, &retVal) );
cudaSafeCall( cudaThreadSynchronize() );
return retVal;
}