Skip to content

Commit

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

Intel TBB 4.4 Update 3
TBB_INTERFACE_VERSION == 9003

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

- Modified parallel_sort to not require a default constructor for values
and to use iter_swap() for value swapping.
- Added support for creating or initializing a task_arena instance that
is connected to the arena currently used by the thread.
- graph/binpack example modified to use multifunction_node.
- For performance analysis, use Intel(R) VTune(TM) Amplifier XE 2015
and higher; older versions are no longer supported.
- Improved support for compilation with disabled RTTI, by omitting its use
in auxiliary code, such as assertions. However some functionality,
particularly the flow graph, does not work if RTTI is disabled.
- The tachyon example for Android* can be built using Android Studio 1.5
and higher with experimental Gradle plugin 0.4.0.

Preview Features:

- Added class opencl_subbufer that allows using OpenCL* sub-buffer
objects with opencl_node.
- Class global_control supports the value of 1 for
max_allowed_parallelism.

Bugs fixed:

- Fixed a race causing "TBB Warning: setaffinity syscall failed" message.
- Fixed a compilation issue on OS X* with Intel(R) C++ Compiler 15.0.
- Fixed a bug in queuing_rw_mutex::downgrade() that could temporarily
block new readers.
- Fixed speculative_spin_rw_mutex to stop using the lazy subscription
technique due to its known flaws.
- Fixed memory leaks in the tool support code.

------------------------------------------------------------------------
Intel TBB 4.4 Update 2
TBB_INTERFACE_VERSION == 9002

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
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 2
# Intel(R) Threading Building Blocks 4.4 Update 3

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 2 is licensed under [GPLv2] (COPYING) with the runtime exception.
Intel(R) TBB 4.4 Update 3 is licensed under [GPLv2] (COPYING) with the runtime exception.

## Documentation
* Intel(R) TBB [tutorial] (https://software.intel.com/en-us/tbb-tutorial)
Expand Down
2 changes: 1 addition & 1 deletion build/AIX.gcc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/AIX.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/FreeBSD.clang.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/FreeBSD.gcc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/FreeBSD.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.rml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.tbb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.tbbmalloc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.tbbproxy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/SunOS.gcc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/SunOS.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion build/SunOS.suncc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down
30 changes: 9 additions & 21 deletions build/android.gcc.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -45,14 +45,12 @@ ifeq ($(APP_PIE), false)
PIE_FLAG=
endif

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

# gcc 4.4 and higher support C++11
ifneq (,$(shell $(CPLUS) -dumpversion | egrep "^(4\.[4-9]|[5-9])"))
# On Android/gcc 4.4.3, -std=c++0x causes ::int64_t and ::uint64_t to be undefined.
CPP11_FLAGS = -std=gnu++0x $(DEFINE_KEY)_TBB_CPP0X
endif
# 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
Expand All @@ -67,14 +65,6 @@ ifneq (,$(findstring $(arch),ia32 intel64))
CPLUS_FLAGS += $(DEFINE_KEY)DO_ITT_NOTIFY
endif

ifneq (0, $(dlopen_workaround))
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_REENTRANCY_WORKAROUND=1
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_MAIN_PROGRAM_WORKAROUND=1
else
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_REENTRANCY_WORKAROUND=0
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_USE_DLOPEN_MAIN_PROGRAM_WORKAROUND=0
endif

ifeq (0, $(dynamic_load))
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_DYNAMIC_LOAD_ENABLED=0
endif
Expand All @@ -95,15 +85,13 @@ ifeq (ia32,$(arch))
# TODO: Determine best setting of -march and add to CPLUS_FLAGS
CPLUS_FLAGS += -m32
LIB_LINK_FLAGS += -m32
endif

ifeq (intel64,$(arch))
else ifeq (intel64,$(arch))
CPLUS_FLAGS += -m64
LIB_LINK_FLAGS += -m64
endif

ifeq (arm,$(findstring arm,$(arch)))
else ifeq (arm,$(arch))
CPLUS_FLAGS += -march=armv7-a $(DEFINE_KEY)TBB_USE_GCC_BUILTINS=1 $(DEFINE_KEY)__TBB_64BIT_ATOMICS=0
else ifeq (arm64,$(arch))
CPLUS_FLAGS += -march=armv8-a
endif

#------------------------------------------------------------------------------
Expand Down
128 changes: 128 additions & 0 deletions build/android.icc.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation. Threading Building Blocks is
# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of
# the GNU General Public License along with Threading Building Blocks; if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# As a special exception, you may use this file as part of a free software library without
# restriction. Specifically, if other files instantiate templates or use macros or inline
# functions from this file, or you compile this file and link it with other files to produce
# an executable, this file does not by itself cause the resulting executable to be covered
# by the GNU General Public License. This exception does not however invalidate any other
# reasons why the executable file might be covered by the GNU General Public License.


COMPILE_ONLY = -c -MMD
PREPROC_ONLY = -E -x c++
INCLUDE_KEY = -I
DEFINE_KEY = -D
OUTPUT_KEY = -o #
OUTPUTOBJ_KEY = -o #
PIC_KEY = -fPIC
WARNING_AS_ERROR_KEY = -Werror
WARNING_KEY =
TEST_WARNING_KEY = -Wshadow -Woverloaded-virtual -Wextra

WARNING_SUPPRESS = -Wno-parentheses -Wno-non-virtual-dtor
DYLIB_KEY = -shared
EXPORT_KEY = -Wl,--version-script,
LIBDL = -ldl

CPLUS = icpc
CONLY = icc

# -soname is necessary for proper linkage to TBB prebuilt libraries when building application with Android SDK
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)

