Skip to content

Commit

Permalink
Committing Intel(R) TBB 4.4 Update 4 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Sep 15, 2016
1 parent 97d449b commit 3d8b180
Show file tree
Hide file tree
Showing 744 changed files with 22,692 additions and 31,465 deletions.
25 changes: 25 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
The list of most significant changes made over time in
Intel(R) Threading Building Blocks (Intel(R) TBB).

Intel TBB 4.4 Update 4
TBB_INTERFACE_VERSION == 9004

Changes (w.r.t. Intel TBB 4.4 Update 3):

- Removed a few cases of excessive user data copying in the flow graph.
- Improved robustness of concurrent_bounded_queue::abort() in case of
simultaneous push and pop operations.

Preview Features:

- Added tbb::flow::async_msg, a special message type to support
communications between the flow graph and external asynchronous
activities.
- async_node modified to support use with C++03 compilers.

Bugs fixed:

- Fixed a bug in dynamic memory allocation replacement for Windows* OS.
- Fixed excessive memory consumption on Linux* OS caused by enabling
zero-copy realloc.
- Fixed performance regression on Intel(R) Xeon Phi(tm) coprocessor with
auto_partitioner.

------------------------------------------------------------------------
Intel TBB 4.4 Update 3
TBB_INTERFACE_VERSION == 9003

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Intel(R) Threading Building Blocks 4.4 Update 3
# Intel(R) Threading Building Blocks 4.4 Update 4

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

## Licensing
Intel(R) TBB 4.4 Update 3 is licensed under [GPLv2] (COPYING) with the runtime exception.
Intel(R) TBB 4.4 Update 4 is licensed under [GPLv2] (COPYING) with the runtime exception.

