Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
02936dcf
Commit
02936dcf
authored
Jul 02, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14926 from alalek:tbb_version_2019u8
parents
ff877af2
43e457c8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
75 deletions
+17
-75
CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+17
-23
android_additional.h
3rdparty/tbb/android_additional.h
+0
-41
arm_linux_stub.cpp
3rdparty/tbb/arm_linux_stub.cpp
+0
-11
No files found.
3rdparty/tbb/CMakeLists.txt
View file @
02936dcf
...
...
@@ -5,19 +5,14 @@ if (WIN32 AND NOT ARM)
message
(
FATAL_ERROR
"BUILD_TBB option supports Windows on ARM only!
\n
Use regular official TBB build instead of the BUILD_TBB option!"
)
endif
()
set
(
tbb_filename
"2018_U1.tar.gz"
)
set
(
tbb_subdir
"tbb-2018_U1"
)
set
(
tbb_md5
"b2f2fa09adf44a22f4024049907f774b"
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4702
-Wshadow
-Wunused-parameter
-Wmissing-prototypes
# MacOSX
)
ocv_update
(
OPENCV_TBB_RELEASE
"2019_U8"
)
ocv_update
(
OPENCV_TBB_RELEASE_MD5
"7c371d0f62726154d2c568a85697a0ad"
)
ocv_update
(
OPENCV_TBB_FILENAME
"
${
OPENCV_TBB_RELEASE
}
.tar.gz"
)
ocv_update
(
OPENCV_TBB_SUBDIR
"tbb-
${
OPENCV_TBB_RELEASE
}
"
)
set
(
tbb_src_dir
"
${
OpenCV_BINARY_DIR
}
/3rdparty/tbb"
)
ocv_download
(
FILENAME
${
tbb_filename
}
HASH
${
tbb_md
5
}
ocv_download
(
FILENAME
${
OPENCV_TBB_FILENAME
}
HASH
${
OPENCV_TBB_RELEASE_MD
5
}
URL
"
${
OPENCV_TBB_URL
}
"
"$ENV{OPENCV_TBB_URL}"
...
...
@@ -29,7 +24,7 @@ ocv_download(FILENAME ${tbb_filename}
if
(
NOT res
)
return
()
endif
()
set
(
tbb_src_dir
"
${
tbb_src_dir
}
/
${
tbb_subdir
}
"
)
set
(
tbb_src_dir
"
${
tbb_src_dir
}
/
${
OPENCV_TBB_SUBDIR
}
"
)
ocv_include_directories
(
"
${
tbb_src_dir
}
/include"
"
${
tbb_src_dir
}
/src/"
...
...
@@ -82,18 +77,19 @@ endif()
if
(
ANDROID_COMPILER_IS_CLANG
)
add_definitions
(
-D__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wmissing-prototypes
)
endif
()
set
(
TBB_SOURCE_FILES
${
lib_srcs
}
${
lib_hdrs
}
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS
/wd4702
-Wshadow
-Wunused-parameter
-Wclass-memaccess
# TBB 2018 under GCC 8+
-Wimplicit-fallthrough
# TBB 2018 under GCC 7+
-Wmissing-prototypes
# MacOSX, Android/Clang
-Wundef -Wmissing-declarations
# TBB 2019
)
if
(
ARM AND NOT WIN32
)
if
(
NOT ANDROID
)
set
(
TBB_SOURCE_FILES
${
TBB_SOURCE_FILES
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/arm_linux_stub.cpp"
)
endif
()
set
(
TBB_SOURCE_FILES
${
TBB_SOURCE_FILES
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/android_additional.h"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-include
\"
${
CMAKE_CURRENT_SOURCE_DIR
}
/android_additional.h
\"
"
)
endif
()
set
(
TBB_SOURCE_FILES
${
lib_srcs
}
${
lib_hdrs
}
)
set
(
tbb_version_file
"version_string.ver"
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
tbb_version_file
}
.cmakein"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
tbb_version_file
}
"
@ONLY
)
...
...
@@ -122,8 +118,6 @@ else()
target_link_libraries
(
tbb c m dl
)
endif
()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations
)
# filter out flags that are not handled well by the TBB code
foreach
(
var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG
)
string
(
REPLACE
"-Werror=non-virtual-dtor"
""
${
var
}
"
${${
var
}}
"
)
...
...
3rdparty/tbb/android_additional.h
deleted
100644 → 0
View file @
ff877af2
#include <cstdio>
static
inline
int
getPossibleCPUs
()
{
FILE
*
cpuPossible
=
fopen
(
"/sys/devices/system/cpu/possible"
,
"r"
);
if
(
!
cpuPossible
)
return
1
;
char
buf
[
2000
];
//big enough for 1000 CPUs in worst possible configuration
char
*
pbuf
=
fgets
(
buf
,
sizeof
(
buf
),
cpuPossible
);
fclose
(
cpuPossible
);
if
(
!
pbuf
)
return
1
;
//parse string of form "0-1,3,5-7,10,13-15"
int
cpusAvailable
=
0
;
while
(
*
pbuf
)
{
const
char
*
pos
=
pbuf
;
bool
range
=
false
;
while
(
*
pbuf
&&
*
pbuf
!=
','
)
{
if
(
*
pbuf
==
'-'
)
range
=
true
;
++
pbuf
;
}
if
(
*
pbuf
)
*
pbuf
++
=
0
;
if
(
!
range
)
++
cpusAvailable
;
else
{
int
rstart
=
0
,
rend
=
0
;
sscanf
(
pos
,
"%d-%d"
,
&
rstart
,
&
rend
);
cpusAvailable
+=
rend
-
rstart
+
1
;
}
}
return
cpusAvailable
?
cpusAvailable
:
1
;
}
#define __TBB_HardwareConcurrency() getPossibleCPUs()
3rdparty/tbb/arm_linux_stub.cpp
deleted
100644 → 0
View file @
ff877af2
#include "tbb/tbb_misc.h"
namespace
tbb
{
namespace
internal
{
void
affinity_helper
::
protect_affinity_mask
(
bool
)
{}
affinity_helper
::~
affinity_helper
()
{}
void
destroy_process_mask
()
{}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment