From fcaa587b679659aa3efcc9d1150879dd29dbee12 Mon Sep 17 00:00:00 2001 From: Leonid Beynenson Date: Tue, 27 Sep 2011 16:25:13 +0000 Subject: [PATCH] CMake scripts changed a bit: added more accurate variant of the Threading Framework support (it is a lightweight analogue of TBB for ARM-s). --- CMakeLists.txt | 8 +++++++- modules/core/include/opencv2/core/internal.hpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index adc8e9d..b3ed6f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -446,6 +446,7 @@ if(IOS) endif() set(WITH_TBB OFF CACHE BOOL "Include Intel TBB support") +set(WITH_THREADING_FRAMEWORK OFF CACHE BOOL "Include Threading Framework support (lightweight analogue of TBB for ARM-s)") set(WITH_IPP OFF CACHE BOOL "Include Intel IPP support") set(WITH_EIGEN ON CACHE BOOL "Include Eigen2/Eigen3 support") @@ -957,12 +958,17 @@ if (WITH_TBB) endif(WITH_TBB) #Threading Framework -- temporary decision for ARM-s instead of TBB -if (NOT HAVE_TBB) +set(HAVE_THREADING_FRAMEWORK) +if (NOT HAVE_TBB AND WITH_THREADING_FRAMEWORK) file(GLOB THREADING_FRAMEWORK_HEADER "${OpenCV_SOURCE_DIR}/modules/core/include/opencv2/core/threading_framework.hpp") file(GLOB THREADING_FRAMEWORK_SOURCE "${OpenCV_SOURCE_DIR}/modules/core/src/threading_framework.cpp") + if(THREADING_FRAMEWORK_HEADER AND THREADING_FRAMEWORK_SOURCE) set(HAVE_THREADING_FRAMEWORK 1) endif() + if (TEGRA_DIR) + set(HAVE_THREADING_FRAMEWORK 1) + endif() endif() ############################ Intel IPP ############################# diff --git a/modules/core/include/opencv2/core/internal.hpp b/modules/core/include/opencv2/core/internal.hpp index c582cd5..b16bcf3 100644 --- a/modules/core/include/opencv2/core/internal.hpp +++ b/modules/core/include/opencv2/core/internal.hpp @@ -200,7 +200,7 @@ CV_INLINE IppiSize ippiSize(int width, int height) #ifdef HAVE_THREADING_FRAMEWORK -#include "threading_framework.hpp" +#include "opencv2/core/threading_framework.hpp" template static void parallel_for( const BlockedRange& range, const Body& body ) -- 2.7.4