Skip to content

Commit 3d8b180

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

File tree

744 files changed

+22692
-31465
lines changed

Some content is hidden

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

744 files changed

+22692
-31465
lines changed

CHANGES

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
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 4
6+
TBB_INTERFACE_VERSION == 9004
7+
8+
Changes (w.r.t. Intel TBB 4.4 Update 3):
9+
10+
- Removed a few cases of excessive user data copying in the flow graph.
11+
- Improved robustness of concurrent_bounded_queue::abort() in case of
12+
simultaneous push and pop operations.
13+
14+
Preview Features:
15+
16+
- Added tbb::flow::async_msg, a special message type to support
17+
communications between the flow graph and external asynchronous
18+
activities.
19+
- async_node modified to support use with C++03 compilers.
20+
21+
Bugs fixed:
22+
23+
- Fixed a bug in dynamic memory allocation replacement for Windows* OS.
24+
- Fixed excessive memory consumption on Linux* OS caused by enabling
25+
zero-copy realloc.
26+
- Fixed performance regression on Intel(R) Xeon Phi(tm) coprocessor with
27+
auto_partitioner.
28+
29+
------------------------------------------------------------------------
530
Intel TBB 4.4 Update 3
631
TBB_INTERFACE_VERSION == 9003
732

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 3
1+
# Intel(R) Threading Building Blocks 4.4 Update 4
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 3 is licensed under [GPLv2] (COPYING) with the runtime exception.
11+
Intel(R) TBB 4.4 Update 4 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/FreeBSD.clang.inc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ ifeq (libc++,$(stdlib))
5050
LIB_LINK_FLAGS += -stdlib=libc++
5151
endif
5252

53-
CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X
54-
55-
ifneq (00,$(lambdas)$(cpp0x))
56-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
57-
endif
58-
5953
TBB_ASM.OBJ=
6054
MALLOC_ASM.OBJ=
6155

build/Makefile.test

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ $(SCHEDULER_DIRECTLY_INCLUDED): LINK_TBB.LIB =
7878
$(SCHEDULER_DIRECTLY_INCLUDED): LINK_FILES += $(SCHEDULER_DEPENDENCIES)
7979
$(SCHEDULER_DIRECTLY_INCLUDED): $(SCHEDULER_DEPENDENCIES)
8080

81-
# Tests that use some features of C++11
82-
TEST_TBB_CPP11 = test_lambda.$(TEST_EXT) test_cache_aligned_allocator_STL.$(TEST_EXT)
83-
84-
ifneq (0,$(cpp0x))
85-
# Made CPP11 tests use NOSTRICT flags because -strict-ansi combined with
86-
# -std=c++0x on ICC 13.0 results in a compile error when stdlib is included
87-
$(TEST_TBB_CPP11): CPLUS_FLAGS := $(CPLUS_FLAGS_NOSTRICT)
88-
endif
89-
9081
# test_tbb_header detects "multiple definition" linker error using the test that covers the whole library
9182
TWICE_LINKED_TESTS = test_tbb_header.$(TEST_EXT) \
9283
test_concurrent_unordered_set.$(TEST_EXT)
@@ -134,6 +125,7 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
134125
test_mutex_native_threads.$(TEST_EXT) \
135126
test_rwm_upgrade_downgrade.$(TEST_EXT) \
136127
test_cache_aligned_allocator.$(TEST_EXT) \
128+
test_cache_aligned_allocator_STL.$(TEST_EXT) \
137129
test_parallel_for.$(TEST_EXT) \
138130
test_parallel_reduce.$(TEST_EXT) \
139131
test_parallel_sort.$(TEST_EXT) \
@@ -143,6 +135,7 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
143135
test_pipeline.$(TEST_EXT) \
144136
test_pipeline_with_tbf.$(TEST_EXT) \
145137
test_parallel_pipeline.$(TEST_EXT) \
138+
test_lambda.$(TEST_EXT) \
146139
test_task_scheduler_init.$(TEST_EXT) \
147140
test_task_scheduler_observer.$(TEST_EXT) \
148141
test_task.$(TEST_EXT) \
@@ -202,10 +195,9 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
202195
test_flow_graph_whitebox.$(TEST_EXT) \
203196
test_composite_node.$(TEST_EXT) \
204197
test_async_node.$(TEST_EXT) \
198+
test_async_msg.$(TEST_EXT) \
205199
test_tbb_version.$(TEST_EXT) # insert new files right above
206200