# pie is necessary for test executables to work and might be removed if newer NDK will add it implicitly
PIE_FLAG = -pie
ifeq ($(APP_PIE), false)
PIE_FLAG=
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
endif
ifeq ($(cfg), debug)
CPLUS_FLAGS = -g -O0 $(DEFINE_KEY)TBB_USE_DEBUG
endif

CPLUS_FLAGS += $(DEFINE_KEY)USE_PTHREAD $(DEFINE_KEY)_GLIBCXX_HAVE_FENV_H

ifneq (,$(findstring $(arch),ia32 intel64))
CPLUS_FLAGS += $(DEFINE_KEY)DO_ITT_NOTIFY
endif

ifeq (0, $(dynamic_load))
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_DYNAMIC_LOAD_ENABLED=0
endif


# Paths to the NDK prebuilt tools and libraries
CPLUS_FLAGS += --sysroot=$(SYSROOT)
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
LIB_LINK_FLAGS += -m32
else
ifeq (intel64,$(arch))
CPLUS_FLAGS += -m64
LIB_LINK_FLAGS += -m64
endif
endif

ifeq (arm,$(findstring arm,$(arch)))
$(error "Unsupported architecture $(arch) for icc compiler")
endif

#------------------------------------------------------------------------------
# Setting assembler data.
#------------------------------------------------------------------------------
TBB_ASM.OBJ=
MALLOC_ASM.OBJ=

ASM = $(tbb_tool_prefix)as
ifeq (intel64,$(arch))
ASM_FLAGS += --64
endif
ifeq (ia32,$(arch))
ASM_FLAGS += --32
endif
ifeq ($(cfg),debug)
ASM_FLAGS += -g
endif

ASSEMBLY_SOURCE=$(arch)-gas
#------------------------------------------------------------------------------
# End of setting assembler data.
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Setting tbbmalloc data.
#------------------------------------------------------------------------------

M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions

#------------------------------------------------------------------------------
# End of setting tbbmalloc data.
#------------------------------------------------------------------------------
41 changes: 20 additions & 21 deletions build/android.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2005-2015 Intel Corporation. All Rights Reserved.
# Copyright 2005-2016 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks. Threading Building Blocks is free software;
# you can redistribute it and/or modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -28,35 +28,34 @@ ifeq (android,$(findstring android,$(tbb_os)))
$(error TBB only supports cross-compilation for Android. Specify "target=android" instead.)
endif

ifneq ("command line","$(origin arch)")
ifeq (icc,$(compiler))
export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
ifneq (,$(findstring IA-32, $(COMPILER_VERSION)))
export arch:=ia32
else ifneq (,$(findstring Intel(R) 64, $(COMPILER_VERSION)))
export arch:=intel64
else
$(error "No support for Android in $(COMPILER_VERSION)")
endif

else
ifdef ANDROID_SERIAL
uname_m:=$(shell adb shell uname -m)
ifeq (i686,$(uname_m))
ifndef BUILDING_PHASE
ifneq ("command line","$(origin arch)")
ifeq (icc,$(compiler))
export COMPILER_VERSION := ICC: $(shell icc -V </dev/null 2>&1 | grep 'Version')
ifneq (,$(findstring running on IA-32, $(COMPILER_VERSION)))
export arch:=ia32
else ifneq (,$(findstring running on Intel(R) 64, $(COMPILER_VERSION)))
export arch:=intel64
else
export arch:=$(uname_m)
$(error "No support for Android in $(COMPILER_VERSION)")
endif

else
ifndef arch
$(error "No target architecture specified and \'ANDROID_SERIAL\' environment variable specifying target device not set")
ifdef ANDROID_SERIAL
uname_m:=$(shell adb shell uname -m)
ifeq (i686,$(uname_m))
export arch:=ia32
else
export arch:=$(uname_m)
endif
endif
endif
endif
endif

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

# Android platform only supported from TBB 4.1 forward
NO_LEGACY_TESTS = 1
Expand Down
Loading

0 comments on commit 97d449b

Please sign in to comment.