Skip to content

Commit a0eae69

Browse files
author
tbbdev
committed
Committing Intel(R) TBB 4.4 source code
1 parent d238c1f commit a0eae69

File tree

1,465 files changed

+342192
-17
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,465 files changed

+342192
-17
lines changed

CHANGES

+1,969
Large diffs are not rendered by default.

COPYING

+353
Large diffs are not rendered by default.

Makefile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright 2005-2015 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+
tbb_root?=.
20+
include $(tbb_root)/build/common.inc
21+
.PHONY: default all tbb tbbmalloc tbbproxy test examples
22+
23+
#workaround for non-depend targets tbb and tbbmalloc which both depend on version_string.ver
24+
#According to documentation, recursively invoked make commands can process their targets in parallel
25+
.NOTPARALLEL: tbb tbbmalloc tbbproxy
26+
27+
default: tbb tbbmalloc $(if $(use_proxy),tbbproxy)
28+
29+
all: tbb tbbmalloc tbbproxy test examples
30+
31+
tbb: mkdir
32+
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug
33+
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release
34+
35+
tbbmalloc: mkdir
36+
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc
37+
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc
38+
39+
tbbproxy: mkdir
40+
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy
41+
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy
42+
43+
test: tbb tbbmalloc $(if $(use_proxy),tbbproxy)
44+
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test
45+
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
46+
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
47+
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release
48+
49+
rml: mkdir
50+
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug
51+
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.rml cfg=release
52+
53+
54+
examples: tbb tbbmalloc
55+
$(MAKE) -C examples -r -f Makefile tbb_root=.. release test
56+
57+
.PHONY: clean clean_examples mkdir info
58+
59+
clean: clean_examples
60+
$(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL))
61+
$(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL))
62+
$(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL))
63+
$(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL))
64+
@echo clean done
65+
66+
clean_examples:
67+
$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL))
68+
69+
mkdir:
70+
$(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL))
71+
$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
72+
@echo Created $(work_dir)_release and ..._debug directories
73+
74+
info:
75+
@echo OS: $(tbb_os)
76+
@echo arch=$(arch)
77+
@echo compiler=$(compiler)
78+
@echo runtime=$(runtime)
79+
@echo tbb_build_prefix=$(tbb_build_prefix)
80+

README

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Intel(R) Threading Building Blocks - README
2+
3+
See index.html for directions and documentation.
4+
5+
If source is present (./Makefile and src/ directories),
6+
type 'gmake' in this directory to build and test.
7+
8+
See examples/index.html for runnable examples and directions.
9+
10+
See http://threadingbuildingblocks.org for full documentation
11+
and software information.

README.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
# Intel(R) Threading Building Blocks
1+
# Intel(R) Threading Building Blocks 4.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.
55

6-
## Intel(R) TBB Distribution
7-
* Commercial version: [https://software.intel.com/en-us/intel-tbb] (https://software.intel.com/en-us/intel-tbb)
8-
* Community licensing: [https://software.intel.com/sites/campaigns/nest/] (https://software.intel.com/sites/campaigns/nest/)
9-
* Open source version: [https://www.threadingbuildingblocks.org/] (https://www.threadingbuildingblocks.org/)
10-
* Intel(R) TBB for Python\*: [http://anaconda.org/intel/tbb] (http://anaconda.org/intel/tbb)
6+
## Release Information
7+
Here are the latest [Changes] (CHANGES) and [Release Notes]
8+
(doc/Release_Notes.txt) (contains system requirements and known issues).
119

12-
## Repository Content
13-
This is an official Intel(R) TBB public GitHub repository. All source and binary packages starting from Intel(R) TBB 4.4
14-
can be found at the [Release page] (https://github.com/01org/tbb/releases). Packages with older versions of Intel(R) TBB can be found
15-
at the [Intel(R) TBB open source site] (https://www.threadingbuildingblocks.org/)
10+
## Licensing
11+
Intel(R) TBB 4.4 is licensed under [GPLv2] (COPYING) with the runtime exception.
1612

17-
## Repository Structure
18-
The Master branch is empty and contains only README.md.
13+
## Documentation
14+
* Intel(R) TBB [tutorial] (https://software.intel.com/en-us/tbb-tutorial)
15+
* Intel(R) TBB general documentation: [stable] (https://software.intel.com/en-us/tbb-documentation)
16+
and [latest] (https://www.threadingbuildingblocks.org/docs/help/index.htm)
1917

20-
tbb_\<major_version\> - branch for the new major version. All minor versions of the major release will be committed in this branch.
18+
## Support
19+
Please report issues and suggestions via
20+
[GitHub issues](https://github.com/01org/tbb/issues) or start a topic on the
21+
[Intel(R) TBB forum](http://software.intel.com/en-us/forums/intel-threading-building-blocks/).
2122

22-
For example:
23-
* Intel(R) TBB 2017 initial release goes to branch tbb_2017.
24-
* Intel(R) TBB 2017 Update 1 will go to branch tbb_2017 too.
25-
* Intel(R) TBB 2018 initial release will go to branch tbb_2018.
23+
## How to Contribute
24+
Please read the instructions on the official [Intel(R) TBB open source site] (https://www.threadingbuildingblocks.org/submit-contribution).
2625

2726
------------------------------------------------------------------------
2827
Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries.

build/AIX.gcc.inc

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright 2005-2015 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+
COMPILE_ONLY = -c -MMD
20+
PREPROC_ONLY = -E -x c++
21+
INCLUDE_KEY = -I
22+
DEFINE_KEY = -D
23+
OUTPUT_KEY = -o #
24+
OUTPUTOBJ_KEY = -o #
25+
PIC_KEY = -fPIC
26+
WARNING_AS_ERROR_KEY = -Werror
27+
WARNING_KEY = -Wall
28+
DYLIB_KEY = -shared
29+
LIBDL = -ldl
30+
31+
CPLUS = g++
32+
CONLY = gcc
33+
LIB_LINK_FLAGS = -shared
34+
LIBS = -lpthread -ldl
35+
C_FLAGS = $(CPLUS_FLAGS) -x c
36+
37+
ifeq ($(cfg), release)
38+
CPLUS_FLAGS = -O2 -DUSE_PTHREAD -pthread
39+
endif
40+
ifeq ($(cfg), debug)
41+
CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -pthread
42+
endif
43+
44+
ASM=
45+
ASM_FLAGS=
46+
47+
TBB_ASM.OBJ=
48+
49+
ifeq (powerpc,$(arch))
50+
CPLUS_FLAGS += -maix64 -Wl,-G
51+
LIB_LINK_FLAGS += -maix64 -Wl,-b64 -Wl,-brtl -Wl,-G
52+
endif
53+
54+
#------------------------------------------------------------------------------
55+
# Setting assembler data.
56+
#------------------------------------------------------------------------------
57+
58+
ASSEMBLY_SOURCE=ibm_aix51
59+
ifeq (powerpc,$(arch))
60+
TBB_ASM.OBJ = atomic_support.o
61+
endif
62+
63+
#------------------------------------------------------------------------------
64+
# End of setting assembler data.
65+
#------------------------------------------------------------------------------
66+
67+
#------------------------------------------------------------------------------
68+
# Setting tbbmalloc data.
69+
#------------------------------------------------------------------------------
70+
71+
M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
72+
73+
#------------------------------------------------------------------------------
74+
# End of setting tbbmalloc data.
75+
#------------------------------------------------------------------------------

build/AIX.inc

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2005-2015 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+
ifndef arch
20+
arch:=$(shell uname -p)
21+
export arch
22+
endif
23+
24+
ifndef runtime
25+
gcc_version:=$(shell gcc -dumpversion)
26+
os_version:=$(shell uname -r)
27+
os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
28+
export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)
29+
endif
30+
31+
native_compiler := gcc
32+
export compiler ?= gcc
33+
debugger ?= gdb
34+
35+
CMD=$(SHELL) -c
36+
CWD=$(shell pwd)
37+
RM?=rm -f
38+
RD?=rmdir
39+
MD?=mkdir -p
40+
NUL= /dev/null
41+
SLASH=/
42+
MAKE_VERSIONS=sh $(tbb_root)/build/version_info_aix.sh $(VERSION_FLAGS) >version_string.ver
43+
MAKE_TBBVARS=sh $(tbb_root)/build/generate_tbbvars.sh
44+
45+
ifdef LIBPATH
46+
export LIBPATH := .:$(LIBPATH)
47+
else
48+
export LIBPATH := .
49+
endif
50+
51+
####### Build settings ########################################################
52+
53+
OBJ = o
54+
DLL = so
55+
56+
TBB.LST =
57+
TBB.DEF =
58+
TBB.DLL = libtbb$(CPF_SUFFIX)$(DEBUG_SUFFIX).$(DLL)
59+
TBB.LIB = $(TBB.DLL)
60+
LINK_TBB.LIB = $(TBB.LIB)
61+
62+
MALLOC.DLL = libtbbmalloc$(DEBUG_SUFFIX).$(DLL)
63+
MALLOC.LIB = $(MALLOC.DLL)
64+
LINK_MALLOC.LIB = $(MALLOC.LIB)
65+
66+
TEST_LAUNCHER=sh $(tbb_root)/build/test_launcher.sh $(largs)

build/FreeBSD.clang.inc

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Copyright 2005-2015 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+
COMPILE_ONLY = -c -MMD
20+
PREPROC_ONLY = -E -x c++
21+
INCLUDE_KEY = -I
22+
DEFINE_KEY = -D
23+
OUTPUT_KEY = -o #
24+
OUTPUTOBJ_KEY = -o #
25+
PIC_KEY = -fPIC
26+
WARNING_AS_ERROR_KEY = -Werror
27+
WARNING_KEY = -Wall
28+
TEST_WARNING_KEY = -Wextra -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor
29+
WARNING_SUPPRESS = -Wno-parentheses -Wno-non-virtual-dtor -Wno-dangling-else
30+
DYLIB_KEY = -shared
31+
EXPORT_KEY = -Wl,--version-script,
32+
LIBDL =
33+
34+
CPLUS = clang++
35+
CONLY = clang
36+
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
37+
LIBS += -lpthread -lrt
38+
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
39+
C_FLAGS = $(CPLUS_FLAGS)
40+
41+
ifeq ($(cfg), release)
42+
CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
43+
endif
44+
ifeq ($(cfg), debug)
45+
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
46+
endif
47+
48+
ifeq (libc++,$(stdlib))
49+
CPLUS_FLAGS += -stdlib=libc++
50+
LIB_LINK_FLAGS += -stdlib=libc++
51+
endif
52+
53+
CPP11_FLAGS = -std=c++11 -D_TBB_CPP0X
54+
55+
ifneq (00,$(lambdas)$(cpp0x))
56+
CXX_ONLY_FLAGS += $(CPP11_FLAGS)
57+
endif
58+
59+
TBB_ASM.OBJ=
60+
MALLOC_ASM.OBJ=
61+
62+
ifeq (intel64,$(arch))
63+
ITT_NOTIFY = -DDO_ITT_NOTIFY
64+
CPLUS_FLAGS += -m64
65+
LIB_LINK_FLAGS += -m64
66+
endif
67+
68+
ifeq (ia32,$(arch))
69+
ITT_NOTIFY = -DDO_ITT_NOTIFY
70+
CPLUS_FLAGS += -m32 -march=pentium4
71+
LIB_LINK_FLAGS += -m32
72+
endif
73+
74+
ifeq (ppc64,$(arch))
75+
CPLUS_FLAGS += -m64
76+
LIB_LINK_FLAGS += -m64
77+
endif
78+
79+
ifeq (ppc32,$(arch))
80+
CPLUS_FLAGS += -m32
81+
LIB_LINK_FLAGS += -m32
82+
endif
83+
84+
ifeq (bg,$(arch))
85+
CPLUS = bgclang++
86+
CONLY = bgclang
87+
endif
88+
89+
#------------------------------------------------------------------------------
90+
# Setting assembler data.
91+
#------------------------------------------------------------------------------
92+
ASM = as
93+
ifeq (intel64,$(arch))
94+
ASM_FLAGS += --64
95+
endif
96+
ifeq (ia32,$(arch))
97+
ASM_FLAGS += --32
98+
endif
99+
ifeq ($(cfg),debug)
100+
ASM_FLAGS += -g
101+
endif
102+
103+
ASSEMBLY_SOURCE=$(arch)-gas
104+
#------------------------------------------------------------------------------
105+
# End of setting assembler data.
106+
#------------------------------------------------------------------------------
107+
108+
#------------------------------------------------------------------------------
109+
# Setting tbbmalloc data.
110+
#------------------------------------------------------------------------------
111+
112+
M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
113+
114+
#------------------------------------------------------------------------------
115+
# End of setting tbbmalloc data.
116+
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)