## Documentation
* Intel(R) TBB [tutorial] (https://software.intel.com/en-us/tbb-tutorial)
Expand Down
6 changes: 0 additions & 6 deletions build/FreeBSD.clang.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ ifeq (libc++,$(stdlib))
LIB_LINK_FLAGS += -stdlib=libc++
endif

CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

Expand Down
14 changes: 3 additions & 11 deletions build/Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ $(SCHEDULER_DIRECTLY_INCLUDED): LINK_TBB.LIB =
$(SCHEDULER_DIRECTLY_INCLUDED): LINK_FILES += $(SCHEDULER_DEPENDENCIES)
$(SCHEDULER_DIRECTLY_INCLUDED): $(SCHEDULER_DEPENDENCIES)

# Tests that use some features of C++11
TEST_TBB_CPP11 = test_lambda.$(TEST_EXT) test_cache_aligned_allocator_STL.$(TEST_EXT)

ifneq (0,$(cpp0x))
# Made CPP11 tests use NOSTRICT flags because -strict-ansi combined with
# -std=c++0x on ICC 13.0 results in a compile error when stdlib is included
$(TEST_TBB_CPP11): CPLUS_FLAGS := $(CPLUS_FLAGS_NOSTRICT)
endif

# test_tbb_header detects "multiple definition" linker error using the test that covers the whole library
TWICE_LINKED_TESTS = test_tbb_header.$(TEST_EXT) \
test_concurrent_unordered_set.$(TEST_EXT)
Expand Down Expand Up @@ -134,6 +125,7 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
test_mutex_native_threads.$(TEST_EXT) \
test_rwm_upgrade_downgrade.$(TEST_EXT) \
test_cache_aligned_allocator.$(TEST_EXT) \
test_cache_aligned_allocator_STL.$(TEST_EXT) \
test_parallel_for.$(TEST_EXT) \
test_parallel_reduce.$(TEST_EXT) \
test_parallel_sort.$(TEST_EXT) \
Expand All @@ -143,6 +135,7 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
test_pipeline.$(TEST_EXT) \
test_pipeline_with_tbf.$(TEST_EXT) \
test_parallel_pipeline.$(TEST_EXT) \
test_lambda.$(TEST_EXT) \
test_task_scheduler_init.$(TEST_EXT) \
test_task_scheduler_observer.$(TEST_EXT) \
test_task.$(TEST_EXT) \
Expand Down Expand Up @@ -202,10 +195,9 @@ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
test_flow_graph_whitebox.$(TEST_EXT) \
test_composite_node.$(TEST_EXT) \
test_async_node.$(TEST_EXT) \
test_async_msg.$(TEST_EXT) \
test_tbb_version.$(TEST_EXT) # insert new files right above

TEST_TBB_PLAIN.EXE += $(TEST_TBB_CPP11)

# skip mode_plugin for now
skip_tests += test_model_plugin

Expand Down
10 changes: 0 additions & 10 deletions build/android.gcc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ endif
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
C_FLAGS = $(CPLUS_FLAGS)

# Supported g++ versions support C++11
# On Android/gcc 4.4.3, -std=c++0x causes ::int64_t and ::uint64_t to be undefined.
CPP11_FLAGS = -std=c++11 $(DEFINE_KEY)_TBB_CPP0X

ifeq ($(cfg), release)
CPLUS_FLAGS = -O2
endif
Expand All @@ -75,12 +71,6 @@ CPLUS_FLAGS += --sysroot=$(SYSROOT)
LIB_LINK_FLAGS += --sysroot=$(SYSROOT)
LIBS = -L$(CPLUS_LIB_PATH) -lgnustl_shared

# This causes CPP11_FLAGS to be issued twice for test_lambda.cpp
# TODO: Fix this in general for all platforms once the correct strategy is determined.
ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

ifeq (ia32,$(arch))
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
CPLUS_FLAGS += -m32
Expand Down
8 changes: 0 additions & 8 deletions build/android.icc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ endif

LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
C_FLAGS = $(CPLUS_FLAGS)

CPP11_FLAGS = -std=c++11 $(DEFINE_KEY)_TBB_CPP0X

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

# This causes CPP11_FLAGS to be issued twice for test_lambda.cpp
# TODO: Fix this in general for all platforms once the correct strategy is determined.
ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

ifeq (ia32,$(arch))
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
CPLUS_FLAGS += -m32 -march=pentium4 -falign-stack=maintain-16-byte
Expand Down
23 changes: 19 additions & 4 deletions build/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@ ifeq ($(tbb_cpf),1)
export CPF_SUFFIX ?=_preview
endif

ifdef cpp0x
$(warning "Warning: deprecated cpp0x=$(cpp0x) is used, stdver must be used instead. Building in stdver=c++0x mode.")
export stdver ?= c++0x
override cpp0x=
endif

ifneq (,$(stdver))
ifeq (,$(findstring ++, $(stdver)))
$(warning "Warning: unexpected stdver=$(stdver) is used.")
endif

CXX_STD_FLAGS = -std=$(stdver) -D_TBB_CPP0X
endif

# The requested option is added unconditionally.
# If it is not supported, a compiler warning or error is expected.
# Note that CXX_STD_FLAGS can be changed in <os>.<compiler>.inc.
CXX_ONLY_FLAGS += $(CXX_STD_FLAGS)

ifeq (,$(wildcard $(tbb_root)/build/$(tbb_os).inc))
$(error "$(tbb_os)" is not supported. Add build/$(tbb_os).inc file with os-specific settings )
endif
Expand Down Expand Up @@ -82,10 +101,6 @@ cross_cfg = $(if $(crosstest),$(call flip_cfg,$(1)),$(1))
cfg?=release

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

ifndef target
target:=$(tbb_os)
Expand Down
4 changes: 2 additions & 2 deletions build/common_rules.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ CPLUS_FLAGS += $(DEFINE_KEY)__TBB_CPF_BUILD=1
endif
LINK_FLAGS += $(LDFLAGS)
LIB_LINK_FLAGS += $(LDFLAGS)
CPLUS_FLAGS_NOSTRICT = $(subst -strict-ansi,-ansi,$(CPLUS_FLAGS))

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

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

Expand Down
6 changes: 5 additions & 1 deletion build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ <H3>Software prerequisites:</H3>
</ol>
<DT><TT>make compiler=clang stdlib=libc++ <B>[</B>(above options or targets)<B>]</B></TT>
<DD>Build and run as above, but use <TT>libc++</TT> as a standard c++ library for clang.
<DT><TT>make stdver=<B>{</B>c++11, c++14, ...<B>}</B> <B>[</B>(above options or targets)<B>]</B></TT>
<DD>Build and run as above, but additionally specify the version of the C++ standard or dialect to be used by
the compiler. The specified value of <TT>stdver</TT> will be used as a parameter to the appropriate
compiler option (such as <TT>-std</TT>); the behavior in case of unsupported value is compiler-specific.
<DT><TT>make target_ui=win8ui [target_ui_mode=production] <B>[</B>(above options or targets)<B>]</B></TT>
<DD>Build and run as above, but use API that is compliant with Windows Store* applications.
<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.
Expand Down Expand Up @@ -170,7 +174,7 @@ <H4>To port the Intel TBB source code:</H4>
and the scheduler yield function. See <A HREF="../include/tbb/machine/mac_ppc.h">include/tbb/machine/mac_ppc.h</A>
for an example of a minimal implementation.
<LI>More complex implementation examples can also be found in the
<A HREF="../include/tbb/machine>include/tbb/machine"</A> directory
<A HREF="../include/tbb/machine">include/tbb/machine</A> directory
that implement all the individual variants of synchronization operations that Intel TBB uses.
Such implementations are more verbose but may achieve better performance on a given architecture.
<LI>In a given implementation, any synchronization operation that is not defined is implemented, by default,
Expand Down
6 changes: 0 additions & 6 deletions build/linux.clang.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ ifeq (libc++,$(stdlib))
LIB_LINK_FLAGS += -stdlib=libc++
endif

CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

Expand Down
8 changes: 0 additions & 8 deletions build/linux.gcc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
LIBS += -lpthread -lrt
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
C_FLAGS = $(CPLUS_FLAGS)
# gcc 4.4 and higher support -std=c++0x
ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[4-9]|[5-9])"))
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
endif

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

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

