Skip to content

Commit 97d449b

Browse files
author
tbbdev
committed
Committing Intel(R) TBB 4.4 Update 3 source code
1 parent 3095e71 commit 97d449b

File tree

1,440 files changed

+29851
-27317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,440 files changed

+29851
-27317
lines changed

CHANGES

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22
The list of most significant changes made over time in
33
Intel(R) Threading Building Blocks (Intel(R) TBB).
44

5+
Intel TBB 4.4 Update 3
6+
TBB_INTERFACE_VERSION == 9003
7+
8+
Changes (w.r.t. Intel TBB 4.4 Update 2):
9+
10+
- Modified parallel_sort to not require a default constructor for values
11+
and to use iter_swap() for value swapping.
12+
- Added support for creating or initializing a task_arena instance that
13+
is connected to the arena currently used by the thread.
14+
- graph/binpack example modified to use multifunction_node.
15+
- For performance analysis, use Intel(R) VTune(TM) Amplifier XE 2015
16+
and higher; older versions are no longer supported.
17+
- Improved support for compilation with disabled RTTI, by omitting its use
18+
in auxiliary code, such as assertions. However some functionality,
19+
particularly the flow graph, does not work if RTTI is disabled.
20+
- The tachyon example for Android* can be built using Android Studio 1.5
21+
and higher with experimental Gradle plugin 0.4.0.
22+
23+
Preview Features:
24+
25+
- Added class opencl_subbufer that allows using OpenCL* sub-buffer
26+
objects with opencl_node.
27+
- Class global_control supports the value of 1 for
28+
max_allowed_parallelism.
29+
30+
Bugs fixed:
31+
32+
- Fixed a race causing "TBB Warning: setaffinity syscall failed" message.
33+
- Fixed a compilation issue on OS X* with Intel(R) C++ Compiler 15.0.
34+
- Fixed a bug in queuing_rw_mutex::downgrade() that could temporarily
35+
block new readers.
36+
- Fixed speculative_spin_rw_mutex to stop using the lazy subscription
37+
technique due to its known flaws.
38+
- Fixed memory leaks in the tool support code.
39+
40+
------------------------------------------------------------------------
541
Intel TBB 4.4 Update 2
642
TBB_INTERFACE_VERSION == 9002
743

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Intel(R) Threading Building Blocks 4.4 Update 2
1+
# Intel(R) Threading Building Blocks 4.4 Update 3
22

33
Intel(R) Threading Building Blocks (Intel(R) TBB) lets you easily write parallel C++ programs that take
44
full advantage of multicore performance, that are portable, composable and have future-proof scalability.
@@ -8,7 +8,7 @@ Here are the latest [Changes] (CHANGES) and [Release Notes]
88
(doc/Release_Notes.txt) (contains system requirements and known issues).
99

1010
## Licensing
11-
Intel(R) TBB 4.4 Update 2 is licensed under [GPLv2] (COPYING) with the runtime exception.
11+
Intel(R) TBB 4.4 Update 3 is licensed under [GPLv2] (COPYING) with the runtime exception.
1212