207-
TEST_TBB_PLAIN.EXE += $(TEST_TBB_CPP11)
208-
209201
# skip mode_plugin for now
210202
skip_tests += test_model_plugin
211203

build/android.gcc.inc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ endif
4848
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
4949
C_FLAGS = $(CPLUS_FLAGS)
5050

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
54-
5551
ifeq ($(cfg), release)
5652
CPLUS_FLAGS = -O2
5753
endif
@@ -75,12 +71,6 @@ CPLUS_FLAGS += --sysroot=$(SYSROOT)
7571
LIB_LINK_FLAGS += --sysroot=$(SYSROOT)
7672
LIBS = -L$(CPLUS_LIB_PATH) -lgnustl_shared
7773

78-
# This causes CPP11_FLAGS to be issued twice for test_lambda.cpp
79-
# TODO: Fix this in general for all platforms once the correct strategy is determined.
80-
ifneq (00,$(lambdas)$(cpp0x))
81-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
82-
endif
83-
8474
ifeq (ia32,$(arch))
8575
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
8676
CPLUS_FLAGS += -m32

build/android.icc.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ endif
4747

4848
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
4949
C_FLAGS = $(CPLUS_FLAGS)
50-
51-
CPP11_FLAGS = -std=c++11 $(DEFINE_KEY)_TBB_CPP0X
5250

5351
ifeq ($(cfg), release)
5452
CPLUS_FLAGS = -O2
@@ -74,12 +72,6 @@ LIB_LINK_FLAGS += --sysroot=$(SYSROOT)
7472
# the -static-intel flag is to remove the need to copy Intel-specific libs to the device.
7573
LIBS = -L$(CPLUS_LIB_PATH) -lgnustl_shared -static-intel
7674

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-
8375
ifeq (ia32,$(arch))
8476
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
8577
CPLUS_FLAGS += -m32 -march=pentium4 -falign-stack=maintain-16-byte

build/common.inc

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ ifeq ($(tbb_cpf),1)
4343
export CPF_SUFFIX ?=_preview
4444
endif
4545

46+
ifdef cpp0x
47+
$(warning "Warning: deprecated cpp0x=$(cpp0x) is used, stdver must be used instead. Building in stdver=c++0x mode.")
48+
export stdver ?= c++0x
49+
override cpp0x=
50+
endif
51+
52+
ifneq (,$(stdver))
53+
ifeq (,$(findstring ++, $(stdver)))
54+
$(warning "Warning: unexpected stdver=$(stdver) is used.")
55+
endif
56+
57+
CXX_STD_FLAGS = -std=$(stdver) -D_TBB_CPP0X
58+
endif
59+
60+
# The requested option is added unconditionally.
61+
# If it is not supported, a compiler warning or error is expected.
62+
# Note that CXX_STD_FLAGS can be changed in <os>.<compiler>.inc.
63+
CXX_ONLY_FLAGS += $(CXX_STD_FLAGS)
64+
4665
ifeq (,$(wildcard $(tbb_root)/build/$(tbb_os).inc))
4766
$(error "$(tbb_os)" is not supported. Add build/$(tbb_os).inc file with os-specific settings )
4867
endif
@@ -82,10 +101,6 @@ cross_cfg = $(if $(crosstest),$(call flip_cfg,$(1)),$(1))
82101
cfg?=release
83102

84103
ifdef BUILDING_PHASE
85-
# No lambdas or other C++0x extensions by default for compilers that implement them as experimental features
86-
# TODO: it should become unnecessary when all relevant tests are "moved" to the TEST_TBB_CPP11 set
87-
lambdas ?= 0
88-
cpp0x ?= 0
89104

90105
ifndef target
91106
target:=$(tbb_os)