Expand Down
8 changes: 0 additions & 8 deletions build/linux.icc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ LIB_LINK_FLAGS = -shared -static-intel -Wl,-soname=$(BUILDING_LIBRARY)
LIBS += -lpthread -lrt
LINK_FLAGS = -rdynamic
C_FLAGS = $(CPLUS_FLAGS)
# ICC 11.0 and higher support -std=c++0x
ifneq (,$(shell icc -dumpversion | egrep "^1[1-9]\."))
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
endif

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

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

#------------------------------------------------------------------------------
# Setting assembler data.
#------------------------------------------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions build/linux.pathcc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ LIBS += -lstl -lpthread -lrt
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
C_FLAGS = $(CPLUS_FLAGS)

CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
OPENMP_FLAG = -openmp

ifeq ($(cfg), release)
Expand All @@ -49,10 +48,6 @@ ifeq ($(cfg), debug)
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
endif

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

Expand Down
6 changes: 0 additions & 6 deletions build/macos.clang.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ ifneq (,$(stdlib))
LIB_LINK_FLAGS += -stdlib=$(stdlib)
endif

CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

ifeq (intel64,$(arch))
CPLUS_FLAGS += -m64 $(RTM_KEY)
LINK_FLAGS += -m64
Expand Down
8 changes: 0 additions & 8 deletions build/macos.icc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ LIBS = -lpthread
LINK_FLAGS =
LIB_LINK_FLAGS = -dynamiclib -static-intel -install_name @rpath/$(BUILDING_LIBRARY)
C_FLAGS = $(CPLUS_FLAGS)
# ICC 11.0 and higher support -std=c++0x
ifneq (,$(shell icc -dumpversion | egrep "^1[1-9]\."))
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
endif

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

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

# ICC 14.0 and higher support usage of libc++, clang standard library
# Extending minimal deployment version of official binaries to unsupported 10.8
# per customer requests. TODO: make a dedicated variable for this
Expand Down
5 changes: 0 additions & 5 deletions build/mic.icc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,11 @@ endif
LIB_LINK_FLAGS = -shared -static-intel -Wl,-soname=$(BUILDING_LIBRARY)
LIBS += -lpthread -lrt
C_FLAGS = $(CPLUS_FLAGS)
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
CILK_AVAILABLE = yes

TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

ifneq (00,$(lambdas)$(cpp0x))
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
endif

CPLUS_FLAGS += -DHARNESS_INCOMPLETE_SOURCES=1 -D__TBB_MIC_NATIVE -DTBB_USE_EXCEPTIONS=0 -opt-streaming-stores never
CPLUS += -mmic
CONLY += -mmic
Expand Down
Loading

0 comments on commit 3d8b180

Please sign in to comment.