mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
core, gapi: supported build with oneTBB 2021
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
|
||||
#include "gtbbexecutor.hpp"
|
||||
|
||||
#if defined(HAVE_TBB)
|
||||
#if defined(HAVE_TBB) && (TBB_INTERFACE_VERSION < 12000)
|
||||
// TODO: TBB task API has been deprecated and removed in 12000
|
||||
|
||||
#include "gapi_itt.hpp"
|
||||
|
||||
#include <opencv2/gapi/own/assert.hpp>
|
||||
@@ -442,4 +444,4 @@ std::ostream& cv::gimpl::parallel::operator<<(std::ostream& o, tile_node const&
|
||||
return o;
|
||||
}
|
||||
|
||||
#endif // HAVE_TBB
|
||||
#endif // HAVE_TBB && TBB_INTERFACE_VERSION
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
#include <opencv2/cvconfig.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TBB)
|
||||
#ifdef HAVE_TBB
|
||||
#include <tbb/tbb.h>
|
||||
#include <tbb/task.h>
|
||||
#if TBB_INTERFACE_VERSION < 12000
|
||||
// TODO: TBB task API has been deprecated and removed in 12000
|
||||
|
||||
#include <atomic>
|
||||
#include <vector>
|
||||
@@ -98,6 +102,7 @@ void execute(prio_items_queue_t& q, tbb::task_arena& arena);
|
||||
|
||||
}}} // namespace cv::gimpl::parallel
|
||||
|
||||
#endif // TBB_INTERFACE_VERSION
|
||||
#endif // HAVE_TBB
|
||||
|
||||
#endif // OPENCV_GAPI_TBB_EXECUTOR_HPP
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
// Deliberately include .cpp file instead of header as we use non exported function (execute)
|
||||
#include <executor/gtbbexecutor.cpp>
|
||||
|
||||
#if defined(HAVE_TBB)
|
||||
#ifdef HAVE_TBB
|
||||
#include <tbb/tbb.h>
|
||||
#include <tbb/task.h>
|
||||
#if TBB_INTERFACE_VERSION < 12000
|
||||
|
||||
#include <tbb/task_arena.h>
|
||||
|
||||
#include "../test_precomp.hpp"
|
||||
#include <tbb/task_arena.h>
|
||||
#include <thread>
|
||||
|
||||
namespace {
|
||||
@@ -169,4 +173,6 @@ TEST(TBBExecutor, Dependencies) {
|
||||
}
|
||||
}
|
||||
} // namespace opencv_test
|
||||
|
||||
#endif //TBB_INTERFACE_VERSION
|
||||
#endif //HAVE_TBB
|
||||
|
||||
Reference in New Issue
Block a user