From c7d2fdc4b2628c725cee9ead0a5080a0a729762c Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 15 Aug 2013 19:54:00 +0400 Subject: [PATCH] Fixed some dubious uses of tbb::task_scheduler_init. --- modules/calib3d/perf/perf_pnp.cpp | 2 +- modules/calib3d/test/test_solvepnp_ransac.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/calib3d/perf/perf_pnp.cpp b/modules/calib3d/perf/perf_pnp.cpp index e881557298..7a7acb052d 100644 --- a/modules/calib3d/perf/perf_pnp.cpp +++ b/modules/calib3d/perf/perf_pnp.cpp @@ -130,7 +130,7 @@ PERF_TEST_P(PointsNum, DISABLED_SolvePnPRansac, testing::Values(4, 3*9, 7*13)) #ifdef HAVE_TBB // limit concurrency to get determenistic result - cv::Ptr one_thread = new tbb::task_scheduler_init(1); + tbb::task_scheduler_init one_thread(1); #endif TEST_CYCLE() diff --git a/modules/calib3d/test/test_solvepnp_ransac.cpp b/modules/calib3d/test/test_solvepnp_ransac.cpp index 4d00d805b5..ae744a4d7e 100644 --- a/modules/calib3d/test/test_solvepnp_ransac.cpp +++ b/modules/calib3d/test/test_solvepnp_ransac.cpp @@ -276,7 +276,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency) { // limit concurrency to get determenistic result cv::theRNG().state = 20121010; - cv::Ptr one_thread = new tbb::task_scheduler_init(1); + tbb::task_scheduler_init one_thread(1); solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1); } @@ -295,7 +295,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency) { // single thread again cv::theRNG().state = 20121010; - cv::Ptr one_thread = new tbb::task_scheduler_init(1); + tbb::task_scheduler_init one_thread(1); solvePnPRansac(object, image, camera_mat, dist_coef, rvec2, tvec2); } -- GitLab