1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Revert "call resetDevice if gpu test fails"

This reverts commit ab25fe9e37.
This commit is contained in:
Vladislav Vinogradov
2012-12-19 11:13:31 +04:00
parent 41c9377db0
commit 4ba33fa1ed
36 changed files with 5694 additions and 9450 deletions
+14 -22
View File
@@ -108,30 +108,22 @@ PERF_TEST_P(Image, Labeling_ConnectedComponents, Values<string>("gpu/labeling/al
if (PERF_RUN_GPU())
{
try
cv::gpu::GpuMat mask;
mask.create(image.rows, image.cols, CV_8UC1);
cv::gpu::GpuMat components;
components.create(image.rows, image.cols, CV_32SC1);
cv::gpu::connectivityMask(cv::gpu::GpuMat(image), mask, cv::Scalar::all(0), cv::Scalar::all(2));
ASSERT_NO_THROW(cv::gpu::labelComponents(mask, components));
TEST_CYCLE()
{
cv::gpu::GpuMat mask;
mask.create(image.rows, image.cols, CV_8UC1);
cv::gpu::GpuMat components;
components.create(image.rows, image.cols, CV_32SC1);
cv::gpu::connectivityMask(cv::gpu::GpuMat(image), mask, cv::Scalar::all(0), cv::Scalar::all(2));
ASSERT_NO_THROW(cv::gpu::labelComponents(mask, components));
TEST_CYCLE()
{
cv::gpu::labelComponents(mask, components);
}
GPU_SANITY_CHECK(components);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
cv::gpu::labelComponents(mask, components);
}
GPU_SANITY_CHECK(components);
}
else
{