build/common_rules.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ CPLUS_FLAGS += $(DEFINE_KEY)__TBB_CPF_BUILD=1
5151
endif
5252
LINK_FLAGS += $(LDFLAGS)
5353
LIB_LINK_FLAGS += $(LDFLAGS)
54-
CPLUS_FLAGS_NOSTRICT = $(subst -strict-ansi,-ansi,$(CPLUS_FLAGS))
5554

5655
LIB_LINK_CMD ?= $(CPLUS) $(PIC_KEY)
5756
ifeq ($(origin LIB_OUTPUT_KEY), undefined)
@@ -112,7 +111,8 @@ LINK_FILES+=$(TEST_LIBS)
112111
$(ASM) $(ASM_FLAGS) -o $@ $*.tmp
113112

114113
# Rule for generating .E file if needed for visual inspection
115-
# Note that due to mapping for ICL all uses of PREPROC_ONLY should be immediately followed by a file name
114+
# Note that ICL treats an argument after PREPROC_ONLY as a file to open,
115+
# so all uses of PREPROC_ONLY should be immediately followed by a file name
116116
%.E: %.cpp
117117
$(CPLUS) $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(INCLUDES) $(PREPROC_ONLY) $< >$@
118118

build/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ <H3>Software prerequisites:</H3>
124124
</ol>
125125
<DT><TT>make compiler=clang stdlib=libc++ <B>[</B>(above options or targets)<B>]</B></TT>
126126
<DD>Build and run as above, but use <TT>libc++</TT> as a standard c++ library for clang.
127+
<DT><TT>make stdver=<B>{</B>c++11, c++14, ...<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
128+
<DD>Build and run as above, but additionally specify the version of the C++ standard or dialect to be used by
129+
the compiler. The specified value of <TT>stdver</TT> will be used as a parameter to the appropriate
130+
compiler option (such as <TT>-std</TT>); the behavior in case of unsupported value is compiler-specific.
127131
<DT><TT>make target_ui=win8ui [target_ui_mode=production] <B>[</B>(above options or targets)<B>]</B></TT>
128132
<DD>Build and run as above, but use API that is compliant with Windows Store* applications.
129133
<TT>target_ui_mode=production</TT> is used to produce binaries that are compliant with Windows Store* application container. In later case they won't with Intel TBB unit tests but work only with Windows Store* applications.
@@ -170,7 +174,7 @@ <H4>To port the Intel TBB source code:</H4>
170174
and the scheduler yield function. See <A HREF="../include/tbb/machine/mac_ppc.h">include/tbb/machine/mac_ppc.h</A>
171175
for an example of a minimal implementation.
172176
<LI>More complex implementation examples can also be found in the
173-
<A HREF="../include/tbb/machine>include/tbb/machine"</A> directory
177+
<A HREF="../include/tbb/machine">include/tbb/machine</A> directory
174178
that implement all the individual variants of synchronization operations that Intel TBB uses.
175179
Such implementations are more verbose but may achieve better performance on a given architecture.
176180
<LI>In a given implementation, any synchronization operation that is not defined is implemented, by default,

build/linux.clang.inc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ ifeq (libc++,$(stdlib))
5050
LIB_LINK_FLAGS += -stdlib=libc++
5151
endif
5252

53-
CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X
54-
55-
ifneq (00,$(lambdas)$(cpp0x))
56-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
57-
endif
58-
5953
TBB_ASM.OBJ=
6054
MALLOC_ASM.OBJ=
6155

build/linux.gcc.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
3838
LIBS += -lpthread -lrt
3939
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
4040
C_FLAGS = $(CPLUS_FLAGS)
41-
# gcc 4.4 and higher support -std=c++0x
42-
ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[4-9]|[5-9])"))
43-
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
44-
endif
4541

4642
# gcc 4.2 and higher support OpenMP
4743
ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
@@ -60,10 +56,6 @@ ifeq ($(cfg), debug)
6056
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
6157
endif
6258

63-
ifneq (00,$(lambdas)$(cpp0x))
64-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
65-
endif
66-
6759
TBB_ASM.OBJ=
6860
MALLOC_ASM.OBJ=
6961

