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

Merge pull request #11253 from mshabunin:decrease-tbb-dependency

This commit is contained in:
Alexander Alekhin
2018-04-09 16:03:34 +00:00
7 changed files with 4 additions and 791 deletions
+4
View File
@@ -13,6 +13,10 @@ if(WINRT AND CMAKE_SYSTEM_NAME MATCHES WindowsStore AND CMAKE_SYSTEM_VERSION MAT
list(APPEND extra_libs ole32.lib)
endif()
if(HAVE_TBB)
list(APPEND extra_libs tbb)
endif()
if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
endif()
@@ -61,37 +61,10 @@
# include "opencv2/core/eigen.hpp"
#endif
#ifdef HAVE_TBB
# include "tbb/tbb.h"
# include "tbb/task.h"
# undef min
# undef max
#endif
//! @cond IGNORED
namespace cv
{
#ifdef HAVE_TBB
typedef tbb::blocked_range<int> BlockedRange;
template<typename Body> static inline
void parallel_for( const BlockedRange& range, const Body& body )
{
tbb::parallel_for(range, body);
}
typedef tbb::split Split;
template<typename Body> static inline
void parallel_reduce( const BlockedRange& range, Body& body )
{
tbb::parallel_reduce(range, body);
}
typedef tbb::concurrent_vector<Rect> ConcurrentRectVector;
#else
class BlockedRange
{
public:
@@ -119,7 +92,6 @@ namespace cv
{
body(range);
}
#endif
// Returns a static string if there is a parallel framework,
// NULL otherwise.