mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Fixed some dubious uses of tbb::task_scheduler_init.
This commit is contained in:
parent
a97ffe6513
commit
c7d2fdc4b2
@ -130,7 +130,7 @@ PERF_TEST_P(PointsNum, DISABLED_SolvePnPRansac, testing::Values(4, 3*9, 7*13))
|
|||||||
|
|
||||||
#ifdef HAVE_TBB
|
#ifdef HAVE_TBB
|
||||||
// limit concurrency to get determenistic result
|
// limit concurrency to get determenistic result
|
||||||
cv::Ptr<tbb::task_scheduler_init> one_thread = new tbb::task_scheduler_init(1);
|
tbb::task_scheduler_init one_thread(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TEST_CYCLE()
|
TEST_CYCLE()
|
||||||
|
@ -276,7 +276,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
|
|||||||
{
|
{
|
||||||
// limit concurrency to get determenistic result
|
// limit concurrency to get determenistic result
|
||||||
cv::theRNG().state = 20121010;
|
cv::theRNG().state = 20121010;
|
||||||
cv::Ptr<tbb::task_scheduler_init> one_thread = new tbb::task_scheduler_init(1);
|
tbb::task_scheduler_init one_thread(1);
|
||||||
solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1);
|
solvePnPRansac(object, image, camera_mat, dist_coef, rvec1, tvec1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ TEST(DISABLED_Calib3d_SolvePnPRansac, concurrency)
|
|||||||
{
|
{
|
||||||
// single thread again
|
// single thread again
|
||||||
cv::theRNG().state = 20121010;
|
cv::theRNG().state = 20121010;
|
||||||
cv::Ptr<tbb::task_scheduler_init> one_thread = new tbb::task_scheduler_init(1);
|
tbb::task_scheduler_init one_thread(1);
|
||||||
solvePnPRansac(object, image, camera_mat, dist_coef, rvec2, tvec2);
|
solvePnPRansac(object, image, camera_mat, dist_coef, rvec2, tvec2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user