build/linux.icc.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ LIB_LINK_FLAGS = -shared -static-intel -Wl,-soname=$(BUILDING_LIBRARY)
4444
LIBS += -lpthread -lrt
4545
LINK_FLAGS = -rdynamic
4646
C_FLAGS = $(CPLUS_FLAGS)
47-
# ICC 11.0 and higher support -std=c++0x
48-
ifneq (,$(shell icc -dumpversion | egrep "^1[1-9]\."))
49-
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
50-
endif
5147

5248
ifneq (,$(shell icc -dumpversion | egrep "^1[6-9]\."))
5349
OPENMP_FLAG = -qopenmp
@@ -82,10 +78,6 @@ ifneq (,$(codecov))
8278
ITT_NOTIFY = -prof-genx
8379
endif
8480

85-
ifneq (00,$(lambdas)$(cpp0x))
86-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
87-
endif
88-
8981
#------------------------------------------------------------------------------
9082
# Setting assembler data.
9183
#------------------------------------------------------------------------------

build/linux.pathcc.inc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ LIBS += -lstl -lpthread -lrt
3939
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
4040
C_FLAGS = $(CPLUS_FLAGS)
4141

42-
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
4342
OPENMP_FLAG = -openmp
4443

4544
ifeq ($(cfg), release)
@@ -49,10 +48,6 @@ ifeq ($(cfg), debug)
4948
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
5049
endif
5150

52-
ifneq (00,$(lambdas)$(cpp0x))
53-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
54-
endif
55-
5651
TBB_ASM.OBJ=
5752
MALLOC_ASM.OBJ=
5853

build/macos.clang.inc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ ifneq (,$(stdlib))
5656
LIB_LINK_FLAGS += -stdlib=$(stdlib)
5757
endif
5858

59-
CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X
60-
61-
ifneq (00,$(lambdas)$(cpp0x))
62-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
63-
endif
64-
6559
ifeq (intel64,$(arch))
6660
CPLUS_FLAGS += -m64 $(RTM_KEY)
6761
LINK_FLAGS += -m64

build/macos.icc.inc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ LIBS = -lpthread
3535
LINK_FLAGS =
3636
LIB_LINK_FLAGS = -dynamiclib -static-intel -install_name @rpath/$(BUILDING_LIBRARY)
3737
C_FLAGS = $(CPLUS_FLAGS)
38-
# ICC 11.0 and higher support -std=c++0x
39-
ifneq (,$(shell icc -dumpversion | egrep "^1[1-9]\."))
40-
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
41-
endif
4238

4339
ifneq (,$(shell icc -dumpversion | egrep "^1[6-9]\."))
4440
OPENMP_FLAG = -qopenmp
@@ -63,10 +59,6 @@ ifneq (,$(codecov))
6359
CPLUS_FLAGS += -prof-genx
6460
endif
6561

66-
ifneq (00,$(lambdas)$(cpp0x))
67-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
68-
endif
69-
7062
# ICC 14.0 and higher support usage of libc++, clang standard library
7163
# Extending minimal deployment version of official binaries to unsupported 10.8
7264
# per customer requests. TODO: make a dedicated variable for this

build/mic.icc.inc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,11 @@ endif
5757
LIB_LINK_FLAGS = -shared -static-intel -Wl,-soname=$(BUILDING_LIBRARY)
5858
LIBS += -lpthread -lrt
5959
C_FLAGS = $(CPLUS_FLAGS)
60-
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
6160
CILK_AVAILABLE = yes
6261

6362
TBB_ASM.OBJ=
6463
MALLOC_ASM.OBJ=
6564

66-
ifneq (00,$(lambdas)$(cpp0x))
67-
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
68-
endif
69-
7065
CPLUS_FLAGS += -DHARNESS_INCOMPLETE_SOURCES=1 -D__TBB_MIC_NATIVE -DTBB_USE_EXCEPTIONS=0 -opt-streaming-stores never
7166
CPLUS += -mmic
7267
CONLY += -mmic

0 commit comments

Comments
 (0)