1313
## Documentation
1414
* Intel(R) TBB [tutorial] (https://software.intel.com/en-us/tbb-tutorial)

build/AIX.gcc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/AIX.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/FreeBSD.clang.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/FreeBSD.gcc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/FreeBSD.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/Makefile.rml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/Makefile.tbb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/Makefile.tbbmalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/Makefile.tbbproxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/Makefile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/SunOS.gcc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/SunOS.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/SunOS.suncc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License

build/android.gcc.inc

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License
@@ -45,14 +45,12 @@ ifeq ($(APP_PIE), false)
4545
PIE_FLAG=
4646
endif
4747

48-
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic $(PIE_FLAG)
48+
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
4949
C_FLAGS = $(CPLUS_FLAGS)
5050

51-
# gcc 4.4 and higher support C++11
52-
ifneq (,$(shell $(CPLUS) -dumpversion | egrep "^(4\.[4-9]|[5-9])"))
53-
# On Android/gcc 4.4.3, -std=c++0x causes ::int64_t and ::uint64_t to be undefined.
54-
CPP11_FLAGS = -std=gnu++0x $(DEFINE_KEY)_TBB_CPP0X
55-
endif
51+
# Supported g++ versions support C++11
52+
# On Android/gcc 4.4.3, -std=c++0x causes ::int64_t and ::uint64_t to be undefined.
53+
CPP11_FLAGS = -std=c++11 $(DEFINE_KEY)_TBB_CPP0X
5654

5755
ifeq ($(cfg), release)
5856
CPLUS_FLAGS = -O2
@@ -67,14 +65,6 @@ ifneq (,$(findstring $(arch),ia32 intel64))
6765
CPLUS_FLAGS += $(DEFINE_KEY)DO_ITT_NOTIFY
6866
endif
6967

70-
ifneq (0, $(dlopen_workaround))
71-
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_REENTRANCY_WORKAROUND=1
72-
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_MAIN_PROGRAM_WORKAROUND=1
73-
else
74-
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_REENTRANCY_WORKAROUND=0
75-
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_MAIN_PROGRAM_WORKAROUND=0
76-
endif
77-
7868
ifeq (0, $(dynamic_load))
7969
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_DYNAMIC_LOAD_ENABLED=0
8070
endif
@@ -95,15 +85,13 @@ ifeq (ia32,$(arch))
9585
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
9686
CPLUS_FLAGS += -m32
9787
LIB_LINK_FLAGS += -m32
98-
endif
99-
100-
ifeq (intel64,$(arch))
88+
else ifeq (intel64,$(arch))
10189
CPLUS_FLAGS += -m64
10290
LIB_LINK_FLAGS += -m64
103-
endif
104-
105-
ifeq (arm,$(findstring arm,$(arch)))
91+
else ifeq (arm,$(arch))
10692
CPLUS_FLAGS += -march=armv7-a $(DEFINE_KEY)TBB_USE_GCC_BUILTINS=1 $(DEFINE_KEY)__TBB_64BIT_ATOMICS=0
93+
else ifeq (arm64,$(arch))
94+
CPLUS_FLAGS += -march=armv8-a
10795
endif
10896

10997
#------------------------------------------------------------------------------

build/android.icc.inc

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
2+
#
3+
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
4+
# you can redistribute it and/or modify it under the terms of the GNU General Public License
5+
# version 2 as published by the Free Software Foundation. Threading Building Blocks is
6+
# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
7+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8+
# See the GNU General Public License for more details. You should have received a copy of
9+
# the GNU General Public License along with Threading Building Blocks; if not, write to the
10+
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
11+
#
12+
# As a special exception, you may use this file as part of a free software library without
13+
# restriction. Specifically, if other files instantiate templates or use macros or inline
14+
# functions from this file, or you compile this file and link it with other files to produce
15+
# an executable, this file does not by itself cause the resulting executable to be covered
16+
# by the GNU General Public License. This exception does not however invalidate any other
17+
# reasons why the executable file might be covered by the GNU General Public License.
18+
19+
20+
COMPILE_ONLY = -c -MMD
21+
PREPROC_ONLY = -E -x c++
22+
INCLUDE_KEY = -I
23+
DEFINE_KEY = -D
24+
OUTPUT_KEY = -o #
25+
OUTPUTOBJ_KEY = -o #
26+
PIC_KEY = -fPIC
27+
WARNING_AS_ERROR_KEY = -Werror
28+
WARNING_KEY =
29+
TEST_WARNING_KEY = -Wshadow -Woverloaded-virtual -Wextra
30+
31+
WARNING_SUPPRESS = -Wno-parentheses -Wno-non-virtual-dtor
32+
DYLIB_KEY = -shared
33+
EXPORT_KEY = -Wl,--version-script,
34+
LIBDL = -ldl
35+
36+
CPLUS = icpc
37+
CONLY = icc
38+
39+
# -soname is necessary for proper linkage to TBB prebuilt libraries when building application with Android SDK
40+
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
41+
42+
# pie is necessary for test executables to work and might be removed if newer NDK will add it implicitly
43+
PIE_FLAG = -pie
44+
ifeq ($(APP_PIE), false)
45+
PIE_FLAG=
46+
endif
47+
48+
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
49+
C_FLAGS = $(CPLUS_FLAGS)
50+
51+
CPP11_FLAGS = -std=c++11 $(DEFINE_KEY)_TBB_CPP0X
52+
53+
ifeq ($(cfg), release)
54+
CPLUS_FLAGS = -O2
55+
endif
56+
ifeq ($(cfg), debug)
57+
CPLUS_FLAGS = -g -O0 $(DEFINE_KEY)TBB_USE_DEBUG
58+
endif
59+
60+
CPLUS_FLAGS += $(DEFINE_KEY)USE_PTHREAD $(DEFINE_KEY)_GLIBCXX_HAVE_FENV_H
61+
62+
ifneq (,$(findstring $(arch),ia32 intel64))
63+
CPLUS_FLAGS += $(DEFINE_KEY)DO_ITT_NOTIFY
64+
endif
65+
66+
ifeq (0, $(dynamic_load))
67+
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_DYNAMIC_LOAD_ENABLED=0
68+
endif
69+
70+
71+
# Paths to the NDK prebuilt tools and libraries
72+
CPLUS_FLAGS += --sysroot=$(SYSROOT)
73+
LIB_LINK_FLAGS += --sysroot=$(SYSROOT)
74+
# the -static-intel flag is to remove the need to copy Intel-specific libs to the device.
75+
LIBS = -L$(CPLUS_LIB_PATH) -lgnustl_shared -static-intel
76+
77+
# This causes CPP11_FLAGS to be issued twice for test_lambda.cpp
78+
# TODO: Fix this in general for all platforms once the correct strategy is determined.
79+
ifneq (00,$(lambdas)$(cpp0x))
80+
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
81+
endif
82+
83+
ifeq (ia32,$(arch))
84+
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
85+
CPLUS_FLAGS += -m32 -march=pentium4 -falign-stack=maintain-16-byte
86+
LIB_LINK_FLAGS += -m32
87+
else
88+
ifeq (intel64,$(arch))
89+
CPLUS_FLAGS += -m64
90+
LIB_LINK_FLAGS += -m64
91+
endif
92+
endif
93+
94+
ifeq (arm,$(findstring arm,$(arch)))
95+
$(error "Unsupported architecture $(arch) for icc compiler")
96+
endif
97+
98+
#------------------------------------------------------------------------------
99+
# Setting assembler data.
100+
#------------------------------------------------------------------------------
101+
TBB_ASM.OBJ=
102+
MALLOC_ASM.OBJ=
103+
104+
ASM = $(tbb_tool_prefix)as
105+
ifeq (intel64,$(arch))
106+
ASM_FLAGS += --64
107+
endif
108+
ifeq (ia32,$(arch))
109+
ASM_FLAGS += --32
110+
endif
111+
ifeq ($(cfg),debug)
112+
ASM_FLAGS += -g
113+
endif
114+
115+
ASSEMBLY_SOURCE=$(arch)-gas
116+
#------------------------------------------------------------------------------
117+
# End of setting assembler data.
118+
#------------------------------------------------------------------------------
119+
120+
#------------------------------------------------------------------------------
121+
# Setting tbbmalloc data.
122+
#------------------------------------------------------------------------------
123+
124+
M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
125+
126+
#------------------------------------------------------------------------------
127+
# End of setting tbbmalloc data.
128+
#------------------------------------------------------------------------------

build/android.inc

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
1+
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
22
#
33
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
44
# you can redistribute it and/or modify it under the terms of the GNU General Public License
@@ -28,35 +28,34 @@ ifeq (android,$(findstring android,$(tbb_os)))
2828
$(error TBB only supports cross-compilation for Android. Specify "target=android" instead.)
2929
endif
3030

31-
ifneq ("command line","$(origin arch)")
32-
ifeq (icc,$(compiler))
33-
export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
34-
ifneq (,$(findstring IA-32, $(COMPILER_VERSION)))
35-
export arch:=ia32
36-
else ifneq (,$(findstring Intel(R) 64, $(COMPILER_VERSION)))
37-
export arch:=intel64
38-
else
39-
$(error "No support for Android in $(COMPILER_VERSION)")
40-
endif
41-
42-
else
43-
ifdef ANDROID_SERIAL
44-
uname_m:=$(shell adb shell uname -m)
45-
ifeq (i686,$(uname_m))
31+
ifndef BUILDING_PHASE
32+
ifneq ("command line","$(origin arch)")
33+
ifeq (icc,$(compiler))
34+
export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
35+
ifneq (,$(findstring running on IA-32, $(COMPILER_VERSION)))
4636
export arch:=ia32
37+
else ifneq (,$(findstring running on Intel(R) 64, $(COMPILER_VERSION)))
38+
export arch:=intel64
4739
else
48-
export arch:=$(uname_m)
40+
$(error "No support for Android in $(COMPILER_VERSION)")
4941
endif
42+
5043
else
51-
ifndef arch
52-
$(error "No target architecture specified and \'ANDROID_SERIAL\' environment variable specifying target device not set")
44+
ifdef ANDROID_SERIAL
45+
uname_m:=$(shell adb shell uname -m)
46+
ifeq (i686,$(uname_m))
47+
export arch:=ia32
48+
else
49+
export arch:=$(uname_m)
50+
endif
5351
endif
5452
endif
5553
endif
5654
endif
5755

58-
# Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang
59-
export dlopen_workaround = 1
56+
ifeq ("$(arch)","")
57+
$(error "No target architecture specified and \'ANDROID_SERIAL\' environment variable specifying target device not set")
58+
endif
6059

6160
# Android platform only supported from TBB 4.1 forward
6261
NO_LEGACY_TESTS = 1

0 commit comments

Comments
 (0)