diff --git a/CHANGES b/CHANGES index 1421c43323fad5ef443f4625534c4d5c9a32a286..f2fc2d3843f505686150504a38ba6534275d925f 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/Makefile b/Makefile index bc459897b3fa62e09d8bd3fdf6a1039f77f0cfd8..38f1c3c4af659dcc80c5ffa8aa34909586bd3127 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 4051868f72bf2b60f50c573b0edf7493a9d7a4cd..2569905448fc257220990d70a9e4f16f77f9dcdc 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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) diff --git a/build/AIX.gcc.inc b/build/AIX.gcc.inc index 3b19a6d92fde98aec62b68354ead83262d33d5cf..b096ea7dd262fb26ab0b97aecfd314b83a392ff8 100644 --- a/build/AIX.gcc.inc +++ b/build/AIX.gcc.inc @@ -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 diff --git a/build/AIX.inc b/build/AIX.inc index 5f87361d2f391bb55bc762de353f4ce0bed60d6b..1fe0dda3fed3a637b47bf98d88537cc5cf348cdc 100644 --- a/build/AIX.inc +++ b/build/AIX.inc @@ -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 diff --git a/build/FreeBSD.clang.inc b/build/FreeBSD.clang.inc index 5cee5d78fc8cc3d6a65b31d5d7ceea99023816b6..742277b0a8ec108d5a5ea277ba1faddbef65eab3 100644 --- a/build/FreeBSD.clang.inc +++ b/build/FreeBSD.clang.inc @@ -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 diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc index 20f002711a147ea871dd532a63cbc9b786a17564..2107a8f7654928a9dfda361713ce06831145eba1 100644 --- a/build/FreeBSD.gcc.inc +++ b/build/FreeBSD.gcc.inc @@ -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 diff --git a/build/FreeBSD.inc b/build/FreeBSD.inc index 11d125e0de4ba00e4b18934a4dc05d3560e1eb0f..30d14041e4496bd95c1586ec6886e9cef5bc12e2 100644 --- a/build/FreeBSD.inc +++ b/build/FreeBSD.inc @@ -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 diff --git a/build/Makefile.rml b/build/Makefile.rml index 43cba2dd605f3d3763996063a46dd83b3d97bf89..c56bb6fde7d2639d0744647ee6e5c401e4669f72 100644 --- a/build/Makefile.rml +++ b/build/Makefile.rml @@ -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 diff --git a/build/Makefile.tbb b/build/Makefile.tbb index 06e76e2b32f2487d121f21248219d86e2cca2f97..fc6549713bbe08008fcf156ce989f75412f31c6a 100644 --- a/build/Makefile.tbb +++ b/build/Makefile.tbb @@ -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 diff --git a/build/Makefile.tbbmalloc b/build/Makefile.tbbmalloc index f2be65e12a02708dd06f871a7888db24d177e93e..25e61ee30149b4a8e9e3f3e15b304922c4e2b358 100644 --- a/build/Makefile.tbbmalloc +++ b/build/Makefile.tbbmalloc @@ -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 diff --git a/build/Makefile.tbbproxy b/build/Makefile.tbbproxy index 706037e7eda4e8637ab38d0d3e417b2007e5ab41..a7ce066a732e268e6ac9bb52f840b1cbc5c63195 100644 --- a/build/Makefile.tbbproxy +++ b/build/Makefile.tbbproxy @@ -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 diff --git a/build/Makefile.test b/build/Makefile.test index 13e1ef6c718cfb5d78d3b5c9613422653bab33c4..aac409bcffc00ed95bf18324f32a1d5fc1293831 100644 --- a/build/Makefile.test +++ b/build/Makefile.test @@ -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 diff --git a/build/SunOS.gcc.inc b/build/SunOS.gcc.inc index 65df43c83cd8b805189f8ee2212a42a4234e4869..dfeda53943140c6665bf1c9924c6f29fed28f3ac 100644 --- a/build/SunOS.gcc.inc +++ b/build/SunOS.gcc.inc @@ -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 diff --git a/build/SunOS.inc b/build/SunOS.inc index 6f46bab54fdcc6b10d4f43a3938c8c2af3c05681..be790739d3c5931a8e156835d17899e526878fdf 100644 --- a/build/SunOS.inc +++ b/build/SunOS.inc @@ -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 diff --git a/build/SunOS.suncc.inc b/build/SunOS.suncc.inc index 5a6c6d90a12733403805460560ba86adbec93f97..0215e605fb233c0ae8d567278a8a79ea39ba6495 100644 --- a/build/SunOS.suncc.inc +++ b/build/SunOS.suncc.inc @@ -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 diff --git a/build/android.gcc.inc b/build/android.gcc.inc index fd4607af579c4d51f6a44b635a2b7f7362f48ebc..90b573ba96638476db1a9f2ad7065e6e9e5c0825 100644 --- a/build/android.gcc.inc +++ b/build/android.gcc.inc @@ -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 @@ -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 @@ -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 @@ -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 #------------------------------------------------------------------------------ diff --git a/build/android.icc.inc b/build/android.icc.inc new file mode 100644 index 0000000000000000000000000000000000000000..216cf7b4e9ef44bb56009b8f124f2480f3ee46d7 --- /dev/null +++ b/build/android.icc.inc @@ -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. +#------------------------------------------------------------------------------ diff --git a/build/android.inc b/build/android.inc index 061e308bde2075779af09d6c12215ec95c472952..6c3988348d7a7048a0a95f56884df57bb36c9974 100644 --- a/build/android.inc +++ b/build/android.inc @@ -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 @@ -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 &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 &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 diff --git a/build/android.linux.inc b/build/android.linux.inc index ab40bcc99616b55e82b0afe1b8e2f8819ed71324..cfaef9e8a94ad8bbb78c534e0bee04f8f3a78109 100644 --- a/build/android.linux.inc +++ b/build/android.linux.inc @@ -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 @@ -32,8 +32,8 @@ endif gcc_version = $(shell $(tbb_tool_prefix)g++ -dumpversion) ifdef ANDROID_NDK_ROOT - $(warning "NDK version $(ANDROID_NDK_ROOT)") ndk_version:= $(lastword $(subst -, ,$(ANDROID_NDK_ROOT))) + $(warning "NDK version $(ndk_version)") else $(warning "NDK version not set in environment, using \'unknown\' instead.") ndk_version:=unknown diff --git a/build/android.linux.launcher.sh b/build/android.linux.launcher.sh index 5de025cb8f56b274afc6367ef8a668c1bac0c074..68eb8e4dfb147eb0b3c649172a884741deb89244 100644 --- a/build/android.linux.launcher.sh +++ b/build/android.linux.launcher.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -84,11 +84,11 @@ else # fi # # Find the TBB libraries and add them to the list. # Add TBB libraries from the current directory that contains libtbb* files -files="$(/bin/ls libtbb* 2> /dev/null)" # +files="$(ls libtbb* 2> /dev/null)" # [ -z "$files" ] || fnamelist="$fnamelist $files" # # Add any libraries built for specific tests. exeroot=${exename%\.*} # -files="$(/bin/ls ${exeroot}*.so ${exeroot}*.so.* 2> /dev/null)" # +files="$(ls ${exeroot}*.so ${exeroot}*.so.* 2> /dev/null)" # [ -z "$files" ] || fnamelist="$fnamelist $files" # # TODO: Add extra libraries from the Intel(R) Compiler for certain tests # found=$(echo $exename | egrep 'test_malloc_atexit\|test_malloc_lib_unload' 2> /dev/null) @@ -137,6 +137,7 @@ for fullname in "$@"; do { # [ -z "$ldpreload" ] || run_prefix="LD_PRELOAD='$ldpreload' $run_prefix" # [ $verbose ] && echo Running $run_prefix ./$exename $* # run_env="$run_env cd $targetdir; export LD_LIBRARY_PATH=." # +[ -z "$VIRTUAL_MACHINE" ] || run_env="$run_env; export VIRTUAL_MACHINE=$VIRTUAL_MACHINE" # # The return_code file is the best way found to return the status of the test execution when using adb shell. eval 'adb shell "$run_env; $run_prefix ./$exename $* || echo -n \$? >error_code"' "${OUTPUT}" # # Capture the return code string and remove the trailing \r from the return_code file contents diff --git a/build/android.macos.inc b/build/android.macos.inc index 2f1b348316a2d01651cf754960569f90dbf779fa..04b2da3a63a51bfe241fc617d115da276a303ace 100644 --- a/build/android.macos.inc +++ b/build/android.macos.inc @@ -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 @@ -32,8 +32,8 @@ endif gcc_version = $(shell $(tbb_tool_prefix)g++ -dumpversion) ifdef ANDROID_NDK_ROOT - $(warning "NDK version $(ANDROID_NDK_ROOT)") ndk_version:= $(lastword $(subst -, ,$(ANDROID_NDK_ROOT))) + $(warning "NDK version $(ndk_version)") else $(warning "NDK version not set in environment, using \'unknown\' instead.") ndk_version:=unknown diff --git a/build/android.windows.inc b/build/android.windows.inc index 742f240a7f357a9f8f23e6b782244d4cca52af22..c402d91a54ce17837fd8d1f64ba474b0489734b4 100644 --- a/build/android.windows.inc +++ b/build/android.windows.inc @@ -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 @@ -32,8 +32,8 @@ endif gcc_version = $(shell $(tbb_tool_prefix)g++ -dumpversion) ifdef ANDROID_NDK_ROOT - $(warning "NDK version $(ANDROID_NDK_ROOT)") ndk_version:= $(lastword $(subst -, ,$(ANDROID_NDK_ROOT))) + $(warning "NDK version $(ndk_version)") else $(warning "NDK version not set in environment, using \'unknown\' instead.") ndk_version:=unknown diff --git a/build/big_iron.inc b/build/big_iron.inc index 9bafc78d889ca65ad3c5ae581ccbaae2227c12e8..40a480717a4745dd474bc9136396c8c78330a0c7 100644 --- a/build/big_iron.inc +++ b/build/big_iron.inc @@ -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 diff --git a/build/common.inc b/build/common.inc index 6aa702d8b6ead32694719d647dd8ac99f0730dbb..a068247bafb0158b9057dc70f4f3177a579859d2 100644 --- a/build/common.inc +++ b/build/common.inc @@ -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 diff --git a/build/common_rules.inc b/build/common_rules.inc index 410bd9afd7fa616c217171ebb2a31867cad9a6e1..b99f9819ae547874a8ef8c97ec6eff918fd63cfc 100644 --- a/build/common_rules.inc +++ b/build/common_rules.inc @@ -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 @@ -92,7 +92,7 @@ endef LINK_FILES+=$(TEST_LIBS) # Rule for generating executable test %.$(TEST_EXT): %.$(OBJ) $(TEST_LIBS) $(TEST_PREREQUISITE) $(if $(use_proxy),$(PROXY.LIB)) - $(call make-test-binary,$@,$< $(LINK_FILES)) + $(call make-test-binary,$@,$< $(LINK_FILES) $(PIE_FLAG)) # Rules for generating a test DLL %_dll.$(DLL): LINK_FLAGS += $(PIC_KEY) $(DYLIB_KEY) diff --git a/build/detect.js b/build/detect.js index 9315fe2fedf539d608503c00f01079b58911a1ca..ebe6c9b2938faec94e130e43f5a45dd611a79dec 100644 --- a/build/detect.js +++ b/build/detect.js @@ -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 diff --git a/build/generate_tbbvars.bat b/build/generate_tbbvars.bat index 2eb47c17ad1d7c9e6008f0e9e1af298eda1e5861..29cf74dcf76eaca935e02e8860aa4bc12d190dc7 100644 --- a/build/generate_tbbvars.bat +++ b/build/generate_tbbvars.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 2005-2015 Intel Corporation. All Rights Reserved. +REM Copyright 2005-2016 Intel Corporation. All Rights Reserved. REM REM This file is part of Threading Building Blocks. Threading Building Blocks is free software; REM you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/build/generate_tbbvars.sh b/build/generate_tbbvars.sh index 2f15e1a639b8773233cb6b02ce03e6900643df68..cea33ad4001159fb32753031fc2e81239087f7ed 100644 --- a/build/generate_tbbvars.sh +++ b/build/generate_tbbvars.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# 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 diff --git a/build/index.html b/build/index.html index 7c69ebb5c5986df85229ae72c45ebed839dc6264..268e8d04e28e98e995689948cbc894204a5284f6 100644 --- a/build/index.html +++ b/build/index.html @@ -223,7 +223,7 @@ See the Makefile infrastructure files for examples.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel and Itanium are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/build/ios.clang.inc b/build/ios.clang.inc new file mode 100644 index 0000000000000000000000000000000000000000..a4b6db43a73136d69c55336f59f4c1bc05a05209 --- /dev/null +++ b/build/ios.clang.inc @@ -0,0 +1,23 @@ +# 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. + +include $(tbb_root)/build/macos.clang.inc + +CPLUS_FLAGS += -miphoneos-version-min=8.0 +LINK_FLAGS += -miphoneos-version-min=8.0 +LIB_LINK_FLAGS += -miphoneos-version-min=8.0 diff --git a/build/ios.macos.inc b/build/ios.macos.inc new file mode 100644 index 0000000000000000000000000000000000000000..f03bd8c8090b5618e8da7e450ba06e7ff9f4d1af --- /dev/null +++ b/build/ios.macos.inc @@ -0,0 +1,36 @@ +# 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. + +ifneq ($(arch),$(filter $(arch),ia32 intel64 armv7 armv7s arm64)) + $(error $(arch) is unknown architecture. Known arhitechtures are ia32 intel64 armv7 armv7s arm64) +endif + +# if target is ios but arch is ia32/intel64 then build for 32/64 simulator! +ifeq (,$(SDKROOT)) + ifeq ($(arch),$(filter $(arch),ia32 intel64)) + export SDKROOT:=$(shell xcodebuild -sdk -version | grep -o -E '/.*SDKs/iPhoneSimulator.*' 2>/dev/null) + else + export SDKROOT:=$(shell xcodebuild -sdk -version | grep -o -E '/.*SDKs/iPhoneOS.*' 2>/dev/null) + endif +endif +ifeq (,$(SDKROOT)) + $(error iOS* SDK not found) +endif + +ios_version:=$(shell echo $(SDKROOT) | sed -e "s/.*[a-z,A-Z]\(.*\).sdk/\1/") +runtime:=cc$(clang_version)_ios$(ios_version) diff --git a/build/linux.clang.inc b/build/linux.clang.inc index de9aee5301c1cf31ce447a10b9db1cb3c2d105a7..891d0c5d9bd7f336f31bd23a19dadec1f6321b37 100644 --- a/build/linux.clang.inc +++ b/build/linux.clang.inc @@ -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 diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc index 9d93cfc17972aa6435017d3c67a24f27bf604d92..0112665ff5f9cbe89a7c932bb77f3cb4fd2f7b2d 100644 --- a/build/linux.gcc.inc +++ b/build/linux.gcc.inc @@ -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 diff --git a/build/linux.icc.inc b/build/linux.icc.inc index 4d1da053c018e3da5b736723b9f1e9c7f75ef594..41d381dc74e75dd967663ae50d3c8b3eb37003b2 100644 --- a/build/linux.icc.inc +++ b/build/linux.icc.inc @@ -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 diff --git a/build/linux.inc b/build/linux.inc index 0fae348538fbab84410a42704d3b7b6f48da95d9..b2a9abb6a70cf5a269eddf2bdc3dfb7a02419f94 100644 --- a/build/linux.inc +++ b/build/linux.inc @@ -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 @@ -20,14 +20,16 @@ ifeq (icc,$(compiler)) export COMPILER_VERSION := ICC: $(shell icc -V &1 | grep 'Version') - ifneq (,$(findstring IA-32, $(COMPILER_VERSION))) + ifneq (,$(findstring running on IA-32, $(COMPILER_VERSION))) export arch:=ia32 - endif - ifneq (,$(findstring Intel(R) 64, $(COMPILER_VERSION))) - export arch:=intel64 - endif - ifneq (,$(findstring IA-64, $(COMPILER_VERSION))) - export arch:=ia64 + else + ifneq (,$(findstring running on Intel(R) 64, $(COMPILER_VERSION))) + export arch:=intel64 + else + ifneq (,$(findstring IA-64, $(COMPILER_VERSION))) + export arch:=ia64 + endif + endif endif ifeq (,$(arch)) $(warning "Unknown Intel compiler") diff --git a/build/linux.pathcc.inc b/build/linux.pathcc.inc index 477de0311407ec1a1491ec54026983db51c035bd..c4f8ea84547b296f50557ba459a37efe354f3c59 100644 --- a/build/linux.pathcc.inc +++ b/build/linux.pathcc.inc @@ -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 diff --git a/build/linux.xl.inc b/build/linux.xl.inc index 083b883297181272ac1c41fb057216b45bba89f4..1b8d149599e128b463f4336aa74c3c9325b546bd 100644 --- a/build/linux.xl.inc +++ b/build/linux.xl.inc @@ -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 diff --git a/build/macos.clang.inc b/build/macos.clang.inc index b56d86cafac4d3c76830f10be59be24e824d4a88..d297f8e276b79a919abc5c09613484d4c4e02acc 100644 --- a/build/macos.clang.inc +++ b/build/macos.clang.inc @@ -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 @@ -86,26 +86,15 @@ ifeq (ppc32,$(arch)) LIB_LINK_FLAGS += -arch ppc endif -ifeq (armv7,$(arch)) - CPLUS_FLAGS += -arch armv7 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LINK_FLAGS += -arch armv7 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LIB_LINK_FLAGS += -arch armv7 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode -endif - -ifeq (armv7s,$(arch)) - CPLUS_FLAGS += -arch armv7s -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LINK_FLAGS += -arch armv7s -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LIB_LINK_FLAGS += -arch armv7s -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode -endif - -ifeq (arm64,$(arch)) - CPLUS_FLAGS += -arch arm64 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LINK_FLAGS += -arch arm64 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode - LIB_LINK_FLAGS += -arch arm64 -miphoneos-version-min=8.0 -Wno-implicit-function-declaration -fembed-bitcode +ifeq ($(arch),$(filter $(arch),armv7 armv7s arm64)) + CPLUS_FLAGS += -arch $(arch) + LINK_FLAGS += -arch $(arch) + LIB_LINK_FLAGS += -arch $(arch) endif ifdef SDKROOT CPLUS_FLAGS += -isysroot $(SDKROOT) + LINK_FLAGS += -L$(SDKROOT)/usr/lib/system -L$(SDKROOT)/usr/lib/ LIB_LINK_FLAGS += -L$(SDKROOT)/usr/lib/system -L$(SDKROOT)/usr/lib/ endif diff --git a/build/macos.gcc.inc b/build/macos.gcc.inc index 75a9b8c80ac5992ff09a9c9380bb6943d943dd4e..5947b245d79f8683c3f915537bbe2f68253795d4 100644 --- a/build/macos.gcc.inc +++ b/build/macos.gcc.inc @@ -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 diff --git a/build/macos.icc.inc b/build/macos.icc.inc index cadeb1d860222b45da574856a2e79c3edaea6000..f9255675f3fc0265e91a1234ad9da0da4b0d477a 100644 --- a/build/macos.icc.inc +++ b/build/macos.icc.inc @@ -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 diff --git a/build/macos.inc b/build/macos.inc index e386826c6c508f5c0cc7bb32f5188867a3b297ab..b876c429cdee795d845617a959c246bfcf458d47 100644 --- a/build/macos.inc +++ b/build/macos.inc @@ -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 @@ -20,10 +20,10 @@ ifeq (icc,$(compiler)) export COMPILER_VERSION := ICC: $(shell icc -V &1 | grep 'Version') - ifneq (,$(findstring IA-32, $(COMPILER_VERSION))) + ifneq (,$(findstring running on IA-32, $(COMPILER_VERSION))) export arch:=ia32 else - ifneq (,$(findstring Intel(R) 64, $(COMPILER_VERSION))) + ifneq (,$(findstring running on Intel(R) 64, $(COMPILER_VERSION))) export arch:=intel64 endif endif @@ -48,23 +48,12 @@ ifndef arch endif endif -ifeq (ios,$(target)) - ifneq (armv7, $(arch)) - $(error $(arch) not supported for target 'ios') - endif - export SDKROOT?=$(shell xcodebuild -sdk -version | grep -o -E '/.*SDKs/iPhoneOS.*' 2>/dev/null) - ifeq (,$(SDKROOT)) - $(error iOS SDK not found) - endif - # next, use a single compiler include file for both iOS* and OS X* builds. - override target:=macos - export target -endif - ifndef runtime - gcc_version:=$(shell gcc -dumpversion) - os_version:=$(shell /usr/bin/sw_vers -productVersion) - export runtime:=cc$(gcc_version)_os$(os_version) + clang_version:=$(shell clang -v 2>&1 >/dev/null | grep version | sed -e "s/.*version \(.*[0-9]\) .*/\1/") + ifndef os_version + os_version:=$(shell /usr/bin/sw_vers -productVersion) + endif + export runtime:=cc$(clang_version)_os$(os_version) endif native_compiler := clang diff --git a/build/mic.icc.inc b/build/mic.icc.inc index 448f1a225aa7fa8af6dd2db7009544766a8bb36d..3a1b8bff9f91e43d3fdd07977ac4b8d316bf344f 100644 --- a/build/mic.icc.inc +++ b/build/mic.icc.inc @@ -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 diff --git a/build/mic.linux.inc b/build/mic.linux.inc index 00b28e4699187ce6ba1f2dd359192e58dbeb5896..36ee9e29e4237eaf0906963616865d76edb046e6 100644 --- a/build/mic.linux.inc +++ b/build/mic.linux.inc @@ -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 diff --git a/build/mic.linux.launcher.sh b/build/mic.linux.launcher.sh index 0409f7604f5e7324ae48612800d4332771e52c94..e8b8fdc3c0e8238a18f23d38605093d5090e0bbb 100644 --- a/build/mic.linux.launcher.sh +++ b/build/mic.linux.launcher.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# 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 @@ -72,6 +72,7 @@ targetdir="`$RSH mktemp -d /tmp/tbbtestXXXXXX 2>/dev/null`" # hostdir="`mktemp -d /tmp/tbbtestXXXXXX 2>/dev/null`" # # function copy_files { # + [ $verbose ] && echo Going to copy $* # eval "cp $* $hostdir/ $SUPPRESS 2>/dev/null || exit \$?" # eval "$RCP $hostdir/* $MICDEV:$targetdir/ $SUPPRESS 2>/dev/null || exit \$?" # eval "rm $hostdir/* $SUPPRESS 2>/dev/null || exit \$?" # @@ -100,8 +101,11 @@ fnamelist="" # # For example, go through MIC_LD_LIBRARY_PATH and add TBB libraries from the first # directory that contains tbb files mic_dir_list=`echo .:$MIC_LD_LIBRARY_PATH | tr : " "` # +[ $verbose ] && echo Searching libraries in $mic_dir_list for name in $ldd_list; do # adds the first matched name in specified dirs - fnamelist+="`find $mic_dir_list -name $name -a -readable -print -quit 2>/dev/null` "||: # + found="`find -L $mic_dir_list -name $name -a -readable -print -quit 2>/dev/null` "||: # + [ $verbose ] && echo File $name: $found + fnamelist+=$found done # # # Remove extra spaces. diff --git a/build/mic.offload.inc b/build/mic.offload.inc index 0cf51a2af44cf5295a2da1bcdb786ffe3d03bc4e..8bf0fd7a2df8e62d6ec8a6c0cb6d39a015deadfa 100644 --- a/build/mic.offload.inc +++ b/build/mic.offload.inc @@ -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 diff --git a/build/test_launcher.bat b/build/test_launcher.bat index 35bbf4333e345f1a04e999fc9783518308fa9945..eefe00bd77cba25e2b7fb8becd88cc384b9dec07 100644 --- a/build/test_launcher.bat +++ b/build/test_launcher.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 2005-2015 Intel Corporation. All Rights Reserved. +REM Copyright 2005-2016 Intel Corporation. All Rights Reserved. REM REM This file is part of Threading Building Blocks. Threading Building Blocks is free software; REM you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/build/test_launcher.sh b/build/test_launcher.sh index 882e36c94b4d08c247864d5a8bf9083d626b0251..cea0c62f8b490601de8e294533dc0f9833b69a92 100644 --- a/build/test_launcher.sh +++ b/build/test_launcher.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_aix.sh b/build/version_info_aix.sh index 5df78aff5a77fe9d3d740b525e302ce302648ef6..64725e0e73f703afb011a94998c75e34fc7f7042 100644 --- a/build/version_info_aix.sh +++ b/build/version_info_aix.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_android.sh b/build/version_info_android.sh index 55af4ea57cbdf3ff8800b07acbd8e109074ae342..32ec518c2b7b58c6efafdb8b0de9bdac29c7b05d 100644 --- a/build/version_info_android.sh +++ b/build/version_info_android.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_linux.sh b/build/version_info_linux.sh index 5df78aff5a77fe9d3d740b525e302ce302648ef6..64725e0e73f703afb011a94998c75e34fc7f7042 100644 --- a/build/version_info_linux.sh +++ b/build/version_info_linux.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_macos.sh b/build/version_info_macos.sh index 2db20af0cf94d85d76a8ae6e73b13f1e7d8c3340..37b998427c4982d8784d172c7245ddc5c7e30987 100644 --- a/build/version_info_macos.sh +++ b/build/version_info_macos.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_sunos.sh b/build/version_info_sunos.sh index 3ac838c46c53bcd57fe9a57494657e059aa0e519..7a021e2e42b0b23664aaa458b9ca433a12d04ecf 100644 --- a/build/version_info_sunos.sh +++ b/build/version_info_sunos.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 diff --git a/build/version_info_windows.js b/build/version_info_windows.js index b0df0985c04620b8b80fd1f450e11e2d69434470..653d295b1650cbaba9477c9536ca06308267ef5d 100644 --- a/build/version_info_windows.js +++ b/build/version_info_windows.js @@ -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 @@ -40,7 +40,7 @@ WScript.echo( "#N \": BUILD_OS\\t\\t" + if ( WScript.Arguments(0).toLowerCase().match("gcc") ) { tmpExec = WshShell.Exec(WScript.Arguments(0) + " --version"); - WScript.echo( "#N \": BUILD_COMPILER\\t" + + WScript.echo( "#N \": BUILD_GCC\\t" + tmpExec.StdOut.ReadLine() + "\" ENDL \\" ); diff --git a/build/vs2010/index.html b/build/vs2010/index.html index 8f506a130ea680d4f642d9c039c80f4f396eaba0..20afc1548a79cf20e970843b63b6957c4690421a 100644 --- a/build/vs2010/index.html +++ b/build/vs2010/index.html @@ -12,7 +12,7 @@ This directory contains the Visual Studio* 2010 solution to build Intel® Thr
tbb.vcxproj
Library project file.
tbbmalloc.vcxproj -
Scalable allocator library project file. Allocator sources are expected to be located in ../../src/tbbmalloc folder.
+
Scalable allocator library project file.
tbbmalloc_proxy.vcxproj
Standard allocator replacement project file.
@@ -20,7 +20,7 @@ This directory contains the Visual Studio* 2010 solution to build Intel® Thr
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/build/vs2010/tbb.vcxproj b/build/vs2010/tbb.vcxproj index 4ba5a591151a3a6fff88aebd984ca2ea48df658c..f86cda2232320b4de7e248bc970bdb89a65c4545 100644 --- a/build/vs2010/tbb.vcxproj +++ b/build/vs2010/tbb.vcxproj @@ -107,29 +107,29 @@ <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false AllRules.ruleset @@ -197,9 +197,6 @@ true EnableFastChecks MultiThreadedDebugDLL - false - - Level4 ProgramDatabase false @@ -249,9 +246,6 @@ .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) MultiThreadedDLL - false - - Level4 ProgramDatabase @@ -306,9 +300,6 @@ true EnableFastChecks MultiThreadedDebug - false - - Level4 ProgramDatabase false @@ -358,9 +349,6 @@ .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) MultiThreaded - false - - Level4 ProgramDatabase @@ -396,46 +384,38 @@ true building atomic_support.obj - ml64 /Fo"intel64\Debug-MT\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Debug-MT\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Debug\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Release-MT\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Release-MT\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Release\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Release\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building intel64_misc.obj - ml64 /Fo"intel64\Debug-MT\intel64_misc.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm - - intel64\Debug-MT\intel64_misc.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm + $(IntDir)%(FileName).obj;%(Outputs) true building intel64_misc.obj - ml64 /Fo"intel64\Debug\intel64_misc.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm - - intel64\Debug\intel64_misc.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm + $(IntDir)%(FileName).obj;%(Outputs) true building intel64_misc.obj - ml64 /Fo"intel64\Release-MT\intel64_misc.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm - - intel64\Release-MT\intel64_misc.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm + $(IntDir)%(FileName).obj;%(Outputs) true building intel64_misc.obj - ml64 /Fo"intel64\Release\intel64_misc.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm - - intel64\Release\intel64_misc.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/intel64_misc.asm + $(IntDir)%(FileName).obj;%(Outputs) /coff /Zi @@ -454,24 +434,20 @@ true building itsx.obj - ml64 /Fo"intel64\Debug-MT\itsx.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm - - intel64\Debug-MT\itsx.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm + $(IntDir)%(FileName).obj;%(Outputs) true building itsx.obj - ml64 /Fo"intel64\Debug\itsx.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm - - intel64\Debug\itsx.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm + $(IntDir)%(FileName).obj;%(Outputs) true building itsx.obj - ml64 /Fo"intel64\Release-MT\itsx.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm - - intel64\Release-MT\itsx.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm + $(IntDir)%(FileName).obj;%(Outputs) true building itsx.obj - ml64 /Fo"intel64\Release\itsx.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm - - intel64\Release\itsx.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/itsx.asm + $(IntDir)%(FileName).obj;%(Outputs) /coff /Zi @@ -569,44 +545,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/build/vs2010/tbbmalloc.vcxproj b/build/vs2010/tbbmalloc.vcxproj index ad9a793d3863a01d9e51cd4ee48d4d13d5d83d41..e228346d60a107a844ad3121967b4ab841340f74 100644 --- a/build/vs2010/tbbmalloc.vcxproj +++ b/build/vs2010/tbbmalloc.vcxproj @@ -107,29 +107,29 @@ <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false AllRules.ruleset @@ -167,14 +167,11 @@ .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) true - - Default MultiThreadedDebugDLL - - Level4 ProgramDatabase + false /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -196,17 +193,13 @@ Disabled .;%(AdditionalIncludeDirectories) false - - Default MultiThreadedDebugDLL - false true - - Level4 ProgramDatabase false + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -224,13 +217,10 @@ /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D__TBB_LIB_NAME=tbb.lib /DDO_ITT_NOTIFY /GS /volatile:iso /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0502 /D__TBBMALLOC_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc /I. .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - MultiThreadedDLL - - Level4 ProgramDatabase + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -253,14 +243,10 @@ /c /MD /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D__TBB_LIB_NAME=tbb.lib /DDO_ITT_NOTIFY /GS /volatile:iso /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0502 /D__TBBMALLOC_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc /I. .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - MultiThreadedDLL - false - - Level4 ProgramDatabase + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -282,14 +268,11 @@ .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) true - - Default MultiThreadedDebug - - Level4 ProgramDatabase + false /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -311,17 +294,13 @@ Disabled .;%(AdditionalIncludeDirectories) false - - Default MultiThreadedDebug - false true - - Level4 ProgramDatabase false + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -339,13 +318,10 @@ /c /MT /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D__TBB_LIB_NAME=tbb.lib /DDO_ITT_NOTIFY /GS /volatile:iso /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0502 /D__TBBMALLOC_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc /I. .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - MultiThreaded - - Level4 ProgramDatabase + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -355,8 +331,6 @@ true true false - - MachineX86 @@ -368,14 +342,10 @@ /c /MT /O2 /Zi /EHs- /Zc:forScope /Zc:wchar_t /D__TBB_LIB_NAME=tbb.lib /DDO_ITT_NOTIFY /GS /volatile:iso /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0502 /D__TBBMALLOC_BUILD=1 /I../../src /I../../src/rml/include /I../../include /I../../src/tbbmalloc /I../../src/tbbmalloc /I. .;%(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - MultiThreaded - false - - Level4 ProgramDatabase + false /nologo /DLL /MAP /DEBUG /fixed:no /INCREMENTAL:NO /DEF:"$(IntDir)tbbmalloc.def" %(AdditionalOptions) @@ -394,24 +364,20 @@ true building atomic_support.obj - ml64 /Fo"intel64\Debug-MT\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Debug-MT\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Debug\atomic_support.obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Debug\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DUSE_FRAME_POINTER /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Release-MT\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Release-MT\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) true building atomic_support.obj - ml64 /Fo"intel64\Release\atomic_support.obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm - - intel64\Release\atomic_support.obj;%(Outputs) + ml64 /Fo"$(IntDir)%(FileName).obj" /DEM64T=1 /c /Zi ../../src/tbb/intel64-masm/atomic_support.asm + $(IntDir)%(FileName).obj;%(Outputs) @@ -493,13 +459,7 @@ - - - - - - - + diff --git a/build/vs2010/tbbmalloc_proxy.vcxproj b/build/vs2010/tbbmalloc_proxy.vcxproj index 6462df2cf552f5d6013ad9c93d7babf74c53ad43..4cc792461b1bd2107e3ce3ab4c32160411af0b32 100644 --- a/build/vs2010/tbbmalloc_proxy.vcxproj +++ b/build/vs2010/tbbmalloc_proxy.vcxproj @@ -107,29 +107,29 @@ <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)ia32\$(Configuration)\ - $(SolutionDir)ia32\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false - $(SolutionDir)intel64\$(Configuration)\ - $(SolutionDir)intel64\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(ProjectName)\$(Configuration)\ false AllRules.ruleset @@ -199,7 +199,6 @@ Default MultiThreadedDebugDLL - false true @@ -255,7 +254,6 @@ MultiThreadedDLL - false Level4 @@ -313,7 +311,6 @@ Default MultiThreadedDebug - false true @@ -369,7 +366,6 @@ MultiThreaded - false Level4 @@ -405,9 +401,7 @@ /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions) /I../../src /I../../include /DDO_ITT_NOTIFY /DUSE_WINTHREAD /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0400 %(AdditionalOptions) - - - + {b15f131e-328a-4d42-adc2-9ff4ca6306d8} diff --git a/build/windows.cl.inc b/build/windows.cl.inc index aebc0b5ebd0c0e140f24f5c88760ffbe36532cf4..1e3eb8f138932400bbe9d39b77a88ca8400ba189 100644 --- a/build/windows.cl.inc +++ b/build/windows.cl.inc @@ -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 diff --git a/build/windows.gcc.inc b/build/windows.gcc.inc index 2a6d0006d0a4308c8169556c411606240b241898..d6ffbab2264efea289b4ae36d8b7668ebdf0ccd1 100644 --- a/build/windows.gcc.inc +++ b/build/windows.gcc.inc @@ -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 diff --git a/build/windows.icl.inc b/build/windows.icl.inc index 687516860e2fd2bbdbdf3d85bbde7e357044b4e1..4c6616f5732488faf3fa422e32417c14959f2c99 100644 --- a/build/windows.icl.inc +++ b/build/windows.icl.inc @@ -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 diff --git a/build/windows.inc b/build/windows.inc index 0ada045e161c74f44d0566739f417d87d144f0e3..7cdb51ffa9731498d7fc80ec9c11352105d3e8c1 100644 --- a/build/windows.inc +++ b/build/windows.inc @@ -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 diff --git a/build/xbox360.cl.inc b/build/xbox360.cl.inc index 8cd0bc116178c34cb46f45257b294428f00289c7..34d3cde33719c80b132de2029493a8855b07bfb3 100644 --- a/build/xbox360.cl.inc +++ b/build/xbox360.cl.inc @@ -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 diff --git a/build/xbox360.inc b/build/xbox360.inc index f3573d6072e41dd82a9c2a492bdef77ddd1d3264..a995d3da29e5a961410a00dba6c0018b41472b8f 100644 --- a/build/xbox360.inc +++ b/build/xbox360.inc @@ -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 diff --git a/doc/Release_Notes.txt b/doc/Release_Notes.txt index 6a47fa0bc922860a1b8450d411d7bf75643d844f..6046ca4bbddf9b8a55b9ae8906f47d782ef6fc07 100644 --- a/doc/Release_Notes.txt +++ b/doc/Release_Notes.txt @@ -83,6 +83,11 @@ Software - Supported Compilers starting from gcc 4.1 and higher Xcode* 6.3 and higher and command line tools (OS X* only) +Software - Supported Performance Analysis Tools + + Intel(R) VTune(TM) Amplifier XE 2015 and higher. + Intel(R) Inspector XE 2015 and higher. + Intel(R) Advisor XE 2015 and higher. Known Issues ------------ @@ -162,14 +167,8 @@ Library Issues 4.8.2, and 4.9.2), the destructor of a task_group might not throw missing_wait exception. - - On OS X* 10.11 some examples might fail to run via makefiles in - case System Integrity Protection is enabled. In such case - instead of `make ` use the following command: - `run_cmd="DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH" make ` - or run executables directly. - ------------------------------------------------------------------------ -Copyright (C) 2005-2015 Intel Corporation. All Rights Reserved. +Copyright (C) 2005-2016 Intel Corporation. All Rights Reserved. Intel, Xeon and Pentium are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/doc/html/a00001.html b/doc/html/a00001.html index 5d398fdd2c6db4aca01fc7e524f6c3119683d1a3..c8a55e11bc2ab5c6beffcfc6a99172e3ec71dec8 100644 --- a/doc/html/a00001.html +++ b/doc/html/a00001.html @@ -50,7 +50,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00002.html b/doc/html/a00002.html index adfece929a33f0051cca9abae5c2807ddc8f9c27..47645d204ae840932e07a9c68d8ac1f434bb9a16 100644 --- a/doc/html/a00002.html +++ b/doc/html/a00002.html @@ -36,7 +36,7 @@

Class Body implementing the concept of parallel_do body must define:

    -
  • B::operator()(
    +
  • B::operator()(
    cv_item_type item,
    parallel_do_feeder<item_type>& feeder
    ) const
    @@ -53,7 +53,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00003.html b/doc/html/a00003.html index fec1b11fafe0f1626b69ed1682176cc99b590643..4025768fb372d830d908156dd1e807a9d7ff24db 100644 --- a/doc/html/a00003.html +++ b/doc/html/a00003.html @@ -46,7 +46,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00004.html b/doc/html/a00004.html index 7f94ce5b1b570cdc8d36b428eee2431267b2d9ea..a80516ea25fefacd6a5883861c149eecd4983fad 100644 --- a/doc/html/a00004.html +++ b/doc/html/a00004.html @@ -48,7 +48,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00005.html b/doc/html/a00005.html index d538b45c6249462499c00d0cce807abf7810ef5f..3ee7b7d95775b6eab0adf7349ca43276e821e687 100644 --- a/doc/html/a00005.html +++ b/doc/html/a00005.html @@ -34,7 +34,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00006.html b/doc/html/a00006.html index 4033ce6703ca9234d6c0889d95b6b1363df7d0f2..98accfead7fcd6807a5ba0603c3edea267cb2bd6 100644 --- a/doc/html/a00006.html +++ b/doc/html/a00006.html @@ -50,7 +50,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00007.html b/doc/html/a00007.html index 243601c3a681d790344a57e9371695c37c42d672..d21f12c870c675187cb7c39eac4a9be60b1fd653 100644 --- a/doc/html/a00007.html +++ b/doc/html/a00007.html @@ -34,17 +34,17 @@
Requirements on iterators for parallel_sort
-

Requirements on value type T of RandomAccessIterator for parallel_sort:

+

Requirements on the iterator type It and its value type T for parallel_sort:

    -
  • void swap( T& x, T& y )
    -
    Swaps x and y
  • +
  • void iter_swap( It a, It b )
    +
    Swaps the values of the elements the given iterators a and b are pointing to. It should be a random access iterator.
  • bool Compare::operator()( const T& x, const T& y )
    True if x comes before y;

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00008.html b/doc/html/a00008.html index 14967095ddc445fd0d9f00eb98f107d6e6bf1da6..8ddc66168aeced074d67d711c9e336e9210a4211 100644 --- a/doc/html/a00008.html +++ b/doc/html/a00008.html @@ -48,7 +48,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00009.html b/doc/html/a00009.html index 19f5f52434288fd1b06152ff786cbfc747467e71..6cb5656496ae093ff32e4b8209c4eb3d59286c37 100644 --- a/doc/html/a00009.html +++ b/doc/html/a00009.html @@ -34,7 +34,7 @@
__TBB_malloc_proxy_caller Struct Reference
@@ -45,7 +45,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00010.html b/doc/html/a00010.html index 547432d53d30dd4910f5733a2d11a5766e0b9286..c385f03799895cf01305ce9d65e683922098aaae 100644 --- a/doc/html/a00010.html +++ b/doc/html/a00010.html @@ -33,14 +33,14 @@
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::accessor Class Reference
@@ -56,7 +56,7 @@ Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCom
-tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
@@ -67,12 +67,12 @@ typedef
concurrent_hash_map::value_type  - - + - - +concurrent_hash_map::value_type  + +
value_type
 Type of value.
 
- Public Types inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
+
- Public Types inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
typedef const
-concurrent_hash_map::value_type 
value_type
 Type of value.
 
value_type
 Type of value.
 
@@ -84,45 +84,45 @@ reference  - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +

Public Member Functions

operator-> () const
 Return pointer to associated value in hash table.
 
- Public Member Functions inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
-bool empty () const
 True if result is empty.
 
-void release ()
 Set to null.
 
-const_reference operator* () const
 Return reference to associated value in hash table.
 
-const_pointer operator-> () const
 Return pointer to associated value in hash table.
 
const_accessor ()
 Create empty result.
 
~const_accessor ()
 Destroy result after releasing the underlying reference.
 
- Public Member Functions inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
+bool empty () const
 True if result is empty.
 
+void release ()
 Set to null.
 
+const_reference operator* () const
 Return reference to associated value in hash table.
 
+const_pointer operator-> () const
 Return pointer to associated value in hash table.
 
const_accessor ()
 Create empty result.
 
~const_accessor ()
 Destroy result after releasing the underlying reference.
 
- - + - - - - - + + + + - +

Additional Inherited Members

- Protected Member Functions inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
+
- Protected Member Functions inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
bool is_writer ()
 
- Protected Attributes inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
-nodemy_node
 
+
 
- Protected Attributes inherited from tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor
+nodemy_node
 
hashcode_t my_hash
 
 

Detailed Description

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
@@ -135,7 +135,7 @@ class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::acce


-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00011.html b/doc/html/a00011.html index df96603c15f7b1f75cbc1424d7e5ac93974470ad..b53b337c25ee08b2ac7da62a7372839a29e303b6 100644 --- a/doc/html/a00011.html +++ b/doc/html/a00011.html @@ -33,13 +33,13 @@
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::accessor_not_used Struct Reference
@@ -57,7 +57,7 @@ void release ()

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00012.html b/doc/html/a00012.html index e3c0ad23f5a48d57aef2b19162af8737e82c44d8..0dd3102e934f4cea8b99f1d989924fb036cc280f 100644 --- a/doc/html/a00012.html +++ b/doc/html/a00012.html @@ -33,13 +33,13 @@
tbb::interface6::aggregator Class Reference
@@ -70,7 +70,7 @@ Public Member Functions Additional Inherited Members - Private Member Functions inherited from tbb::interface6::aggregator_ext< internal::basic_handler > aggregator_ext (const internal::basic_handler &h) + aggregator_ext (const internal::basic_handler &h)   void process (aggregator_operation *op)  EXPERT INTERFACE: Enter a user-made operation into the aggregator's mailbox. More...
@@ -116,7 +116,7 @@ template<typename Body >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00013.html b/doc/html/a00013.html index e039fd3f6dd95680164ee689553437c79a20c39f..4517ac9ebcadb4f7fe3101d086456b75cb4f340f 100644 --- a/doc/html/a00013.html +++ b/doc/html/a00013.html @@ -33,14 +33,14 @@
tbb::interface6::aggregator_ext< handler_type > Class Template Reference
@@ -142,7 +142,7 @@ template<typename handler_type>

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00014.html b/doc/html/a00014.html index f9b945c91401dd204cabf94d631abccbc3f6f0f2..692d1326f5f4c9c215ce0dd897b6e179ecaf8cf7 100644 --- a/doc/html/a00014.html +++ b/doc/html/a00014.html @@ -33,7 +33,7 @@ +List of all members
tbb::interface6::aggregator_operation Class Reference
@@ -52,8 +52,8 @@ Inheritance diagram for tbb::interface6::aggregator_operation:
-tbb::interface6::internal::basic_operation_base -tbb::interface6::internal::basic_operation< Body > +tbb::interface6::internal::basic_operation_base +tbb::interface6::internal::basic_operation< Body >
@@ -120,7 +120,7 @@ template<typename handler_type >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00015.html b/doc/html/a00015.html index 6f33cfd4370e87f4270b2efabe793c2060e52698..9f18e0859726c569c889c13af01972a3dd8d45b8 100644 --- a/doc/html/a00015.html +++ b/doc/html/a00015.html @@ -33,15 +33,15 @@
-
tbb::aligned_space< T, N > Class Template Reference
+
tbb::aligned_space< T, N > Class Template Reference
@@ -73,7 +73,7 @@ class tbb::aligned_space< T, N >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00016.html b/doc/html/a00016.html index 258670d2e2ce766a459a65878faf07a3704b42a6..bfc3f7bde4f3794ad3a4e877e7aa57b1c58de31e 100644 --- a/doc/html/a00016.html +++ b/doc/html/a00016.html @@ -33,13 +33,13 @@
tbb::flow::interface8::allocate_buffer< T > Struct Template Reference
@@ -52,12 +52,12 @@ static const bool 
value 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00017.html b/doc/html/a00017.html index a4b763c75511693e2ad5a416c30cba5f741621de..f96380f131fa9c49cca231b6417795f06e9e4e13 100644 --- a/doc/html/a00017.html +++ b/doc/html/a00017.html @@ -33,13 +33,13 @@
tbb::flow::interface8::allocate_buffer< queueing > Struct Template Reference
@@ -52,12 +52,12 @@ static const bool value 
The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00018.html b/doc/html/a00018.html index 0bc4673b6f03351cb9f95f92385f59dc2ad9b8e2..82a4dea9924b8e008093dc2b79f863e7888b90b1 100644 --- a/doc/html/a00018.html +++ b/doc/html/a00018.html @@ -33,14 +33,14 @@
tbb::flow::interface8::internal::async_body< Input, Ports, AsyncGateway, Body > Class Template Reference
@@ -71,12 +71,12 @@ void set_async_gateway  
The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00019.html b/doc/html/a00019.html index 7539af683bc5620b860770d481f122800cdaa8c7..cbc4a7c6a564abb25a15f6d7f3fe7bbdd2718c2b 100644 --- a/doc/html/a00019.html +++ b/doc/html/a00019.html @@ -33,14 +33,14 @@
tbb::flow::interface8::internal::async_gateway< Output > Class Template Referenceabstract
@@ -87,12 +87,12 @@ class tbb::flow::interface8::internal::async_gateway< Output >

Pure virtual template class that defines interface for async communication.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00020.html b/doc/html/a00020.html index 2e6536388b6cdd77a9eb908b6621beed06aab8c5..1fabe6b5363e808c693d5745927b0f3992117c9e 100644 --- a/doc/html/a00020.html +++ b/doc/html/a00020.html @@ -33,7 +33,7 @@ +List of all members
tbb::flow::interface8::async_node< Input, Output, Policy, Allocator > Class Template Reference
@@ -59,16 +59,16 @@ Inheritance diagram for tbb::flow::interface8::async_node< Input, Output, Pol
-tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator > +tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator > tbb::flow::interface8::internal::async_gateway< Output > -tbb::flow::interface8::sender< Output > -tbb::flow::interface8::graph_node +tbb::flow::interface8::sender< Output > +tbb::flow::interface8::graph_node
- +

Classes

struct  try_put_functor
struct  try_put_functor
 
+typedef sender< input_type >  +typedef receiver< output_type >  +internal::edge_container
+< successor_type >  - - + - - - - + + + - - + - - + - + - - - - - - - - + + + + + + + - - - + + + - +

@@ -80,10 +80,10 @@ typedef Input 

input_typeoutput_type
 
-typedef sender< input_type > predecessor_type
predecessor_type
 
-typedef receiver< output_type > successor_type
successor_type
 
typedef
@@ -92,68 +92,68 @@ typedef
 
typedef
-internal::edge_container
-< successor_type
built_successors_type
built_successors_type
 interface to record edges for traversal & deletion
 
typedef
built_successors_type::edge_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
+
- Public Types inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
typedef Input input_type
 
-typedef null_type output_type
 
+
 
+typedef null_type output_type
 
typedef
internal::wrap_tuple_elements
< N,
internal::multifunction_output,
tuple< Output > >::type 
output_ports_type
 
+
 
typedef
internal::multifunction_input
< input_type,
output_ports_type, Allocator > 
fInput_type
 
+
 
typedef
internal::function_input_queue
< input_type, Allocator > 
input_queue_type
 
 
- Public Types inherited from tbb::flow::interface8::internal::async_gateway< Output >
typedef Output output_type
 
- Public Types inherited from tbb::flow::interface8::sender< Output >
-typedef Output output_type
 The output type of this sender.
 
-typedef receiver< Output > successor_type
 The successor type for this node.
 
+
- Public Types inherited from tbb::flow::interface8::sender< Output >
+typedef Output output_type
 The output type of this sender.
 
+typedef receiver< Output > successor_type
 The successor type for this node.
 
typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
typedef
built_successors_type::edge_list_type 
successor_list_type
 
 
- + @@ -177,11 +177,11 @@ void  +bool  +bool built_successors_type &  +void  +void  @@ -203,59 +203,59 @@ void  - - - - - - + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

template<typename Body >
 async_node (graph &g, size_t concurrency, Body body)
 async_node (graph &g, size_t concurrency, Body body)
 
 async_node (const async_node &other)
set_name (const char *name)
 
-bool register_successor (successor_type &r)
register_successor (successor_type &r)
 Add a new successor to this node.
 
-bool remove_successor (successor_type &r)
remove_successor (successor_type &r)
 Removes a successor from this node.
 
@@ -192,10 +192,10 @@ template<typename Body >
built_successors ()
 
-void internal_add_built_successor (successor_type &r)
internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
internal_delete_built_successor (successor_type &r)
 
void copy_successors (successor_list_type &l)
copy_successors (
size_t successor_count ()
 
- Public Member Functions inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
multifunction_node (graph &g, size_t concurrency, Body body)
 
multifunction_node (const multifunction_node &other)
 
+
- Public Member Functions inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
multifunction_node (graph &g, size_t concurrency, Body body)
 
multifunction_node (const multifunction_node &other)
 
void set_name (const char *name)
 
+
 
void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::sender< Output >
-virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node.
 
-virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
-virtual bool try_get (Output &)
 Request an item from the sender.
 
-virtual bool try_reserve (Output &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
-virtual void internal_add_built_successor (successor_type &)=0
 
-virtual void internal_delete_built_successor (successor_type &)=0
 
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::sender< Output >
+virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node.
 
+virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
+virtual bool try_get (Output &)
 Request an item from the sender.
 
+virtual bool try_reserve (Output &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+virtual void internal_add_built_successor (successor_type &)=0
 
+virtual void internal_delete_built_successor (successor_type &)=0
 
@@ -272,27 +272,27 @@ Protected Member Functions - - + - +

Protected Types

-typedef multifunction_node
+typedef multifunction_node
< Input, tuple< Output >
, Policy, Allocator > 
base_type
 
void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
+
- Protected Member Functions inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
void reset_node (reset_flags f)
 
 
- - - - - - - - - + + + + + + + + - +

Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
- Static Protected Attributes inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
+
- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 
- Static Protected Attributes inherited from tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator >
static const int N
 
 

Detailed Description

template<typename Input, typename Output, typename Policy = queueing, typename Allocator = cache_aligned_allocator<Input>>
@@ -300,12 +300,12 @@ class tbb::flow::interface8::async_node< Input, Output, Policy, Allocator >

Implements async node.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00021.html b/doc/html/a00021.html index 7c70d4ae0d4a36786e42c117d0cab71455023b9a..b36dd1113a889631b28d0e593e55a87ef32fa857 100644 --- a/doc/html/a00021.html +++ b/doc/html/a00021.html @@ -33,15 +33,15 @@
-
tbb::atomic< T > Struct Template Reference
+
tbb::atomic< T > Struct Template Reference
@@ -82,7 +82,7 @@ struct tbb::atomic< T >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00022.html b/doc/html/a00022.html index 6f498faec69c9b59d0702430fba3013d8ae27666..5e4234244976ecc75583cdd3dcb456f264e3970e 100644 --- a/doc/html/a00022.html +++ b/doc/html/a00022.html @@ -33,13 +33,13 @@
tbb::atomic< void * > Struct Template Reference
@@ -81,7 +81,7 @@ struct tbb::atomic< void * >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00023.html b/doc/html/a00023.html index ed3003905dc14cdc4f88cef8b1339b7d227e254e..a66237a12f98497d936f9eada5c99862be50f0d5 100644 --- a/doc/html/a00023.html +++ b/doc/html/a00023.html @@ -4,7 +4,7 @@ -tbb::bad_last_alloc Class Reference +tbb::interface7::task_arena::attach Struct Reference @@ -33,46 +33,28 @@
-
-
tbb::bad_last_alloc Class Reference
+
tbb::interface7::task_arena::attach Struct Reference
-

Exception for concurrent containers. +

Tag class used to indicate the "attaching" constructor. More...

-

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::bad_last_alloc:
-
-
- - - -
- - - - -

-Public Member Functions

-const char * what () const throw ()
 
+

#include <task_arena.h>

Detailed Description

-

Exception for concurrent containers.

-

The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +

    Tag class used to indicate the "attaching" constructor.

    +

    The documentation for this struct was generated from the following file:
      +
    • task_arena.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00024.html b/doc/html/a00024.html index 1beaae1a92db6f73a8a5c90f2bb4fdc751f4e2e9..ef3a28516771883fc9c201b2faa2822b87e6d9be 100644 --- a/doc/html/a00024.html +++ b/doc/html/a00024.html @@ -4,7 +4,7 @@ -tbb::interface6::internal::basic_handler Class Reference +tbb::bad_last_alloc Class Reference @@ -33,31 +33,46 @@
-
tbb::interface6::internal::basic_handler Class Reference
+
tbb::bad_last_alloc Class Reference
+ +

Exception for concurrent containers. + More...

+ +

#include <tbb_exception.h>

+
+Inheritance diagram for tbb::bad_last_alloc:
+
+
+ + + +
- - + +

Public Member Functions

-void operator() (aggregator_operation *op_list) const
 
+const char * what () const throw ()
 
-
The documentation for this class was generated from the following file:
    -
  • aggregator.h
  • +

    Detailed Description

    +

    Exception for concurrent containers.

    +

    The documentation for this class was generated from the following file:
      +
    • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00023.png b/doc/html/a00024.png similarity index 100% rename from doc/html/a00023.png rename to doc/html/a00024.png diff --git a/doc/html/a00025.html b/doc/html/a00025.html index cca6e968055b1734e18d621aa52f94400f2e4cdf..c4035a06c048ee42d64362b2e789ed3e98275f1c 100644 --- a/doc/html/a00025.html +++ b/doc/html/a00025.html @@ -4,7 +4,7 @@ -tbb::interface6::internal::basic_operation< Body > Class Template Reference +tbb::interface6::internal::basic_handler Class Reference @@ -33,41 +33,23 @@
-
tbb::interface6::internal::basic_operation< Body > Class Template Reference
+
tbb::interface6::internal::basic_handler Class Reference
-
-Inheritance diagram for tbb::interface6::internal::basic_operation< Body >:
-
-
- - -tbb::interface6::internal::basic_operation_base -tbb::interface6::aggregator_operation - -
- - -

Public Member Functions

basic_operation (const Body &b)
 
- - - - + +

-Additional Inherited Members

- Public Types inherited from tbb::interface6::aggregator_operation
enum  aggregator_operation_status { agg_waiting =0, -agg_finished - }
 
+void operator() (aggregator_operation *op_list) const
 

The documentation for this class was generated from the following file:
  • aggregator.h
  • @@ -75,7 +57,7 @@ Additional Inherited Members

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00025.png b/doc/html/a00025.png deleted file mode 100644 index cadf33aedd5b7cd17f7b012f1bad70f6bc772756..0000000000000000000000000000000000000000 Binary files a/doc/html/a00025.png and /dev/null differ diff --git a/doc/html/a00026.html b/doc/html/a00026.html index 60d6a926eff53b7544851873b0c0eab3713395e5..0e35ed7f2c47cb9b9df56b38cb99e68bd269522f 100644 --- a/doc/html/a00026.html +++ b/doc/html/a00026.html @@ -4,7 +4,7 @@ -tbb::interface6::internal::basic_operation_base Class Reference +tbb::interface6::internal::basic_operation< Body > Class Template Reference @@ -33,33 +33,33 @@
-
tbb::interface6::internal::basic_operation_base Class Referenceabstract
+
tbb::interface6::internal::basic_operation< Body > Class Template Reference
-Inheritance diagram for tbb::interface6::internal::basic_operation_base:
+Inheritance diagram for tbb::interface6::internal::basic_operation< Body >:
- - + + +tbb::interface6::internal::basic_operation_base tbb::interface6::aggregator_operation -tbb::interface6::internal::basic_operation< Body >
- - - + + +

-Friends

-class basic_handler
 

+Public Member Functions

basic_operation (const Body &b)
 
@@ -68,20 +68,6 @@ Additional Inherited Membersagg_finished } - - - - - - - - - - -

Additional Inherited Members

 
- Public Member Functions inherited from tbb::interface6::aggregator_operation
-void start ()
 Call start before handling this operation.
 
void finish ()
 Call finish when done handling this operation. More...
 
-aggregator_operationnext ()
 
-void set_next (aggregator_operation *n)
 

The documentation for this class was generated from the following file:
-
tbb::blocked_range< Value > Class Template Reference
+
tbb::interface6::internal::basic_operation_base Class Referenceabstract
- -

A range over which to iterate. - More...

- -

#include <blocked_range.h>

+
+Inheritance diagram for tbb::interface6::internal::basic_operation_base:
+
+
+ + +tbb::interface6::aggregator_operation +tbb::interface6::internal::basic_operation< Body > + +
- - - - - - - -

-Public Types

typedef Value const_iterator
 Type of a value. More...
 
-typedef std::size_t size_type
 Type for size of a range.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 blocked_range ()
 Construct range with default-constructed values for begin and end. More...
 
blocked_range (Value begin_, Value end_, size_type grainsize_=1)
 Construct range over half-open interval [begin,end), with the given grainsize.
 
-const_iterator begin () const
 Beginning of range.
 
-const_iterator end () const
 One past last value in range.
 
size_type size () const
 Size of the range. More...
 
-size_type grainsize () const
 The grain size for this range.
 
-bool empty () const
 True if range is empty.
 
bool is_divisible () const
 True if range is divisible. More...
 
 blocked_range (blocked_range &r, split)
 Split range. More...
 
 blocked_range (blocked_range &r, proportional_split &proportion)
 Split range. More...
 
- - - - -

-Static Public Attributes

-static const bool is_splittable_in_proportion = true
 Static field to support proportional split.
 
- - - - - - -

Friends

-template<typename RowValue , typename ColValue >
class blocked_range2d
 
-template<typename RowValue , typename ColValue , typename PageValue >
class blocked_range3d
 
-

Detailed Description

-

template<typename Value>
-class tbb::blocked_range< Value >

- -

A range over which to iterate.

-

Member Typedef Documentation

- -
-
-
-template<typename Value>
- - - - -
typedef Value tbb::blocked_range< Value >::const_iterator
-
- -

Type of a value.

-

Called a const_iterator for sake of algorithms that need to treat a blocked_range as an STL container.

- -
-
-

Constructor & Destructor Documentation

- -
-
-
-template<typename Value>
- - - - - -
- - - - - - - -
tbb::blocked_range< Value >::blocked_range ()
-
-inline
-
- -

Construct range with default-constructed values for begin and end.

-

Requires that Value have a default constructor.

- -
-
- -
-
-
-template<typename Value>
- - - - - -
- - - - - - - - - - - - - - - - - - -
tbb::blocked_range< Value >::blocked_range (blocked_range< Value > & r,
split  
)
-
-inline
-
- -

Split range.

-

The new Range *this has the second part, the old range r has the first part. Unspecified if end()<begin() or !is_divisible().

- -
-
- -
-
-
-template<typename Value>
- - - - - -
- - - - - - - - - - - - - - - - - - -
tbb::blocked_range< Value >::blocked_range (blocked_range< Value > & r,
proportional_split & proportion 
)
-
-inline
-
- -

Split range.

-

The new Range *this has the second part split according to specified proportion, the old range r has the first part. Unspecified if end()<begin() or !is_divisible().

- -
-
-

Member Function Documentation

- -
-
-
-template<typename Value>
- - - - - -
- - - - - - - -
bool tbb::blocked_range< Value >::is_divisible () const
-
-inline
-
-
- -
-
-
-template<typename Value>
- - - - - + + +
- - - - - - - -
size_type tbb::blocked_range< Value >::size () const
-
-inline
+class basic_handler
 
+ + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Types inherited from tbb::interface6::aggregator_operation
enum  aggregator_operation_status { agg_waiting =0, +agg_finished + }
 
- Public Member Functions inherited from tbb::interface6::aggregator_operation
+void start ()
 Call start before handling this operation.
 
void finish ()
 Call finish when done handling this operation. More...
 
+aggregator_operationnext ()
 
+void set_next (aggregator_operation *n)
 
-
- -

Size of the range.

-

Unspecified if end()<begin().

- -

Referenced by tbb::blocked_range< I >::is_divisible().

- -
-

The documentation for this class was generated from the following file:
    -
  • blocked_range.h
  • +
  • aggregator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00027.png b/doc/html/a00027.png new file mode 100644 index 0000000000000000000000000000000000000000..0f94299e82ac6d9c147a19a509648b78560c3d88 Binary files /dev/null and b/doc/html/a00027.png differ diff --git a/doc/html/a00028.html b/doc/html/a00028.html index fc3e5a02314ab34db8fdc3cc3596020250a53ba2..30c15dcd8f50b5e0c138c1a0552c06cb9e7fdd58 100644 --- a/doc/html/a00028.html +++ b/doc/html/a00028.html @@ -4,7 +4,7 @@ -tbb::blocked_range2d< RowValue, ColValue > Class Template Reference +tbb::blocked_range< Value > Class Template Reference @@ -33,7 +33,7 @@ +Friends | +List of all members
-
tbb::blocked_range2d< RowValue, ColValue > Class Template Reference
+
tbb::blocked_range< Value > Class Template Reference
-

A 2-dimensional range that models the Range concept. +

A range over which to iterate. More...

-

#include <blocked_range2d.h>

+

#include <blocked_range.h>

- - - - - + + + + + +

Public Types

-typedef blocked_range< RowValue > row_range_type
 Type for size of an iteration range.
 
-typedef blocked_range< ColValue > col_range_type
 
typedef Value const_iterator
 Type of a value. More...
 
+typedef std::size_t size_type
 Type for size of a range.
 
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

blocked_range2d (RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)
 
blocked_range2d (RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)
 
-bool empty () const
 True if range is empty.
 
-bool is_divisible () const
 True if range is divisible into two pieces.
 
blocked_range2d (blocked_range2d &r, split)
 
blocked_range2d (blocked_range2d &r, proportional_split &proportion)
 
-template<typename Split >
void do_split (blocked_range2d &r, Split &split_obj)
 
-const row_range_typerows () const
 The rows of the iteration space.
 
-const col_range_typecols () const
 The columns of the iteration space.
 
 blocked_range ()
 Construct range with default-constructed values for begin and end. More...
 
blocked_range (Value begin_, Value end_, size_type grainsize_=1)
 Construct range over half-open interval [begin,end), with the given grainsize.
 
+const_iterator begin () const
 Beginning of range.
 
+const_iterator end () const
 One past last value in range.
 
size_type size () const
 Size of the range. More...
 
+size_type grainsize () const
 The grain size for this range.
 
+bool empty () const
 True if range is empty.
 
bool is_divisible () const
 True if range is divisible. More...
 
 blocked_range (blocked_range &r, split)
 Split range. More...
 
 blocked_range (blocked_range &r, proportional_split &proportion)
 Split range. More...
 
- - - + + + +

Static Public Attributes

-static const bool is_splittable_in_proportion = true
 Static field to support proportional split.
 
+static const bool is_splittable_in_proportion = true
 Static field to support proportional split.
 
+ + + + + + +

+Friends

+template<typename RowValue , typename ColValue >
class blocked_range2d
 
+template<typename RowValue , typename ColValue , typename PageValue >
class blocked_range3d
 

Detailed Description

-

template<typename RowValue, typename ColValue = RowValue>
-class tbb::blocked_range2d< RowValue, ColValue >

+

template<typename Value>
+class tbb::blocked_range< Value >

+ +

A range over which to iterate.

+

Member Typedef Documentation

+ +
+
+
+template<typename Value>
+ + + + +
typedef Value tbb::blocked_range< Value >::const_iterator
+
+ +

Type of a value.

+

Called a const_iterator for sake of algorithms that need to treat a blocked_range as an STL container.

+ +
+
+

Constructor & Destructor Documentation

+ +
+
+
+template<typename Value>
+ + + + + +
+ + + + + + + +
tbb::blocked_range< Value >::blocked_range ()
+
+inline
+
+ +

Construct range with default-constructed values for begin and end.

+

Requires that Value have a default constructor.

+ +
+
+ +
+
+
+template<typename Value>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
tbb::blocked_range< Value >::blocked_range (blocked_range< Value > & r,
split  
)
+
+inline
+
+ +

Split range.

+

The new Range *this has the second part, the old range r has the first part. Unspecified if end()<begin() or !is_divisible().

+ +
+
+ +
+
+
+template<typename Value>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
tbb::blocked_range< Value >::blocked_range (blocked_range< Value > & r,
proportional_split & proportion 
)
+
+inline
+
+ +

Split range.

+

The new Range *this has the second part split according to specified proportion, the old range r has the first part. Unspecified if end()<begin() or !is_divisible().

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename Value>
+ + + + + +
+ + + + + + + +
bool tbb::blocked_range< Value >::is_divisible () const
+
+inline
+
+ +

True if range is divisible.

+

Unspecified if end()<begin().

+ +

Referenced by tbb::blocked_range2d< RowValue, ColValue >::is_divisible(), and tbb::blocked_range3d< PageValue, RowValue, ColValue >::is_divisible().

-

A 2-dimensional range that models the Range concept.

-

The documentation for this class was generated from the following file:
    -
  • blocked_range2d.h
  • +
+
+ +
+
+
+template<typename Value>
+ + + + + +
+ + + + + + + +
size_type tbb::blocked_range< Value >::size () const
+
+inline
+
+ +

Size of the range.

+

Unspecified if end()<begin().

+ +

Referenced by tbb::blocked_range< I >::is_divisible().

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • blocked_range.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00029.html b/doc/html/a00029.html index 3feaee30d78140ab6ec10a15550c6828754aa60b..ba27cca35ec94cfceeb527c42662bd7dbee07f27 100644 --- a/doc/html/a00029.html +++ b/doc/html/a00029.html @@ -4,7 +4,7 @@ -tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference +tbb::blocked_range2d< RowValue, ColValue > Class Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference
+
tbb::blocked_range2d< RowValue, ColValue > Class Template Reference
-

A 3-dimensional range that models the Range concept. +

A 2-dimensional range that models the Range concept. More...

-

#include <blocked_range3d.h>

+

#include <blocked_range2d.h>

- - - - - - - + + + + +

Public Types

-typedef blocked_range< PageValue > page_range_type
 Type for size of an iteration range.
 
-typedef blocked_range< RowValue > row_range_type
 
-typedef blocked_range< ColValue > col_range_type
 
+typedef blocked_range< RowValue > row_range_type
 Type for size of an iteration range.
 
+typedef blocked_range< ColValue > col_range_type
 
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + +

Public Member Functions

blocked_range3d (PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)
 
blocked_range3d (PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)
 
-bool empty () const
 True if range is empty.
 
-bool is_divisible () const
 True if range is divisible into two pieces.
 
blocked_range3d (blocked_range3d &r, split)
 
blocked_range3d (blocked_range3d &r, proportional_split &proportion)
 
+
blocked_range2d (RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)
 
blocked_range2d (RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)
 
+bool empty () const
 True if range is empty.
 
+bool is_divisible () const
 True if range is divisible into two pieces.
 
blocked_range2d (blocked_range2d &r, split)
 
blocked_range2d (blocked_range2d &r, proportional_split &proportion)
 
template<typename Split >
void do_split (blocked_range3d &r, Split &split_obj)
 
-const page_range_typepages () const
 The pages of the iteration space.
 
-const row_range_typerows () const
 The rows of the iteration space.
 
-const col_range_typecols () const
 The columns of the iteration space.
 
void do_split (blocked_range2d &r, Split &split_obj)
 
+const row_range_typerows () const
 The rows of the iteration space.
 
+const col_range_typecols () const
 The columns of the iteration space.
 
- - - + + +

Static Public Attributes

-static const bool is_splittable_in_proportion = true
 Static field to support proportional split.
 
+static const bool is_splittable_in_proportion = true
 Static field to support proportional split.
 

Detailed Description

-

template<typename PageValue, typename RowValue = PageValue, typename ColValue = RowValue>
-class tbb::blocked_range3d< PageValue, RowValue, ColValue >

+

template<typename RowValue, typename ColValue = RowValue>
+class tbb::blocked_range2d< RowValue, ColValue >

-

A 3-dimensional range that models the Range concept.

+

A 2-dimensional range that models the Range concept.


The documentation for this class was generated from the following file:
    -
  • blocked_range3d.h
  • +
  • blocked_range2d.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00030.html b/doc/html/a00030.html index 0417c2c4df2c04a4473cbeae21e6ceb0c91e1f1a..50813bdf44ec79295c0e1188b744d691cfb001b3 100644 --- a/doc/html/a00030.html +++ b/doc/html/a00030.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::internal::broadcast_cache< T, M > Class Template Reference +tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference @@ -33,21 +33,96 @@
+
-
tbb::flow::interface8::internal::broadcast_cache< T, M > Class Template Reference
+
tbb::blocked_range3d< PageValue, RowValue, ColValue > Class Template Reference
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • + +

    A 3-dimensional range that models the Range concept. + More...

    + +

    #include <blocked_range3d.h>

    + + + + + + + + + +

    +Public Types

    +typedef blocked_range< PageValue > page_range_type
     Type for size of an iteration range.
     
    +typedef blocked_range< RowValue > row_range_type
     
    +typedef blocked_range< ColValue > col_range_type
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    blocked_range3d (PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end)
     
    blocked_range3d (PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize)
     
    +bool empty () const
     True if range is empty.
     
    +bool is_divisible () const
     True if range is divisible into two pieces.
     
    blocked_range3d (blocked_range3d &r, split)
     
    blocked_range3d (blocked_range3d &r, proportional_split &proportion)
     
    +template<typename Split >
    void do_split (blocked_range3d &r, Split &split_obj)
     
    +const page_range_typepages () const
     The pages of the iteration space.
     
    +const row_range_typerows () const
     The rows of the iteration space.
     
    +const col_range_typecols () const
     The columns of the iteration space.
     
    + + + + +

    +Static Public Attributes

    +static const bool is_splittable_in_proportion = true
     Static field to support proportional split.
     
    +

    Detailed Description

    +

    template<typename PageValue, typename RowValue = PageValue, typename ColValue = RowValue>
    +class tbb::blocked_range3d< PageValue, RowValue, ColValue >

    + +

    A 3-dimensional range that models the Range concept.

    +

    The documentation for this class was generated from the following file:
      +
    • blocked_range3d.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00031.html b/doc/html/a00031.html index 1b6d0ddc13ed141e2ea7c6607386709a69222519..ebfaeb5c8cb31ffd077bb6e585431c0fb92b5762 100644 --- a/doc/html/a00031.html +++ b/doc/html/a00031.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::broadcast_node< T > Class Template Reference +tbb::flow::interface8::internal::broadcast_cache< T, M > Class Template Reference @@ -33,256 +33,21 @@
-
-
tbb::flow::interface8::broadcast_node< T > Class Template Reference
+
tbb::flow::interface8::internal::broadcast_cache< T, M > Class Template Reference
- -

Forwards messages of type T to all successors. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::broadcast_node< T >:
-
-
- - -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
-typedef sender< T >
-::built_successors_type 
built_successors_type
 
-typedef receiver< T >
-::built_predecessors_type 
built_predecessors_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

broadcast_node (graph &g)
 
broadcast_node (const broadcast_node &src)
 
-void set_name (const char *name)
 
-virtual bool register_successor (receiver< T > &r)
 Adds a successor.
 
-virtual bool remove_successor (receiver< T > &r)
 Removes s as a successor.
 
-built_successors_typebuilt_successors ()
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-size_t successor_count ()
 
-void copy_successors (successor_list_type &v)
 
-built_predecessors_typebuilt_predecessors ()
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
-virtual bool try_get (T &)
 Request an item from the sender.
 
-virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
- - - - - - - - - - - -

-Protected Member Functions

-task * try_put_task (const T &t)
 build a task to run the successor if possible. Default is old behavior.
 
-void reset_receiver (reset_flags)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - -

-Friends

-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
- - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
-

Detailed Description

-

template<typename T>
-class tbb::flow::interface8::broadcast_node< T >

- -

Forwards messages of type T to all successors.

-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00031.png b/doc/html/a00031.png deleted file mode 100644 index a7f7e8e6154c8ae0e05bdb4ad587ca57ed049710..0000000000000000000000000000000000000000 Binary files a/doc/html/a00031.png and /dev/null differ diff --git a/doc/html/a00032.html b/doc/html/a00032.html index ae6ac2507cb3482f5176c11106bfd5f08119610c..007d9c5f71f6e090cbdf20b03d2c1150309a4a56 100644 --- a/doc/html/a00032.html +++ b/doc/html/a00032.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor Class Reference +tbb::flow::interface8::broadcast_node< T > Class Template Reference @@ -33,61 +33,256 @@
-
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor Class Reference
+
tbb::flow::interface8::broadcast_node< T > Class Template Reference
-

bucket accessor is to find, rehash, acquire a lock, and access a bucket +

Forwards messages of type T to all successors. More...

-

#include <concurrent_hash_map.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor:
+Inheritance diagram for tbb::flow::interface8::broadcast_node< T >:
- - + + +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
+typedef sender< T >
+::built_successors_type 
built_successors_type
 
+typedef receiver< T >
+::built_predecessors_type 
built_predecessors_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

bucket_accessor (concurrent_hash_map *base, const hashcode_t h, bool writer=false)
 
-void acquire (concurrent_hash_map *base, const hashcode_t h, bool writer=false)
 find a bucket by masked hashcode, optionally rehash, and acquire the lock
 
-bool is_writer ()
 check whether bucket is locked for write
 
-bucket * operator() ()
 get bucket pointer
 
broadcast_node (graph &g)
 
broadcast_node (const broadcast_node &src)
 
+void set_name (const char *name)
 
+virtual bool register_successor (receiver< T > &r)
 Adds a successor.
 
+virtual bool remove_successor (receiver< T > &r)
 Removes s as a successor.
 
+built_successors_typebuilt_successors ()
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+size_t successor_count ()
 
+void copy_successors (successor_list_type &v)
 
+built_predecessors_typebuilt_predecessors ()
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
+virtual bool try_get (T &)
 Request an item from the sender.
 
+virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+ + + + + + + + + + + +

+Protected Member Functions

+task * try_put_task (const T &t)
 build a task to run the successor if possible. Default is old behavior.
 
+void reset_receiver (reset_flags)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + + +

+Friends

+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+ + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

Detailed Description

-

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor

+

template<typename T>
+class tbb::flow::interface8::broadcast_node< T >

-

bucket accessor is to find, rehash, acquire a lock, and access a bucket

+

Forwards messages of type T to all successors.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00032.png b/doc/html/a00032.png index 9dea0c02f2dcf13c98fe30ad2f8962ebabdc2d05..a7f7e8e6154c8ae0e05bdb4ad587ca57ed049710 100644 Binary files a/doc/html/a00032.png and b/doc/html/a00032.png differ diff --git a/doc/html/a00033.html b/doc/html/a00033.html index 4fc3c4c4d160d6b684a4a47860b97af4432500db..55c87b6b0ee12be91024b2edb4e2cc868a71210c 100644 --- a/doc/html/a00033.html +++ b/doc/html/a00033.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::buffer_node< T, A > Class Template Reference +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor Class Reference @@ -33,579 +33,61 @@
-
tbb::flow::interface8::buffer_node< T, A > Class Template Reference
+
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor Class Reference
-

Forwards messages in arbitrary order. +

bucket accessor is to find, rehash, acquire a lock, and access a bucket More...

-

#include <flow_graph.h>

+

#include <concurrent_hash_map.h>

-Inheritance diagram for tbb::flow::interface8::buffer_node< T, A >:
+Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor:
- - -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > -tbb::flow::interface8::priority_queue_node< T, Compare, A > -tbb::flow::interface8::queue_node< T, A > -tbb::flow::interface8::sequencer_node< T, A > + +
- - - -

-Classes

class  buffer_operation
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef buffer_node< T, A > class_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-size_t successor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - - - - - - - -

-Protected Types

enum  op_type {
-  reg_succ, -rem_succ, -req_item, -res_item, -
-  rel_res, -con_res, -put_item, -try_fwd_task, -
-  add_blt_succ, -del_blt_succ, -add_blt_pred, -del_blt_pred, -
-  blt_succ_cnt, -blt_pred_cnt, -blt_succ_cpy, -blt_pred_cpy -
- }
 
enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef size_t size_type
 
-typedef
-internal::aggregating_functor
-< class_type, buffer_operation
handler_type
 
-typedef sender< T >
-::built_successors_type 
built_successors_type
 
-typedef receiver< T >
-::built_predecessors_type 
built_predecessors_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

-virtual void handle_operations (buffer_operation *op_list)
 
-task * grab_forwarding_task (buffer_operation &op_data)
 
-bool enqueue_forwarding_task (buffer_operation &op_data)
 
-virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
-virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
-virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
-built_successors_typebuilt_successors ()
 
-virtual void internal_add_built_succ (buffer_operation *op)
 
-virtual void internal_del_built_succ (buffer_operation *op)
 
-built_predecessors_typebuilt_predecessors ()
 
-virtual void internal_add_built_pred (buffer_operation *op)
 
-virtual void internal_del_built_pred (buffer_operation *op)
 
-virtual void internal_succ_cnt (buffer_operation *op)
 
-virtual void internal_pred_cnt (buffer_operation *op)
 
-virtual void internal_copy_succs (buffer_operation *op)
 
-virtual void internal_copy_preds (buffer_operation *op)
 
-virtual void internal_forward_task (buffer_operation *op)
 Tries to forward valid items to successors.
 
-virtual void internal_push (buffer_operation *op)
 
-virtual void internal_pop (buffer_operation *op)
 
-virtual void internal_reserve (buffer_operation *op)
 
-virtual void internal_consume (buffer_operation *op)
 
-virtual void internal_release (buffer_operation *op)
 
-task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
-void reset_receiver (reset_flags)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - - - - - - - -

-Protected Attributes

-internal::round_robin_cache< T,
-null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-bool forwarder_busy
 
-internal::aggregator
-< handler_type,
-buffer_operation
my_aggregator
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
- - - - - - - - - - - - - - + + + + + + + + + + +

-Friends

-class internal::forward_task_bypass< buffer_node< T, A > >
 
-class internal::aggregating_functor< class_type, buffer_operation >
 
-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
bucket_accessor (concurrent_hash_map *base, const hashcode_t h, bool writer=false)
 
+void acquire (concurrent_hash_map *base, const hashcode_t h, bool writer=false)
 find a bucket by masked hashcode, optionally rehash, and acquire the lock
 
+bool is_writer ()
 check whether bucket is locked for write
 
+bucket * operator() ()
 get bucket pointer
 

Detailed Description

-

template<typename T, typename A = cache_aligned_allocator<T>>
-class tbb::flow::interface8::buffer_node< T, A >

+

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor

-

Forwards messages in arbitrary order.

-

Member Function Documentation

- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::register_successor (successor_typer)
-
-inlinevirtual
-
- -

Adds a new successor.

-

Adds successor r to the list of successors; may forward tasks.

- -

Implements tbb::flow::interface8::sender< T >.

- -
-
- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::remove_successor (successor_typer)
-
-inlinevirtual
-
- -

Removes a successor.

-

Removes successor r from the list of successors. It also calls r.remove_predecessor(*this) to remove this node as a predecessor.

- -

Implements tbb::flow::interface8::sender< T >.

- -

References tbb::flow::interface8::receiver< T >::remove_predecessor().

- -
-
- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::try_consume ()
-
-inlinevirtual
-
- -

Consumes a reserved item.

-

true = item is removed from sender and reservation removed

- -

Reimplemented from tbb::flow::interface8::sender< T >.

- -
-
- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::try_get (T & v)
-
-inlinevirtual
-
- -

Request an item from the buffer_node.

-

true = v contains the returned item
- false = no item has been returned

- -

Reimplemented from tbb::flow::interface8::sender< T >.

- -
-
- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::try_release ()
-
-inlinevirtual
-
- -

Release a reserved item.

-

true = item has been released and so remains in sender

- -

Reimplemented from tbb::flow::interface8::sender< T >.

- -
-
- -
-
-
-template<typename T, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::buffer_node< T, A >::try_reserve (T & v)
-
-inlinevirtual
-
- -

Reserves an item.

-

false = no item can be reserved
- true = an item is reserved

- -

Reimplemented from tbb::flow::interface8::sender< T >.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +

    bucket accessor is to find, rehash, acquire a lock, and access a bucket

    +

The documentation for this class was generated from the following file:
    +
  • concurrent_hash_map.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00033.png b/doc/html/a00033.png index 012b7704743d2b4944e6b0274216eadac763aa52..9dea0c02f2dcf13c98fe30ad2f8962ebabdc2d05 100644 Binary files a/doc/html/a00033.png and b/doc/html/a00033.png differ diff --git a/doc/html/a00034.html b/doc/html/a00034.html index 783274c286fbe47a20759a3bf87b7888dc15bd7c..6496051c3da391960b2d40f6a9db99d889cd8d45 100644 --- a/doc/html/a00034.html +++ b/doc/html/a00034.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::buffer_node< T, A >::buffer_operation Class Reference +tbb::flow::interface8::buffer_node< T, A > Class Template Reference @@ -33,68 +33,579 @@
-
tbb::flow::interface8::buffer_node< T, A >::buffer_operation Class Reference
+
tbb::flow::interface8::buffer_node< T, A > Class Template Reference
+ +

Forwards messages in arbitrary order. + More...

+ +

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::buffer_node< T, A >::buffer_operation:
+Inheritance diagram for tbb::flow::interface8::buffer_node< T, A >:
- - + + +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T > +tbb::flow::interface8::priority_queue_node< T, Compare, A > +tbb::flow::interface8::queue_node< T, A > +tbb::flow::interface8::sequencer_node< T, A >
+ + + +

+Classes

class  buffer_operation
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef buffer_node< T, A > class_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

buffer_operation (const T &e, op_type t)
 
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+size_t successor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
+ + + + + + + + + + + + +

+Protected Types

enum  op_type {
+  reg_succ, +rem_succ, +req_item, +res_item, +
+  rel_res, +con_res, +put_item, +try_fwd_task, +
+  add_blt_succ, +del_blt_succ, +add_blt_pred, +del_blt_pred, +
+  blt_succ_cnt, +blt_pred_cnt, +blt_succ_cpy, +blt_pred_cpy +
+ }
 
enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef size_t size_type
 
+typedef
+internal::aggregating_functor
+< class_type, buffer_operation
handler_type
 
+typedef sender< T >
+::built_successors_type 
built_successors_type
 
+typedef receiver< T >
+::built_predecessors_type 
built_predecessors_type
 
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Public Attributes

-char type
 
-task * ltask
 
-union {
   input_type *   elem
 
   successor_type *   r
 
   predecessor_type *   p
 
   size_t   cnt_val
 
   successor_list_type *   svec
 
   predecessor_list_type *   pvec
 
}; 
 
-T * elem
 

+Protected Member Functions

+virtual void handle_operations (buffer_operation *op_list)
 
+task * grab_forwarding_task (buffer_operation &op_data)
 
+bool enqueue_forwarding_task (buffer_operation &op_data)
 
+virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
+virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
+virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
+built_successors_typebuilt_successors ()
 
+virtual void internal_add_built_succ (buffer_operation *op)
 
+virtual void internal_del_built_succ (buffer_operation *op)
 
+built_predecessors_typebuilt_predecessors ()
 
+virtual void internal_add_built_pred (buffer_operation *op)
 
+virtual void internal_del_built_pred (buffer_operation *op)
 
+virtual void internal_succ_cnt (buffer_operation *op)
 
+virtual void internal_pred_cnt (buffer_operation *op)
 
+virtual void internal_copy_succs (buffer_operation *op)
 
+virtual void internal_copy_preds (buffer_operation *op)
 
+virtual void internal_forward_task (buffer_operation *op)
 Tries to forward valid items to successors.
 
+virtual void internal_push (buffer_operation *op)
 
+virtual void internal_pop (buffer_operation *op)
 
+virtual void internal_reserve (buffer_operation *op)
 
+virtual void internal_consume (buffer_operation *op)
 
+virtual void internal_release (buffer_operation *op)
 
+task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
+void reset_receiver (reset_flags)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + + + + + + + + +

+Protected Attributes

+internal::round_robin_cache< T,
+null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+bool forwarder_busy
 
+internal::aggregator
+< handler_type,
+buffer_operation
my_aggregator
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 
+ + + + + + + + + + + + + + +

+Friends

+class internal::forward_task_bypass< buffer_node< T, A > >
 
+class internal::aggregating_functor< class_type, buffer_operation >
 
+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+

Detailed Description

+

template<typename T, typename A = cache_aligned_allocator<T>>
+class tbb::flow::interface8::buffer_node< T, A >

+ +

Forwards messages in arbitrary order.

+

Member Function Documentation

+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::register_successor (successor_typer)
+
+inlinevirtual
+
+ +

Adds a new successor.

+

Adds successor r to the list of successors; may forward tasks.

+ +

Implements tbb::flow::interface8::sender< T >.

+ +
+
+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::remove_successor (successor_typer)
+
+inlinevirtual
+
+ +

Removes a successor.

+

Removes successor r from the list of successors. It also calls r.remove_predecessor(*this) to remove this node as a predecessor.

+ +

Implements tbb::flow::interface8::sender< T >.

+ +

References tbb::flow::interface8::receiver< T >::remove_predecessor().

+ +
+
+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + +
+ + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::try_consume ()
+
+inlinevirtual
+
+ +

Consumes a reserved item.

+

true = item is removed from sender and reservation removed

+ +

Reimplemented from tbb::flow::interface8::sender< T >.

+ +
+
+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::try_get (T & v)
+
+inlinevirtual
+
+ +

Request an item from the buffer_node.

+

true = v contains the returned item
+ false = no item has been returned

+ +

Reimplemented from tbb::flow::interface8::sender< T >.

+ +
+
+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::try_release ()
+
+inlinevirtual
+
+ +

Release a reserved item.

+

true = item has been released and so remains in sender

+ +

Reimplemented from tbb::flow::interface8::sender< T >.

+ +
+
+ +
+
+
+template<typename T, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
bool tbb::flow::interface8::buffer_node< T, A >::try_reserve (T & v)
+
+inlinevirtual
+
+ +

Reserves an item.

+

false = no item can be reserved
+ true = an item is reserved

+ +

Reimplemented from tbb::flow::interface8::sender< T >.

+ +
+

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00034.png b/doc/html/a00034.png index ec16bbca9206adc1b725040c422de04630c7f54e..012b7704743d2b4944e6b0274216eadac763aa52 100644 Binary files a/doc/html/a00034.png and b/doc/html/a00034.png differ diff --git a/doc/html/a00035.html b/doc/html/a00035.html index 14d97d39975c12a33be8e165f7f851ca4ef832ba..284f5af88a5edd28c2dbd2a1b06289f23c6ae675 100644 --- a/doc/html/a00035.html +++ b/doc/html/a00035.html @@ -4,7 +4,7 @@ -tbb::cache_aligned_allocator< T > Class Template Reference +tbb::flow::interface8::buffer_node< T, A >::buffer_operation Class Reference @@ -33,112 +33,68 @@
-
tbb::cache_aligned_allocator< T > Class Template Reference
+
tbb::flow::interface8::buffer_node< T, A >::buffer_operation Class Reference
- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. - More...

- -

#include <cache_aligned_allocator.h>

+
+Inheritance diagram for tbb::flow::interface8::buffer_node< T, A >::buffer_operation:
+
+
+ + + +
- - - -

-Classes

struct  rebind
 
- - - - - - - - - - - - - - - -

-Public Types

-typedef
-internal::allocator_type< T >
-::value_type 
value_type
 
-typedef value_type * pointer
 
-typedef const value_type * const_pointer
 
-typedef value_type & reference
 
-typedef const value_type & const_reference
 
-typedef size_t size_type
 
-typedef ptrdiff_t difference_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +

Public Member Functions

cache_aligned_allocator (const cache_aligned_allocator &) throw ()
 
-template<typename U >
 cache_aligned_allocator (const cache_aligned_allocator< U > &) throw ()
 
-pointer address (reference x) const
 
-const_pointer address (const_reference x) const
 
-pointer allocate (size_type n, const void *hint=0)
 Allocate space for n objects, starting on a cache/sector line.
 
-void deallocate (pointer p, size_type)
 Free block of memory that starts on a cache line.
 
-size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
-template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
-void construct (pointer p, value_type &&value)
 
-void construct (pointer p, const value_type &value)
 
-void destroy (pointer p)
 Destroy value at location pointed to by p.
 
buffer_operation (const T &e, op_type t)
 
+ + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

+char type
 
+task * ltask
 
+union {
   input_type *   elem
 
   successor_type *   r
 
   predecessor_type *   p
 
   size_t   cnt_val
 
   successor_list_type *   svec
 
   predecessor_list_type *   pvec
 
}; 
 
+T * elem
 
-

Detailed Description

-

template<typename T>
-class tbb::cache_aligned_allocator< T >

- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

-

The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

-

The documentation for this class was generated from the following file:
    -
  • cache_aligned_allocator.h
  • +
    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00035.png b/doc/html/a00035.png new file mode 100644 index 0000000000000000000000000000000000000000..ec16bbca9206adc1b725040c422de04630c7f54e Binary files /dev/null and b/doc/html/a00035.png differ diff --git a/doc/html/a00036.html b/doc/html/a00036.html index 4ff1aefbee37fafb5240bb562bf90d0773f6d576..d883183dc5658927348335ef60ba18c7f207a2d3 100644 --- a/doc/html/a00036.html +++ b/doc/html/a00036.html @@ -4,7 +4,7 @@ -tbb::cache_aligned_allocator< void > Class Template Reference +tbb::cache_aligned_allocator< T > Class Template Reference @@ -33,53 +33,112 @@
-
tbb::cache_aligned_allocator< void > Class Template Reference
+
tbb::cache_aligned_allocator< T > Class Template Reference
-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. +

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...

#include <cache_aligned_allocator.h>

- +

Classes

struct  rebind
struct  rebind
 
- - - - - - + + + + + + + + + + + + + + +

Public Types

-typedef void * pointer
 
-typedef const void * const_pointer
 
-typedef void value_type
 
+typedef
+internal::allocator_type< T >
+::value_type 
value_type
 
+typedef value_type * pointer
 
+typedef const value_type * const_pointer
 
+typedef value_type & reference
 
+typedef const value_type & const_reference
 
+typedef size_t size_type
 
+typedef ptrdiff_t difference_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

cache_aligned_allocator (const cache_aligned_allocator &) throw ()
 
+template<typename U >
 cache_aligned_allocator (const cache_aligned_allocator< U > &) throw ()
 
+pointer address (reference x) const
 
+const_pointer address (const_reference x) const
 
+pointer allocate (size_type n, const void *hint=0)
 Allocate space for n objects, starting on a cache/sector line.
 
+void deallocate (pointer p, size_type)
 Free block of memory that starts on a cache line.
 
+size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
+template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
+void construct (pointer p, value_type &&value)
 
+void construct (pointer p, const value_type &value)
 
+void destroy (pointer p)
 Destroy value at location pointed to by p.
 

Detailed Description

-

template<>
-class tbb::cache_aligned_allocator< void >

+

template<typename T>
+class tbb::cache_aligned_allocator< T >

-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

+

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

+

The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.


The documentation for this class was generated from the following file:
  • cache_aligned_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00037.html b/doc/html/a00037.html index ffe6de31df53739e0165d82f56e69ca1bbe3b25f..86091fd5f41bfcc552c29ce5a2724f14ae0aa358 100644 --- a/doc/html/a00037.html +++ b/doc/html/a00037.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave Struct Reference +tbb::cache_aligned_allocator< void > Class Template Reference @@ -33,41 +33,53 @@
-
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave Struct Reference
+
tbb::cache_aligned_allocator< void > Class Template Reference
+ +

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. + More...

+ +

#include <cache_aligned_allocator.h>

- - - - - + + +

-Public Member Functions

call_clear_on_leave (concurrent_hash_map *a_ch_map)
 
-void dismiss ()
 

+Classes

struct  rebind
 
- - - + + + + + + +

-Public Attributes

-concurrent_hash_mapmy_ch_map
 

+Public Types

+typedef void * pointer
 
+typedef const void * const_pointer
 
+typedef void value_type
 
-
The documentation for this struct was generated from the following file:
    -
  • concurrent_hash_map.h
  • +

    Detailed Description

    +

    template<>
    +class tbb::cache_aligned_allocator< void >

    + +

    Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

    +

    The documentation for this class was generated from the following file:
      +
    • cache_aligned_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00038.html b/doc/html/a00038.html index dceb3f048ed0fea554ab58874fb8427a78627b0a..a3c3f068b352d36d6d69c87cb56a2d06fae30b03 100644 --- a/doc/html/a00038.html +++ b/doc/html/a00038.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::callback< Callback, T > Class Template Reference +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave Struct Reference @@ -33,43 +33,41 @@
-
tbb::flow::interface8::callback< Callback, T > Class Template Reference
+
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave Struct Reference
-
-Inheritance diagram for tbb::flow::interface8::callback< Callback, T >:
-
-
- - -tbb::flow::interface8::callback_base - -
- - - - + + + + +

Public Member Functions

callback (graph &g, Callback c, const T &t)
 
-void call () const
 
call_clear_on_leave (concurrent_hash_map *a_ch_map)
 
+void dismiss ()
 
+ + +

+Public Attributes

+concurrent_hash_mapmy_ch_map
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • concurrent_hash_map.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00038.png b/doc/html/a00038.png deleted file mode 100644 index d4d69067fab426f1deda506dfe36b4178b15b71e..0000000000000000000000000000000000000000 Binary files a/doc/html/a00038.png and /dev/null differ diff --git a/doc/html/a00039.html b/doc/html/a00039.html index 1ed0fc4b06e91fddd002c0e8d7b3cfe6dc3d789a..db8068acf515f25ee04c99c2b4aab1a1822012b0 100644 --- a/doc/html/a00039.html +++ b/doc/html/a00039.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::callback_base Class Reference +tbb::flow::interface8::callback< Callback, T > Class Template Reference @@ -33,32 +33,35 @@
-
tbb::flow::interface8::callback_base Class Referenceabstract
+
tbb::flow::interface8::callback< Callback, T > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::callback_base:
+Inheritance diagram for tbb::flow::interface8::callback< Callback, T >:
- - -tbb::flow::interface8::callback< Callback, T > + + +tbb::flow::interface8::callback_base
- - + + + +

Public Member Functions

-virtual void call () const =0
 
callback (graph &g, Callback c, const T &t)
 
+void call () const
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -66,7 +69,7 @@ virtual void call () c

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00039.png b/doc/html/a00039.png index 6650f1591a879f68d5c40ef8501f77878d311bb0..d4d69067fab426f1deda506dfe36b4178b15b71e 100644 Binary files a/doc/html/a00039.png and b/doc/html/a00039.png differ diff --git a/doc/html/a00040.html b/doc/html/a00040.html index 1e7873a39e3bbca9ffc30dab1787f33997fec4b8..ce4ad208122c65f34e702df6d8c025a4bdb93fb0 100644 --- a/doc/html/a00040.html +++ b/doc/html/a00040.html @@ -4,7 +4,7 @@ -tbb::captured_exception Class Reference +tbb::flow::interface8::callback_base Class Reference @@ -33,179 +33,40 @@
-
tbb::captured_exception Class Reference
+
tbb::flow::interface8::callback_base Class Referenceabstract
- -

This class is used by TBB to propagate information about unhandled exceptions into the root thread. - More...

- -

#include <tbb_exception.h>

-Inheritance diagram for tbb::captured_exception:
+Inheritance diagram for tbb::flow::interface8::callback_base:
- - -tbb::tbb_exception + + +tbb::flow::interface8::callback< Callback, T >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Public Member Functions

captured_exception (const captured_exception &src)
 
captured_exception (const char *name_, const char *info)
 
-captured_exceptionoperator= (const captured_exception &src)
 
captured_exception
-*__TBB_EXPORTED_METHOD 
move () throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
void __TBB_EXPORTED_METHOD destroy () throw ()
 Destroys objects created by the move() method. More...
 
void throw_self ()
 Throws this exception object. More...
 
-const char *__TBB_EXPORTED_METHOD name () const throw ()
 Returns RTTI name of the originally intercepted exception.
 
-const char *__TBB_EXPORTED_METHOD what () const throw ()
 Returns the result of originally intercepted exception's what() method.
 
-void __TBB_EXPORTED_METHOD set (const char *name, const char *info) throw ()
 
-void __TBB_EXPORTED_METHOD clear () throw ()
 
- Public Member Functions inherited from tbb::tbb_exception
void operator delete (void *p)
 
+virtual void call () const =0
 
-

Detailed Description

-

This class is used by TBB to propagate information about unhandled exceptions into the root thread.

-

Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers.

-
See Also
tbb::tbb_exception
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - - - - - - - -
void __TBB_EXPORTED_METHOD tbb::captured_exception::destroy ()
throw (
)
-
-virtual
-
- -

Destroys objects created by the move() method.

-

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

- -

Implements tbb::tbb_exception.

- -
-
- -
-
- - - - - -
- - - - - - - - - - - - - -
captured_exception* __TBB_EXPORTED_METHOD tbb::captured_exception::move ()
throw (
)
-
-virtual
-
- -

Creates and returns pointer to the deep copy of this exception object.

-

Move semantics is allowed.

- -

Implements tbb::tbb_exception.

- -
-
- -
-
- - - - - -
- - - - - - - -
void tbb::captured_exception::throw_self ()
-
-inlinevirtual
-
- -

Throws this exception object.

-

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

- -

Implements tbb::tbb_exception.

- -
-

The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +
  • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00040.png b/doc/html/a00040.png index 131abf604d940965927a6b649f954dbc6663df1c..6650f1591a879f68d5c40ef8501f77878d311bb0 100644 Binary files a/doc/html/a00040.png and b/doc/html/a00040.png differ diff --git a/doc/html/a00041.html b/doc/html/a00041.html index 9f1877ea524768608d1548d1ff9186600ac51984..7df6a0d52b5a05ebfadd26a8df1a237195f46a06 100644 --- a/doc/html/a00041.html +++ b/doc/html/a00041.html @@ -4,7 +4,7 @@ -tbb::combinable< T > Class Template Reference +tbb::captured_exception Class Reference @@ -33,69 +33,179 @@
-
tbb::combinable< T > Class Template Reference
+
tbb::captured_exception Class Reference
-

Thread-local storage with optional reduction. +

This class is used by TBB to propagate information about unhandled exceptions into the root thread. More...

-

#include <combinable.h>

+

#include <tbb_exception.h>

+
+Inheritance diagram for tbb::captured_exception:
+
+
+ + +tbb::tbb_exception + +
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-template<typename finit >
 combinable (finit _finit)
 
~combinable ()
 destructor
 
combinable (const combinable &other)
 
-combinableoperator= (const combinable &other)
 
-void clear ()
 
-T & local ()
 
-T & local (bool &exists)
 
-template<typename combine_func_t >
combine (combine_func_t f_combine)
 
-template<typename combine_func_t >
void combine_each (combine_func_t f_combine)
 
captured_exception (const captured_exception &src)
 
captured_exception (const char *name_, const char *info)
 
+captured_exceptionoperator= (const captured_exception &src)
 
captured_exception
+*__TBB_EXPORTED_METHOD 
move () throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
void __TBB_EXPORTED_METHOD destroy () throw ()
 Destroys objects created by the move() method. More...
 
void throw_self ()
 Throws this exception object. More...
 
+const char *__TBB_EXPORTED_METHOD name () const throw ()
 Returns RTTI name of the originally intercepted exception.
 
+const char *__TBB_EXPORTED_METHOD what () const throw ()
 Returns the result of originally intercepted exception's what() method.
 
+void __TBB_EXPORTED_METHOD set (const char *name, const char *info) throw ()
 
+void __TBB_EXPORTED_METHOD clear () throw ()
 
- Public Member Functions inherited from tbb::tbb_exception
void operator delete (void *p)
 

Detailed Description

-

template<typename T>
-class tbb::combinable< T >

+

This class is used by TBB to propagate information about unhandled exceptions into the root thread.

+

Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers.

+
See Also
tbb::tbb_exception
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + +
void __TBB_EXPORTED_METHOD tbb::captured_exception::destroy ()
throw (
)
+
+virtual
+
+ +

Destroys objects created by the move() method.

+

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

+ +

Implements tbb::tbb_exception.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + +
captured_exception* __TBB_EXPORTED_METHOD tbb::captured_exception::move ()
throw (
)
+
+virtual
+
+ +

Creates and returns pointer to the deep copy of this exception object.

+

Move semantics is allowed.

+ +

Implements tbb::tbb_exception.

-

Thread-local storage with optional reduction.

-

The documentation for this class was generated from the following file:
    -
  • combinable.h
  • +
+
+ +
+
+ + + + + +
+ + + + + + + +
void tbb::captured_exception::throw_self ()
+
+inlinevirtual
+
+ +

Throws this exception object.

+

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

+ +

Implements tbb::tbb_exception.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00041.png b/doc/html/a00041.png new file mode 100644 index 0000000000000000000000000000000000000000..131abf604d940965927a6b649f954dbc6663df1c Binary files /dev/null and b/doc/html/a00041.png differ diff --git a/doc/html/a00042.html b/doc/html/a00042.html index 036f5ec0c1ff331a1a30d2a3eff116159f663bb0..5add4eebde5fea6f8c02527873e01933c10fc894 100644 --- a/doc/html/a00042.html +++ b/doc/html/a00042.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::composite_node< InputTuple, OutputTuple > Class Template Reference +tbb::combinable< T > Class Template Reference @@ -33,21 +33,69 @@
+
-
tbb::flow::interface8::composite_node< InputTuple, OutputTuple > Class Template Reference
+
tbb::combinable< T > Class Template Reference
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • + +

    Thread-local storage with optional reduction. + More...

    + +

    #include <combinable.h>

    + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    +template<typename finit >
     combinable (finit _finit)
     
    ~combinable ()
     destructor
     
    combinable (const combinable &other)
     
    +combinableoperator= (const combinable &other)
     
    +void clear ()
     
    +T & local ()
     
    +T & local (bool &exists)
     
    +template<typename combine_func_t >
    combine (combine_func_t f_combine)
     
    +template<typename combine_func_t >
    void combine_each (combine_func_t f_combine)
     
    +

    Detailed Description

    +

    template<typename T>
    +class tbb::combinable< T >

    + +

    Thread-local storage with optional reduction.

    +

    The documentation for this class was generated from the following file:
      +
    • combinable.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00043.html b/doc/html/a00043.html index a65c2170d535c73100ec219f5504bd7938c46dc2..39a3218cd86bacb3d7e3dbe3005a3d05c593dced 100644 --- a/doc/html/a00043.html +++ b/doc/html/a00043.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > Class Template Reference +tbb::flow::interface8::composite_node< InputTuple, OutputTuple > Class Template Reference @@ -33,111 +33,21 @@
-
-
tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > Class Template Reference
+
tbb::flow::interface8::composite_node< InputTuple, OutputTuple > Class Template Reference
-
-Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> >:
-
-
- - -tbb::flow::interface8::graph_node - -
- - - - - - -

-Public Types

-typedef tbb::flow::tuple
-< receiver< InputTypes > &... > 
input_ports_type
 
-typedef tbb::flow::tuple
-< sender< OutputTypes > &... > 
output_ports_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
-template<typename T1 , typename T2 >
void set_external_ports (T1 &&input_ports_tuple, T2 &&output_ports_tuple)
 
-template<typename... NodeTypes>
void add_visible_nodes (const NodeTypes &...n)
 
-template<typename... NodeTypes>
void add_nodes (const NodeTypes &...n)
 
-template<typename... Nodes>
void add_nodes (Nodes &...)
 
-template<typename... Nodes>
void add_visible_nodes (Nodes &...)
 
-void set_name (const char *name)
 
-input_ports_type input_ports ()
 
-output_ports_type output_ports ()
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - -

-Protected Member Functions

-void reset_node (reset_flags)
 
- - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00043.png b/doc/html/a00043.png deleted file mode 100644 index e2672430d7e1c3e4c614a89d0a040fa8fd14c3b0..0000000000000000000000000000000000000000 Binary files a/doc/html/a00043.png and /dev/null differ diff --git a/doc/html/a00044.html b/doc/html/a00044.html index 6cab9696515723d108e8e77be8a2696bb9904c86..a1dc3cd027761f31b7a728a820458887e33956c5 100644 --- a/doc/html/a00044.html +++ b/doc/html/a00044.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > Class Template Reference +tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > Class Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > Class Template Reference
+
tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> >:
+Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> >:
- - -tbb::flow::interface8::graph_node + + +tbb::flow::interface8::graph_node
- - +< receiver< InputTypes > &... >  + + +

Public Types

+
typedef tbb::flow::tuple
-< receiver< InputTypes > &... > 
input_ports_type
 
input_ports_type
 
+typedef tbb::flow::tuple
+< sender< OutputTypes > &... > 
output_ports_type
 
- - - - - - - - + + + + + + + - - - + + - - - + + - - - + + - - - + + - - + - - + + + - - - - + + + +

Public Member Functions

composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
-template<typename T >
void set_external_ports (T &&input_ports_tuple)
 
+
composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
+template<typename T1 , typename T2 >
void set_external_ports (T1 &&input_ports_tuple, T2 &&output_ports_tuple)
 
template<typename... NodeTypes>
void add_visible_nodes (const NodeTypes &...n)
 
+
void add_visible_nodes (const NodeTypes &...n)
 
template<typename... NodeTypes>
void add_nodes (const NodeTypes &...n)
 
+
void add_nodes (const NodeTypes &...n)
 
template<typename... Nodes>
void add_nodes (Nodes &...)
 
+
void add_nodes (Nodes &...)
 
template<typename... Nodes>
void add_visible_nodes (Nodes &...)
 
+
void add_visible_nodes (Nodes &...)
 
void set_name (const char *name)
 
+
 
input_ports_type input_ports ()
 
+
 
+output_ports_type output_ports ()
 
void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - +

Protected Member Functions

+
void reset_node (reset_flags)
 
 
- - - - - - - + + + + + + +

Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00044.png b/doc/html/a00044.png index e22b5a1acb65ffcae93c46072fc197e7bd36180e..e2672430d7e1c3e4c614a89d0a040fa8fd14c3b0 100644 Binary files a/doc/html/a00044.png and b/doc/html/a00044.png differ diff --git a/doc/html/a00045.html b/doc/html/a00045.html index d05d792f0579334ee490e49de149f8e0b86b3b07..313dff754dc3ae93c85534f0f7e0bf5a8fa23109 100644 --- a/doc/html/a00045.html +++ b/doc/html/a00045.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > Class Template Reference +tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > Class Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > Class Template Reference
+
tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> >:
+Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> >:
- - -tbb::flow::interface8::graph_node + + +tbb::flow::interface8::graph_node
- - +< receiver< InputTypes > &... >  +

Public Types

+
typedef tbb::flow::tuple
-< sender< OutputTypes > &... > 
output_ports_type
 
input_ports_type
 
- - - - - + + + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - - + + + - - - - + + + +

Public Member Functions

composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
+
composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
template<typename T >
void set_external_ports (T &&output_ports_tuple)
 
+
void set_external_ports (T &&input_ports_tuple)
 
template<typename... NodeTypes>
void add_visible_nodes (const NodeTypes &...n)
 
+
void add_visible_nodes (const NodeTypes &...n)
 
template<typename... NodeTypes>
void add_nodes (const NodeTypes &...n)
 
+
void add_nodes (const NodeTypes &...n)
 
template<typename... Nodes>
void add_nodes (Nodes &...)
 
+
void add_nodes (Nodes &...)
 
template<typename... Nodes>
void add_visible_nodes (Nodes &...)
 
+
void add_visible_nodes (Nodes &...)
 
void set_name (const char *name)
 
-output_ports_type output_ports ()
 
+
 
+input_ports_type input_ports ()
 
void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - +

Protected Member Functions

+
void reset_node (reset_flags)
 
 
- - - - - - - + + + + + + +

Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00045.png b/doc/html/a00045.png index c8701d6fd9352b9bab7358f314dae9249c5216a0..e22b5a1acb65ffcae93c46072fc197e7bd36180e 100644 Binary files a/doc/html/a00045.png and b/doc/html/a00045.png differ diff --git a/doc/html/a00046.html b/doc/html/a00046.html index 355c2b6209b4f48d8499319aff8e50c1d5ceb73c..c36cf5c2a78bfb522bc3d4461a9f6ec4e5f066d9 100644 --- a/doc/html/a00046.html +++ b/doc/html/a00046.html @@ -4,7 +4,7 @@ -tbb::interface6::internal::concrete_filter< T, U, Body > Class Template Reference +tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > Class Template Reference @@ -33,21 +33,104 @@
+
-
tbb::interface6::internal::concrete_filter< T, U, Body > Class Template Reference
+
tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > Class Template Reference
+
+Inheritance diagram for tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> >:
+
+
+ + +tbb::flow::interface8::graph_node + +
+ + + + +

+Public Types

+typedef tbb::flow::tuple
+< sender< OutputTypes > &... > 
output_ports_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

composite_node (graph &g, const char *type_name="composite_node")
 
composite_node (graph &g)
 
+template<typename T >
void set_external_ports (T &&output_ports_tuple)
 
+template<typename... NodeTypes>
void add_visible_nodes (const NodeTypes &...n)
 
+template<typename... NodeTypes>
void add_nodes (const NodeTypes &...n)
 
+template<typename... Nodes>
void add_nodes (Nodes &...)
 
+template<typename... Nodes>
void add_visible_nodes (Nodes &...)
 
+void set_name (const char *name)
 
+output_ports_type output_ports ()
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
+ + + +

+Protected Member Functions

+void reset_node (reset_flags)
 
+ + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00046.png b/doc/html/a00046.png new file mode 100644 index 0000000000000000000000000000000000000000..c8701d6fd9352b9bab7358f314dae9249c5216a0 Binary files /dev/null and b/doc/html/a00046.png differ diff --git a/doc/html/a00047.html b/doc/html/a00047.html index aefad45b19d51dbdd08ba895e3dd1f64eedffdac..519b9a5a4f9eab041826a42a0f32404e089c24bf 100644 --- a/doc/html/a00047.html +++ b/doc/html/a00047.html @@ -4,7 +4,7 @@ -tbb::concurrent_bounded_queue< T, A > Class Template Reference +tbb::interface6::internal::concrete_filter< T, U, Body > Class Template Reference @@ -33,376 +33,21 @@
-
-
tbb::concurrent_bounded_queue< T, A > Class Template Reference
+
tbb::interface6::internal::concrete_filter< T, U, Body > Class Template Reference
- -

A high-performance thread-safe blocking concurrent bounded queue. - More...

- -

#include <concurrent_queue.h>

-
-Inheritance diagram for tbb::concurrent_bounded_queue< T, A >:
-
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T value_type
 Element type in the queue.
 
-typedef A allocator_type
 Allocator type.
 
-typedef T & reference
 Reference type.
 
-typedef const T & const_reference
 Const reference type.
 
typedef std::ptrdiff_t size_type
 Integral type for representing size of the queue. More...
 
-typedef std::ptrdiff_t difference_type
 Difference type for iterator.
 
-typedef
-internal::concurrent_queue_iterator
-< concurrent_bounded_queue, T > 
iterator
 
-typedef
-internal::concurrent_queue_iterator
-< concurrent_bounded_queue,
-const T > 
const_iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

concurrent_bounded_queue (const allocator_type &a=allocator_type())
 Construct empty queue.
 
concurrent_bounded_queue (const concurrent_bounded_queue &src, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_bounded_queue (concurrent_bounded_queue &&src)
 Move constructors.
 
concurrent_bounded_queue (concurrent_bounded_queue &&src, const allocator_type &a)
 
-template<typename InputIterator >
 concurrent_bounded_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
~concurrent_bounded_queue ()
 Destroy queue.
 
-void push (const T &source)
 Enqueue an item at tail of queue.
 
-void push (T &&source)
 Move an item at tail of queue.
 
-template<typename... Arguments>
void emplace (Arguments &&...args)
 
void pop (T &destination)
 Dequeue item from head of queue. More...
 
-void abort ()
 Abort all pending queue operations.
 
bool try_push (const T &source)
 Enqueue an item at tail of queue if queue is not already full. More...
 
bool try_push (T &&source)
 Move an item at tail of queue if queue is not already full. More...
 
-template<typename... Arguments>
bool try_emplace (Arguments &&...args)
 
bool try_pop (T &destination)
 Attempt to dequeue an item from head of queue. More...
 
size_type size () const
 Return number of pushes minus number of pops. More...
 
-bool empty () const
 Equivalent to size()<=0.
 
-size_type capacity () const
 Maximum number of allowed elements.
 
void set_capacity (size_type new_capacity)
 Set the capacity. More...
 
-allocator_type get_allocator () const
 return allocator object
 
-void clear ()
 clear the queue. not thread-safe.
 
-iterator unsafe_begin ()
 
-iterator unsafe_end ()
 
-const_iterator unsafe_begin () const
 
-const_iterator unsafe_end () const
 
- - - - -

-Friends

-template<typename Container , typename Value >
class internal::concurrent_queue_iterator
 
-

Detailed Description

-

template<typename T, class A = cache_aligned_allocator<T>>
-class tbb::concurrent_bounded_queue< T, A >

- -

A high-performance thread-safe blocking concurrent bounded queue.

-

This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed.

-

Member Typedef Documentation

- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - -
typedef std::ptrdiff_t tbb::concurrent_bounded_queue< T, A >::size_type
-
- -

Integral type for representing size of the queue.

-

Note that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes.

- -
-
-

Member Function Documentation

- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
void tbb::concurrent_bounded_queue< T, A >::pop (T & destination)
-
-inline
-
- -

Dequeue item from head of queue.

-

Block until an item becomes available, and then dequeue it.

- -
-
- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
void tbb::concurrent_bounded_queue< T, A >::set_capacity (size_type new_capacity)
-
-inline
-
- -

Set the capacity.

-

Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever.

- -
-
- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
size_type tbb::concurrent_bounded_queue< T, A >::size () const
-
-inline
-
- -

Return number of pushes minus number of pops.

-

Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed capacity() if there are push operations in flight.

- -
-
- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::concurrent_bounded_queue< T, A >::try_pop (T & destination)
-
-inline
-
- -

Attempt to dequeue an item from head of queue.

-

Does not wait for item to become available. Returns true if successful; false otherwise.

- -
-
- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::concurrent_bounded_queue< T, A >::try_push (const T & source)
-
-inline
-
- -

Enqueue an item at tail of queue if queue is not already full.

-

Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.

- -
-
- -
-
-
-template<typename T , class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
bool tbb::concurrent_bounded_queue< T, A >::try_push (T && source)
-
-inline
-
- -

Move an item at tail of queue if queue is not already full.

-

Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.

- -
-

The documentation for this class was generated from the following file:
    -
  • concurrent_queue.h
  • +
  • pipeline.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00047.png b/doc/html/a00047.png deleted file mode 100644 index 3dc03c333709697a42cb92d8e57a8cb283aa9e6c..0000000000000000000000000000000000000000 Binary files a/doc/html/a00047.png and /dev/null differ diff --git a/doc/html/a00048.html b/doc/html/a00048.html index 7395eb8723ecfdb6b9487313ea5b13d9596a32f1..df37093febb30ba84ac7f4e43e50252b8f0ffa1b 100644 --- a/doc/html/a00048.html +++ b/doc/html/a00048.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference +tbb::concurrent_bounded_queue< T, A > Class Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference
+
tbb::concurrent_bounded_queue< T, A > Class Template Reference
-

Unordered map from Key to T. +

A high-performance thread-safe blocking concurrent bounded queue. More...

-

#include <concurrent_hash_map.h>

+

#include <concurrent_queue.h>

-Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >:
+Inheritance diagram for tbb::concurrent_bounded_queue< T, A >:
- - + +
- - - - - - - - - - - - - - - - -

-Classes

class  accessor
 Allows write access to elements and combines data access, locking, and garbage collection. More...
 
struct  accessor_not_used
 
class  bucket_accessor
 bucket accessor is to find, rehash, acquire a lock, and access a bucket More...
 
struct  call_clear_on_leave
 
class  const_accessor
 Combines data access, locking, and garbage collection. More...
 
struct  node
 
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - +internal::concurrent_queue_iterator
+< concurrent_bounded_queue,
+const T >  +

Public Types

-typedef Key key_type
 
-typedef T mapped_type
 
-typedef std::pair< const Key, T > value_type
 
-typedef hash_map_base::size_type size_type
 
-typedef ptrdiff_t difference_type
 
-typedef value_type * pointer
 
-typedef const value_type * const_pointer
 
-typedef value_type & reference
 
-typedef const value_type & const_reference
 
-typedef
-internal::hash_map_iterator
-< concurrent_hash_map,
-value_type > 
iterator
 
-typedef
-internal::hash_map_iterator
-< concurrent_hash_map, const
-value_type > 
const_iterator
 
+
+typedef T value_type
 Element type in the queue.
 
+typedef A allocator_type
 Allocator type.
 
+typedef T & reference
 Reference type.
 
+typedef const T & const_reference
 Const reference type.
 
typedef std::ptrdiff_t size_type
 Integral type for representing size of the queue. More...
 
+typedef std::ptrdiff_t difference_type
 Difference type for iterator.
 
typedef
-internal::hash_map_range
-< iterator > 
range_type
 
+internal::concurrent_queue_iterator
+< concurrent_bounded_queue, T > 
iterator
 
typedef
-internal::hash_map_range
-< const_iterator > 
const_range_type
 
-typedef Allocator allocator_type
 
const_iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

concurrent_hash_map (const allocator_type &a=allocator_type())
 Construct empty table.
 
concurrent_hash_map (size_type n, const allocator_type &a=allocator_type())
 Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
 
concurrent_hash_map (const concurrent_hash_map &table, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_hash_map (concurrent_hash_map &&table)
 Move constructor.
 
concurrent_hash_map (concurrent_hash_map &&table, const allocator_type &a)
 Move constructor.
 
-template<typename I >
 concurrent_hash_map (I first, I last, const allocator_type &a=allocator_type())
 Construction with copying iteration range and given allocator instance.
 
concurrent_hash_map (std::initializer_list< value_type > il, const allocator_type &a=allocator_type())
 Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
 
-concurrent_hash_mapoperator= (const concurrent_hash_map &table)
 Assignment.
 
-concurrent_hash_mapoperator= (concurrent_hash_map &&table)
 Move Assignment.
 
-concurrent_hash_mapoperator= (std::initializer_list< value_type > il)
 Assignment.
 
void rehash (size_type n=0)
 Rehashes and optionally resizes the whole table. More...
 
-void clear ()
 Clear table.
 
~concurrent_hash_map ()
 Clear table and destroy it.
 
-range_type range (size_type grainsize=1)
 
-const_range_type range (size_type grainsize=1) const
 
-iterator begin ()
 
-iterator end ()
 
-const_iterator begin () const
 
-const_iterator end () const
 
-std::pair< iterator, iterator > equal_range (const Key &key)
 
-std::pair< const_iterator,
-const_iterator > 
equal_range (const Key &key) const
 
-size_type size () const
 Number of items in table.
 
-bool empty () const
 True if size()==0.
 
-size_type max_size () const
 Upper bound on size.
 
-size_type bucket_count () const
 Returns the current number of buckets.
 
-allocator_type get_allocator () const
 return allocator object
 
-void swap (concurrent_hash_map &table)
 swap two instances. Iterators are invalidated
 
-size_type count (const Key &key) const
 Return count of items (0 or 1)
 
bool find (const_accessor &result, const Key &key) const
 Find item and acquire a read lock on the item. More...
 
bool find (accessor &result, const Key &key)
 Find item and acquire a write lock on the item. More...
 
bool insert (const_accessor &result, const Key &key)
 Insert item (if not already present) and acquire a read lock on the item. More...
 
bool insert (accessor &result, const Key &key)
 Insert item (if not already present) and acquire a write lock on the item. More...
 
bool insert (const_accessor &result, const value_type &value)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
bool insert (accessor &result, const value_type &value)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
bool insert (const value_type &value)
 Insert item by copying if there is no such key present already. More...
 
bool insert (const_accessor &result, value_type &&value)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
bool insert (accessor &result, value_type &&value)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
bool insert (value_type &&value)
 Insert item by copying if there is no such key present already. More...
 
template<typename... Args>
bool emplace (const_accessor &result, Args &&...args)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
template<typename... Args>
bool emplace (accessor &result, Args &&...args)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
template<typename... Args>
bool emplace (Args &&...args)
 Insert item by copying if there is no such key present already. More...
 
-template<typename I >
void insert (I first, I last)
 Insert range [first, last)
 
-void insert (std::initializer_list< value_type > il)
 Insert initializer list.
 
bool erase (const Key &key)
 Erase item. More...
 
bool erase (const_accessor &item_accessor)
 Erase item by const_accessor. More...
 
bool erase (accessor &item_accessor)
 Erase item by accessor. More...
 
- - - -

-Protected Types

-typedef Allocator::template
-rebind< node >::other 
node_allocator_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

-void delete_node (node_base *n)
 
-nodesearch_bucket (const key_type &key, bucket *b) const
 
-void rehash_bucket (bucket *b_new, const hashcode_t h)
 
-bool lookup (bool op_insert, const Key &key, const T *t, const_accessor *result, bool write, node *(*allocate_node)(node_allocator_type &, const Key &, const T *), node *tmp_n=0)
 Insert or find item and optionally acquire a lock on the item.
 
-template<typename Accessor >
bool generic_move_insert (Accessor &&result, value_type &&value)
 
-template<typename Accessor , typename... Args>
bool generic_emplace (Accessor &&result, Args &&...args)
 
-bool exclude (const_accessor &item_accessor)
 delete item by accessor
 
-template<typename I >
std::pair< I, I > internal_equal_range (const Key &key, I end) const
 Returns an iterator for an item defined by the key, or for the next item after it (if upper==true)
 
-void internal_copy (const concurrent_hash_map &source)
 Copy "source" to *this, where *this must start out empty.
 
-template<typename I >
void internal_copy (I first, I last)
 
const_pointer internal_fast_find (const Key &key) const
 Fast find when no concurrent erasure is used. For internal use inside TBB only! More...
 
- - - - - - - - - - - - -

-Static Protected Member Functions

-static nodeallocate_node_copy_construct (node_allocator_type &allocator, const Key &key, const T *t)
 
-static nodeallocate_node_move_construct (node_allocator_type &allocator, const Key &key, const T *t)
 
-template<typename... Args>
static nodeallocate_node_emplace_construct (node_allocator_type &allocator, Args &&...args)
 
-static nodeallocate_node_default_construct (node_allocator_type &allocator, const Key &key, const T *)
 
-static nodedo_not_allocate_node (node_allocator_type &, const Key &, const T *)
 
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Protected Attributes

-node_allocator_type my_allocator
 
-HashCompare my_hash_compare
 
concurrent_bounded_queue (const allocator_type &a=allocator_type())
 Construct empty queue.
 
concurrent_bounded_queue (const concurrent_bounded_queue &src, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_bounded_queue (concurrent_bounded_queue &&src)
 Move constructors.
 
concurrent_bounded_queue (concurrent_bounded_queue &&src, const allocator_type &a)
 
+template<typename InputIterator >
 concurrent_bounded_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
~concurrent_bounded_queue ()
 Destroy queue.
 
+void push (const T &source)
 Enqueue an item at tail of queue.
 
+void push (T &&source)
 Move an item at tail of queue.
 
+template<typename... Arguments>
void emplace (Arguments &&...args)
 
void pop (T &destination)
 Dequeue item from head of queue. More...
 
+void abort ()
 Abort all pending queue operations.
 
bool try_push (const T &source)
 Enqueue an item at tail of queue if queue is not already full. More...
 
bool try_push (T &&source)
 Move an item at tail of queue if queue is not already full. More...
 
+template<typename... Arguments>
bool try_emplace (Arguments &&...args)
 
bool try_pop (T &destination)
 Attempt to dequeue an item from head of queue. More...
 
size_type size () const
 Return number of pushes minus number of pops. More...
 
+bool empty () const
 Equivalent to size()<=0.
 
+size_type capacity () const
 Maximum number of allowed elements.
 
void set_capacity (size_type new_capacity)
 Set the capacity. More...
 
+allocator_type get_allocator () const
 return allocator object
 
+void clear ()
 clear the queue. not thread-safe.
 
+iterator unsafe_begin ()
 
+iterator unsafe_end ()
 
+const_iterator unsafe_begin () const
 
+const_iterator unsafe_end () const
 
- - - - - - - - - - - - - - - - - - + +

Friends

+
template<typename Container , typename Value >
class internal::hash_map_iterator
 
-template<typename I >
class internal::hash_map_range
 
-class const_accessor
 
-const_accessoraccessor_location (accessor_not_used const &)
 
-const_accessoraccessor_location (const_accessor &a)
 
-bool is_write_access_needed (accessor const &)
 
-bool is_write_access_needed (const_accessor const &)
 
-bool is_write_access_needed (accessor_not_used const &)
 
class internal::concurrent_queue_iterator
 

Detailed Description

-

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >

- -

Unordered map from Key to T.

-
concurrent_hash_map is associative container with concurrent access.
-
Compatibility
The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).
-
Exception Safety
    -
  • Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.
  • -
  • If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).
  • -
  • If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results.
  • -
-
-
Changes since TBB 2.1
    -
  • Replaced internal algorithm and data structure. Patent is pending.
  • -
  • Added buckets number argument for constructor
  • -
-
-
Changes since TBB 2.0
    -
  • Fixed exception-safety
  • -
  • Added template argument for allocator
  • -
  • Added allocator argument in constructors
  • -
  • Added constructor from a range of iterators
  • -
  • Added several new overloaded insert() methods
  • -
  • Added get_allocator()
  • -
  • Added swap()
  • -
  • Added count()
  • -
  • Added overloaded erase(accessor &) and erase(const_accessor&)
  • -
  • Added equal_range() [const]
  • -
  • Added [const_]pointer, [const_]reference, and allocator_type types
  • -
  • Added global functions: operator==(), operator!=(), and swap()
  • -
-
-

Member Function Documentation

- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-
-template<typename... Args>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (const_accessorresult,
Args &&... args 
)
-
-inline
-
- -

Insert item by copying if there is no such key present already and acquire a read lock on the item.

-

Returns true if item is new.

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-
-template<typename... Args>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (accessorresult,
Args &&... args 
)
-
-inline
-
- -

Insert item by copying if there is no such key present already and acquire a write lock on the item.

-

Returns true if item is new.

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-
-template<typename... Args>
- - - - - -
- - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (Args &&... args)
-
-inline
-
- -

Insert item by copying if there is no such key present already.

-

Returns true if item is inserted.

+

template<typename T, class A = cache_aligned_allocator<T>>
+class tbb::concurrent_bounded_queue< T, A >

-
-
- +

A high-performance thread-safe blocking concurrent bounded queue.

+

This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed.

+

Member Typedef Documentation

+
-template<typename Key , typename T , typename HashCompare , typename A >
+template<typename T , class A = cache_aligned_allocator<T>>
- - - - - +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase (const Key & key)typedef std::ptrdiff_t tbb::concurrent_bounded_queue< T, A >::size_type
-

Erase item.

-

Return true if item was erased by particularly this call.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor::is_writer().

+

Integral type for representing size of the queue.

+

Note that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes.

- +

Member Function Documentation

+
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
- + - - + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase void tbb::concurrent_bounded_queue< T, A >::pop (const_accessoritem_accessor)T & destination)
@@ -608,25 +247,25 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
-

Erase item by const_accessor.

-

Return true if item was erased by particularly this call.

+

Dequeue item from head of queue.

+

Block until an item becomes available, and then dequeue it.

- +
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
- + - - + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase void tbb::concurrent_bounded_queue< T, A >::set_capacity (accessoritem_accessor)size_type new_capacity)
@@ -637,272 +276,25 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
-

Erase item by accessor.

-

Return true if item was erased by particularly this call.

+

Set the capacity.

+

Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever.

- +
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
- - -
- + - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::find size_type tbb::concurrent_bounded_queue< T, A >::size (const_accessorresult,
const Key & key 
) const
-
-inline
-
- -

Find item and acquire a read lock on the item.

-

Return true if item is found, false otherwise.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
- - -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::find (accessorresult,
const Key & key 
)
-
-inline
-
- -

Find item and acquire a write lock on the item.

-

Return true if item is found, false otherwise.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const_accessorresult,
const Key & key 
)
-
-inline
-
- -

Insert item (if not already present) and acquire a read lock on the item.

-

Returns true if item is new.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (accessorresult,
const Key & key 
)
-
-inline
-
- -

Insert item (if not already present) and acquire a write lock on the item.

-

Returns true if item is new.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const_accessorresult,
const value_type & value 
)
-
-inline
-
- -

Insert item by copying if there is no such key present already and acquire a read lock on the item.

-

Returns true if item is new.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - - - - - - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (accessorresult,
const value_type & value 
)
-
-inline
-
- -

Insert item by copying if there is no such key present already and acquire a write lock on the item.

-

Returns true if item is new.

- -

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - @@ -912,36 +304,26 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
- - - - - - - + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const value_type & value)) const
-

Insert item by copying if there is no such key present already.

-

Returns true if item is inserted.

+

Return number of pushes minus number of pops.

+

Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed capacity() if there are push operations in flight.

- +
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
@@ -951,36 +333,26 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
- + - - - - - + + - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert bool tbb::concurrent_bounded_queue< T, A >::try_pop (const_accessorresult,
T & destination) value_type && value 
)
-

Insert item by copying if there is no such key present already and acquire a read lock on the item.

-

Returns true if item is new.

+

Attempt to dequeue an item from head of queue.

+

Does not wait for item to become available. Returns true if successful; false otherwise.

- +
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
@@ -990,25 +362,25 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
- + - - - - - + + - - - - - - -
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert bool tbb::concurrent_bounded_queue< T, A >::try_push (accessorresult,
const T & source) value_type && value 
)
-

Insert item by copying if there is no such key present already and acquire a write lock on the item.

-

Returns true if item is new.

+

Enqueue an item at tail of queue if queue is not already full.

+

Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.

- +
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+template<typename T , class A = cache_aligned_allocator<T>>
- + - - + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert bool tbb::concurrent_bounded_queue< T, A >::try_push (value_type && value)T && source)
@@ -1019,68 +391,18 @@ template<typename Key , typename T , typename HashCompare = tbb_hash_compare
-

Insert item by copying if there is no such key present already.

-

Returns true if item is inserted.

- -
- - -
-
-
-template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
- - - - - -
- - - - - - - - -
const_pointer tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::internal_fast_find (const Key & key) const
-
-inlineprotected
-
- -

Fast find when no concurrent erasure is used. For internal use inside TBB only!

-

Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations.

- -
-
- -
-
-
-template<typename Key , typename T , typename HashCompare , typename A >
- - - - - - - - -
void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::rehash (size_type n = 0)
-
- -

Rehashes and optionally resizes the whole table.

-

Useful to optimize performance before or after concurrent operations. Also enables using of find() and count() concurrent methods in serial context.

+

Move an item at tail of queue if queue is not already full.

+

Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full.


The documentation for this class was generated from the following file:
    -
  • concurrent_hash_map.h
  • +
  • concurrent_queue.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00048.png b/doc/html/a00048.png index 3f0a8f2647a021e7aaf7f2cdc797f78fc7a65808..3dc03c333709697a42cb92d8e57a8cb283aa9e6c 100644 Binary files a/doc/html/a00048.png and b/doc/html/a00048.png differ diff --git a/doc/html/a00049.html b/doc/html/a00049.html index 8ae60d6fa1c2234a9c203cdc3509425f0cc1f595..454b8674ca8d6ed1c1a07b8eb1bda51062dfe7b2 100644 --- a/doc/html/a00049.html +++ b/doc/html/a00049.html @@ -4,7 +4,7 @@ -tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type > Class Template Reference +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type > Class Template Reference
+
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A > Class Template Reference
+ +

Unordered map from Key to T. + More...

+ +

#include <concurrent_hash_map.h>

-Inheritance diagram for tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >:
+Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >:
- - + +
+ + + + + + + + + + + + + + + + +

+Classes

class  accessor
 Allows write access to elements and combines data access, locking, and garbage collection. More...
 
struct  accessor_not_used
 
class  bucket_accessor
 bucket accessor is to find, rehash, acquire a lock, and access a bucket More...
 
struct  call_clear_on_leave
 
class  const_accessor
 Combines data access, locking, and garbage collection. More...
 
struct  node
 
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

-typedef handle_object handle
 
+typedef Key key_type
 
+typedef T mapped_type
 
+typedef std::pair< const Key, T > value_type
 
+typedef hash_map_base::size_type size_type
 
+typedef ptrdiff_t difference_type
 
+typedef value_type * pointer
 
+typedef const value_type * const_pointer
 
+typedef value_type & reference
 
+typedef const value_type & const_reference
 
+typedef
+internal::hash_map_iterator
+< concurrent_hash_map,
+value_type > 
iterator
 
+typedef
+internal::hash_map_iterator
+< concurrent_hash_map, const
+value_type > 
const_iterator
 
+typedef
+internal::hash_map_range
+< iterator > 
range_type
 
+typedef
+internal::hash_map_range
+< const_iterator > 
const_range_type
 
+typedef Allocator allocator_type
 
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

concurrent_lru_cache (value_function_type f, std::size_t number_of_lru_history_items)
 
-handle_object operator[] (key_type k)
 
concurrent_hash_map (const allocator_type &a=allocator_type())
 Construct empty table.
 
concurrent_hash_map (size_type n, const allocator_type &a=allocator_type())
 Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
 
concurrent_hash_map (const concurrent_hash_map &table, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_hash_map (concurrent_hash_map &&table)
 Move constructor.
 
concurrent_hash_map (concurrent_hash_map &&table, const allocator_type &a)
 Move constructor.
 
+template<typename I >
 concurrent_hash_map (I first, I last, const allocator_type &a=allocator_type())
 Construction with copying iteration range and given allocator instance.
 
concurrent_hash_map (std::initializer_list< value_type > il, const allocator_type &a=allocator_type())
 Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
 
+concurrent_hash_mapoperator= (const concurrent_hash_map &table)
 Assignment.
 
+concurrent_hash_mapoperator= (concurrent_hash_map &&table)
 Move Assignment.
 
+concurrent_hash_mapoperator= (std::initializer_list< value_type > il)
 Assignment.
 
void rehash (size_type n=0)
 Rehashes and optionally resizes the whole table. More...
 
+void clear ()
 Clear table.
 
~concurrent_hash_map ()
 Clear table and destroy it.
 
+range_type range (size_type grainsize=1)
 
+const_range_type range (size_type grainsize=1) const
 
+iterator begin ()
 
+iterator end ()
 
+const_iterator begin () const
 
+const_iterator end () const
 
+std::pair< iterator, iterator > equal_range (const Key &key)
 
+std::pair< const_iterator,
+const_iterator > 
equal_range (const Key &key) const
 
+size_type size () const
 Number of items in table.
 
+bool empty () const
 True if size()==0.
 
+size_type max_size () const
 Upper bound on size.
 
+size_type bucket_count () const
 Returns the current number of buckets.
 
+allocator_type get_allocator () const
 return allocator object
 
+void swap (concurrent_hash_map &table)
 swap two instances. Iterators are invalidated
 
+size_type count (const Key &key) const
 Return count of items (0 or 1)
 
bool find (const_accessor &result, const Key &key) const
 Find item and acquire a read lock on the item. More...
 
bool find (accessor &result, const Key &key)
 Find item and acquire a write lock on the item. More...
 
bool insert (const_accessor &result, const Key &key)
 Insert item (if not already present) and acquire a read lock on the item. More...
 
bool insert (accessor &result, const Key &key)
 Insert item (if not already present) and acquire a write lock on the item. More...
 
bool insert (const_accessor &result, const value_type &value)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
bool insert (accessor &result, const value_type &value)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
bool insert (const value_type &value)
 Insert item by copying if there is no such key present already. More...
 
bool insert (const_accessor &result, value_type &&value)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
bool insert (accessor &result, value_type &&value)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
bool insert (value_type &&value)
 Insert item by copying if there is no such key present already. More...
 
template<typename... Args>
bool emplace (const_accessor &result, Args &&...args)
 Insert item by copying if there is no such key present already and acquire a read lock on the item. More...
 
template<typename... Args>
bool emplace (accessor &result, Args &&...args)
 Insert item by copying if there is no such key present already and acquire a write lock on the item. More...
 
template<typename... Args>
bool emplace (Args &&...args)
 Insert item by copying if there is no such key present already. More...
 
+template<typename I >
void insert (I first, I last)
 Insert range [first, last)
 
+void insert (std::initializer_list< value_type > il)
 Insert initializer list.
 
bool erase (const Key &key)
 Erase item. More...
 
bool erase (const_accessor &item_accessor)
 Erase item by const_accessor. More...
 
bool erase (accessor &item_accessor)
 Erase item by accessor. More...
 
+ + + +

+Protected Types

+typedef Allocator::template
+rebind< node >::other 
node_allocator_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

+void delete_node (node_base *n)
 
+nodesearch_bucket (const key_type &key, bucket *b) const
 
+void rehash_bucket (bucket *b_new, const hashcode_t h)
 
+bool lookup (bool op_insert, const Key &key, const T *t, const_accessor *result, bool write, node *(*allocate_node)(node_allocator_type &, const Key &, const T *), node *tmp_n=0)
 Insert or find item and optionally acquire a lock on the item.
 
+template<typename Accessor >
bool generic_move_insert (Accessor &&result, value_type &&value)
 
+template<typename Accessor , typename... Args>
bool generic_emplace (Accessor &&result, Args &&...args)
 
+bool exclude (const_accessor &item_accessor)
 delete item by accessor
 
+template<typename I >
std::pair< I, I > internal_equal_range (const Key &key, I end) const
 Returns an iterator for an item defined by the key, or for the next item after it (if upper==true)
 
+void internal_copy (const concurrent_hash_map &source)
 Copy "source" to *this, where *this must start out empty.
 
+template<typename I >
void internal_copy (I first, I last)
 
const_pointer internal_fast_find (const Key &key) const
 Fast find when no concurrent erasure is used. For internal use inside TBB only! More...
 
+ + + + + + + + + + + + +

+Static Protected Member Functions

+static nodeallocate_node_copy_construct (node_allocator_type &allocator, const Key &key, const T *t)
 
+static nodeallocate_node_move_construct (node_allocator_type &allocator, const Key &key, const T *t)
 
+template<typename... Args>
static nodeallocate_node_emplace_construct (node_allocator_type &allocator, Args &&...args)
 
+static nodeallocate_node_default_construct (node_allocator_type &allocator, const Key &key, const T *)
 
+static nodedo_not_allocate_node (node_allocator_type &, const Key &, const T *)
 
+ + + + +

+Protected Attributes

+node_allocator_type my_allocator
 
+HashCompare my_hash_compare
 
- - + + + + + + + + + + + + + + + + + + +

Friends

-class tbb::internal::aggregating_functor< self_type, aggregated_operation_type >
 
+template<typename Container , typename Value >
class internal::hash_map_iterator
 
+template<typename I >
class internal::hash_map_range
 
+class const_accessor
 
+const_accessoraccessor_location (accessor_not_used const &)
 
+const_accessoraccessor_location (const_accessor &a)
 
+bool is_write_access_needed (accessor const &)
 
+bool is_write_access_needed (const_accessor const &)
 
+bool is_write_access_needed (accessor_not_used const &)
 
+

Detailed Description

+

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >

+ +

Unordered map from Key to T.

+
concurrent_hash_map is associative container with concurrent access.
+
Compatibility
The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).
+
Exception Safety
    +
  • Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.
  • +
  • If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).
  • +
  • If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results.
  • +
+
+
Changes since TBB 2.1
    +
  • Replaced internal algorithm and data structure. Patent is pending.
  • +
  • Added buckets number argument for constructor
  • +
+
+
Changes since TBB 2.0
    +
  • Fixed exception-safety
  • +
  • Added template argument for allocator
  • +
  • Added allocator argument in constructors
  • +
  • Added constructor from a range of iterators
  • +
  • Added several new overloaded insert() methods
  • +
  • Added get_allocator()
  • +
  • Added swap()
  • +
  • Added count()
  • +
  • Added overloaded erase(accessor &) and erase(const_accessor&)
  • +
  • Added equal_range() [const]
  • +
  • Added [const_]pointer, [const_]reference, and allocator_type types
  • +
  • Added global functions: operator==(), operator!=(), and swap()
  • +
+
+

Member Function Documentation

+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (const_accessorresult,
Args &&... args 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a read lock on the item.

+

Returns true if item is new.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (accessorresult,
Args &&... args 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a write lock on the item.

+

Returns true if item is new.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::emplace (Args &&... args)
+
+inline
+
+ +

Insert item by copying if there is no such key present already.

+

Returns true if item is inserted.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare , typename A >
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase (const Key & key)
+
+ +

Erase item.

+

Return true if item was erased by particularly this call.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::bucket_accessor::is_writer().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase (const_accessoritem_accessor)
+
+inline
+
+ +

Erase item by const_accessor.

+

Return true if item was erased by particularly this call.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase (accessoritem_accessor)
+
+inline
+
+ +

Erase item by accessor.

+

Return true if item was erased by particularly this call.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::find (const_accessorresult,
const Key & key 
) const
+
+inline
+
+ +

Find item and acquire a read lock on the item.

+

Return true if item is found, false otherwise.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::find (accessorresult,
const Key & key 
)
+
+inline
+
+ +

Find item and acquire a write lock on the item.

+

Return true if item is found, false otherwise.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const_accessorresult,
const Key & key 
)
+
+inline
+
+ +

Insert item (if not already present) and acquire a read lock on the item.

+

Returns true if item is new.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (accessorresult,
const Key & key 
)
+
+inline
+
+ +

Insert item (if not already present) and acquire a write lock on the item.

+

Returns true if item is new.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const_accessorresult,
const value_type & value 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a read lock on the item.

+

Returns true if item is new.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (accessorresult,
const value_type & value 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a write lock on the item.

+

Returns true if item is new.

+ +

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor::release().

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const value_type & value)
+
+inline
+
+ +

Insert item by copying if there is no such key present already.

+

Returns true if item is inserted.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (const_accessorresult,
value_type && value 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a read lock on the item.

+

Returns true if item is new.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (accessorresult,
value_type && value 
)
+
+inline
+
+ +

Insert item by copying if there is no such key present already and acquire a write lock on the item.

+

Returns true if item is new.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + +
+ + + + + + + + +
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::insert (value_type && value)
+
+inline
+
+ +

Insert item by copying if there is no such key present already.

+

Returns true if item is inserted.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+ + + + + +
+ + + + + + + + +
const_pointer tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::internal_fast_find (const Key & key) const
+
+inlineprotected
+
+ +

Fast find when no concurrent erasure is used. For internal use inside TBB only!

+

Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations.

+ +
+
+ +
+
+
+template<typename Key , typename T , typename HashCompare , typename A >
+ + + + + + + + +
void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::rehash (size_type n = 0)
+
+ +

Rehashes and optionally resizes the whole table.

+

Useful to optimize performance before or after concurrent operations. Also enables using of find() and count() concurrent methods in serial context.

+ +
+

The documentation for this class was generated from the following file:
    -
  • concurrent_lru_cache.h
  • +
  • concurrent_hash_map.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00049.png b/doc/html/a00049.png index 856b3afbc688a7b01023a31c6da442bf2c88844f..3f0a8f2647a021e7aaf7f2cdc797f78fc7a65808 100644 Binary files a/doc/html/a00049.png and b/doc/html/a00049.png differ diff --git a/doc/html/a00050.html b/doc/html/a00050.html index c6bbe0776e89bedfb15060c0dbdace7409a5f8bb..0175a8cfab70a3a20316ba632a95412707639058 100644 --- a/doc/html/a00050.html +++ b/doc/html/a00050.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_priority_queue< T, Compare, A > Class Template Reference +tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type > Class Template Reference @@ -33,7 +33,7 @@ +Friends | +List of all members
-
tbb::interface5::concurrent_priority_queue< T, Compare, A > Class Template Reference
+
tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type > Class Template Reference
- -

Concurrent priority queue. - More...

- -

#include <concurrent_priority_queue.h>

+
+Inheritance diagram for tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >:
+
+
+ + + +
- - - - - - - - - - - - - - - - - - + +

Public Types

-typedef T value_type
 Element type in the queue.
 
-typedef T & reference
 Reference type.
 
-typedef const T & const_reference
 Const reference type.
 
-typedef size_t size_type
 Integral type for representing size of the queue.
 
-typedef ptrdiff_t difference_type
 Difference type for iterator.
 
-typedef A allocator_type
 Allocator type.
 
+typedef handle_object handle
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

concurrent_priority_queue (const allocator_type &a=allocator_type())
 Constructs a new concurrent_priority_queue with default capacity.
 
concurrent_priority_queue (size_type init_capacity, const allocator_type &a=allocator_type())
 Constructs a new concurrent_priority_queue with init_sz capacity.
 
-template<typename InputIterator >
 concurrent_priority_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
concurrent_priority_queue (std::initializer_list< T > init_list, const allocator_type &a=allocator_type())
 Constructor from std::initializer_list.
 
 concurrent_priority_queue (const concurrent_priority_queue &src)
 Copy constructor. More...
 
 concurrent_priority_queue (const concurrent_priority_queue &src, const allocator_type &a)
 Copy constructor with specific allocator. More...
 
concurrent_priority_queueoperator= (const concurrent_priority_queue &src)
 Assignment operator. More...
 
 concurrent_priority_queue (concurrent_priority_queue &&src)
 Move constructor. More...
 
 concurrent_priority_queue (concurrent_priority_queue &&src, const allocator_type &a)
 Move constructor with specific allocator. More...
 
concurrent_priority_queueoperator= (concurrent_priority_queue &&src)
 Move assignment operator. More...
 
-template<typename InputIterator >
void assign (InputIterator begin, InputIterator end)
 Assign the queue from [begin,end) range, not thread-safe.
 
-void assign (std::initializer_list< T > il)
 Assign the queue from std::initializer_list, not thread-safe.
 
-concurrent_priority_queueoperator= (std::initializer_list< T > il)
 Assign from std::initializer_list, not thread-safe.
 
bool empty () const
 Returns true if empty, false otherwise. More...
 
size_type size () const
 Returns the current number of elements contained in the queue. More...
 
void push (const_reference elem)
 Pushes elem onto the queue, increasing capacity of queue if necessary. More...
 
void push (value_type &&elem)
 Pushes elem onto the queue, increasing capacity of queue if necessary. More...
 
template<typename... Args>
void emplace (Args &&...args)
 Constructs a new element using args as the arguments for its construction and pushes it onto the queue */. More...
 
bool try_pop (reference elem)
 Gets a reference to and removes highest priority element. More...
 
void clear ()
 Clear the queue; not thread-safe. More...
 
void swap (concurrent_priority_queue &q)
 Swap this queue with another; not thread-safe. More...
 
-allocator_type get_allocator () const
 Return allocator object.
 
-

Detailed Description

-

template<typename T, typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
-class tbb::interface5::concurrent_priority_queue< T, Compare, A >

- -

Concurrent priority queue.

-

Constructor & Destructor Documentation

- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (const concurrent_priority_queue< T, Compare, A > & src)
-
-inlineexplicit
-
- -

Copy constructor.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (const concurrent_priority_queue< T, Compare, A > & src,
const allocator_typea 
)
-
-inline
-
- -

Copy constructor with specific allocator.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (concurrent_priority_queue< T, Compare, A > && src)
-
-inline
-
- -

Move constructor.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (concurrent_priority_queue< T, Compare, A > && src,
const allocator_typea 
)
-
-inline
-
- -

Move constructor with specific allocator.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
-

Member Function Documentation

- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::clear ()
-
-inline
-
- -

Clear the queue; not thread-safe.

-

This operation is unsafe if there are pending concurrent operations on the queue. Resets size, effectively emptying queue; does not free space. May not clear elements added in pending operations.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
-
-template<typename... Args>
- - - - - -
- - - - - - - - -
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::emplace (Args &&... args)
-
-inline
-
- -

Constructs a new element using args as the arguments for its construction and pushes it onto the queue */.

-

This operation can be safely used concurrently with other push, try_pop or emplace operations.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
bool tbb::interface5::concurrent_priority_queue< T, Compare, A >::empty () const
-
-inline
-
- -

Returns true if empty, false otherwise.

-

Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
concurrent_priority_queue& tbb::interface5::concurrent_priority_queue< T, Compare, A >::operator= (const concurrent_priority_queue< T, Compare, A > & src)
-
-inline
-
- -

Assignment operator.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
concurrent_priority_queue& tbb::interface5::concurrent_priority_queue< T, Compare, A >::operator= (concurrent_priority_queue< T, Compare, A > && src)
-
-inline
-
- -

Move assignment operator.

-

This operation is unsafe if there are pending concurrent operations on the src queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::push (const_reference elem)
-
-inline
-
- -

Pushes elem onto the queue, increasing capacity of queue if necessary.

-

This operation can be safely used concurrently with other push, try_pop or emplace operations.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::push (value_type && elem)
-
-inline
-
- -

Pushes elem onto the queue, increasing capacity of queue if necessary.

-

This operation can be safely used concurrently with other push, try_pop or emplace operations.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
size_type tbb::interface5::concurrent_priority_queue< T, Compare, A >::size () const
-
-inline
-
- -

Returns the current number of elements contained in the queue.

-

Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::swap (concurrent_priority_queue< T, Compare, A > & q)
-
-inline
-
- -

Swap this queue with another; not thread-safe.

-

This operation is unsafe if there are pending concurrent operations on the queue.

- -
-
- -
-
-
-template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
- - - - - + + + + +
- - - - - - - - -
bool tbb::interface5::concurrent_priority_queue< T, Compare, A >::try_pop (reference elem)
-
-inline
concurrent_lru_cache (value_function_type f, std::size_t number_of_lru_history_items)
 
+handle_object operator[] (key_type k)
 
+ + +

+Friends

+class tbb::internal::aggregating_functor< self_type, aggregated_operation_type >
 
-
- -

Gets a reference to and removes highest priority element.

-

If a highest priority element was found, sets elem and returns true, otherwise returns false. This operation can be safely used concurrently with other push, try_pop or emplace operations.

- -
-

The documentation for this class was generated from the following file:
    -
  • concurrent_priority_queue.h
  • +
  • concurrent_lru_cache.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00050.png b/doc/html/a00050.png new file mode 100644 index 0000000000000000000000000000000000000000..856b3afbc688a7b01023a31c6da442bf2c88844f Binary files /dev/null and b/doc/html/a00050.png differ diff --git a/doc/html/a00051.html b/doc/html/a00051.html index e0b2c6cccaf76543703811267da94fafe5c46ef6..ec0fc0204028fa834dabbd246f59872a7943405e 100644 --- a/doc/html/a00051.html +++ b/doc/html/a00051.html @@ -4,7 +4,7 @@ -tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference +tbb::interface5::concurrent_priority_queue< T, Compare, A > Class Template Reference @@ -33,167 +33,549 @@
-
tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference
+
tbb::interface5::concurrent_priority_queue< T, Compare, A > Class Template Reference
-

A high-performance thread-safe non-blocking concurrent queue. +

Concurrent priority queue. More...

-

#include <concurrent_queue.h>

-
-Inheritance diagram for tbb::strict_ppl::concurrent_queue< T, A >:
-
-
- - - -
+

#include <concurrent_priority_queue.h>

- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Types

-typedef T value_type
 Element type in the queue.
 
-typedef T & reference
 Reference type.
 
-typedef const T & const_reference
 Const reference type.
 
-typedef size_t size_type
 Integral type for representing size of the queue.
 
-typedef ptrdiff_t difference_type
 Difference type for iterator.
 
-typedef A allocator_type
 Allocator type.
 
-typedef
-internal::concurrent_queue_iterator
-< concurrent_queue, T > 
iterator
 
-typedef
-internal::concurrent_queue_iterator
-< concurrent_queue, const T > 
const_iterator
 
+typedef T value_type
 Element type in the queue.
 
+typedef T & reference
 Reference type.
 
+typedef const T & const_reference
 Const reference type.
 
+typedef size_t size_type
 Integral type for representing size of the queue.
 
+typedef ptrdiff_t difference_type
 Difference type for iterator.
 
+typedef A allocator_type
 Allocator type.
 
- - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

concurrent_queue (const allocator_type &a=allocator_type())
 Construct empty queue.
 
+
concurrent_priority_queue (const allocator_type &a=allocator_type())
 Constructs a new concurrent_priority_queue with default capacity.
 
concurrent_priority_queue (size_type init_capacity, const allocator_type &a=allocator_type())
 Constructs a new concurrent_priority_queue with init_sz capacity.
 
template<typename InputIterator >
 concurrent_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
concurrent_queue (const concurrent_queue &src, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_queue (concurrent_queue &&src)
 Move constructors.
 
concurrent_queue (concurrent_queue &&src, const allocator_type &a)
 
~concurrent_queue ()
 Destroy queue.
 
-void push (const T &source)
 Enqueue an item at tail of queue.
 
-void push (T &&source)
 
-template<typename... Arguments>
void emplace (Arguments &&...args)
 
bool try_pop (T &result)
 Attempt to dequeue an item from head of queue. More...
 
-size_type unsafe_size () const
 Return the number of items in the queue; thread unsafe.
 
-bool empty () const
 Equivalent to size()==0.
 
-void clear ()
 Clear the queue. not thread-safe.
 
-allocator_type get_allocator () const
 Return allocator object.
 
-iterator unsafe_begin ()
 
-iterator unsafe_end ()
 
-const_iterator unsafe_begin () const
 
-const_iterator unsafe_end () const
 
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Friends

-template<typename Container , typename Value >
class internal::concurrent_queue_iterator
 
 concurrent_priority_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
concurrent_priority_queue (std::initializer_list< T > init_list, const allocator_type &a=allocator_type())
 Constructor from std::initializer_list.
 
 concurrent_priority_queue (const concurrent_priority_queue &src)
 Copy constructor. More...
 
 concurrent_priority_queue (const concurrent_priority_queue &src, const allocator_type &a)
 Copy constructor with specific allocator. More...
 
concurrent_priority_queueoperator= (const concurrent_priority_queue &src)
 Assignment operator. More...
 
 concurrent_priority_queue (concurrent_priority_queue &&src)
 Move constructor. More...
 
 concurrent_priority_queue (concurrent_priority_queue &&src, const allocator_type &a)
 Move constructor with specific allocator. More...
 
concurrent_priority_queueoperator= (concurrent_priority_queue &&src)
 Move assignment operator. More...
 
+template<typename InputIterator >
void assign (InputIterator begin, InputIterator end)
 Assign the queue from [begin,end) range, not thread-safe.
 
+void assign (std::initializer_list< T > il)
 Assign the queue from std::initializer_list, not thread-safe.
 
+concurrent_priority_queueoperator= (std::initializer_list< T > il)
 Assign from std::initializer_list, not thread-safe.
 
bool empty () const
 Returns true if empty, false otherwise. More...
 
size_type size () const
 Returns the current number of elements contained in the queue. More...
 
void push (const_reference elem)
 Pushes elem onto the queue, increasing capacity of queue if necessary. More...
 
void push (value_type &&elem)
 Pushes elem onto the queue, increasing capacity of queue if necessary. More...
 
template<typename... Args>
void emplace (Args &&...args)
 Constructs a new element using args as the arguments for its construction and pushes it onto the queue */. More...
 
bool try_pop (reference elem)
 Gets a reference to and removes highest priority element. More...
 
void clear ()
 Clear the queue; not thread-safe. More...
 
void swap (concurrent_priority_queue &q)
 Swap this queue with another; not thread-safe. More...
 
+allocator_type get_allocator () const
 Return allocator object.
 

Detailed Description

-

template<typename T, typename A = cache_aligned_allocator<T>>
-class tbb::strict_ppl::concurrent_queue< T, A >

+

template<typename T, typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+class tbb::interface5::concurrent_priority_queue< T, Compare, A >

+ +

Concurrent priority queue.

+

Constructor & Destructor Documentation

+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (const concurrent_priority_queue< T, Compare, A > & src)
+
+inlineexplicit
+
+ +

Copy constructor.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (const concurrent_priority_queue< T, Compare, A > & src,
const allocator_typea 
)
+
+inline
+
+ +

Copy constructor with specific allocator.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (concurrent_priority_queue< T, Compare, A > && src)
+
+inline
+
+ +

Move constructor.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
tbb::interface5::concurrent_priority_queue< T, Compare, A >::concurrent_priority_queue (concurrent_priority_queue< T, Compare, A > && src,
const allocator_typea 
)
+
+inline
+
+ +

Move constructor with specific allocator.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+

Member Function Documentation

+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + +
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::clear ()
+
+inline
+
+ +

Clear the queue; not thread-safe.

+

This operation is unsafe if there are pending concurrent operations on the queue. Resets size, effectively emptying queue; does not free space. May not clear elements added in pending operations.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + +
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::emplace (Args &&... args)
+
+inline
+
+ +

Constructs a new element using args as the arguments for its construction and pushes it onto the queue */.

+

This operation can be safely used concurrently with other push, try_pop or emplace operations.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + +
bool tbb::interface5::concurrent_priority_queue< T, Compare, A >::empty () const
+
+inline
+
+ +

Returns true if empty, false otherwise.

+

Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
concurrent_priority_queue& tbb::interface5::concurrent_priority_queue< T, Compare, A >::operator= (const concurrent_priority_queue< T, Compare, A > & src)
+
+inline
+
+ +

Assignment operator.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
concurrent_priority_queue& tbb::interface5::concurrent_priority_queue< T, Compare, A >::operator= (concurrent_priority_queue< T, Compare, A > && src)
+
+inline
+
+ +

Move assignment operator.

+

This operation is unsafe if there are pending concurrent operations on the src queue.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::push (const_reference elem)
+
+inline
+
+ +

Pushes elem onto the queue, increasing capacity of queue if necessary.

+

This operation can be safely used concurrently with other push, try_pop or emplace operations.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::push (value_type && elem)
+
+inline
+
+ +

Pushes elem onto the queue, increasing capacity of queue if necessary.

+

This operation can be safely used concurrently with other push, try_pop or emplace operations.

+ +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + +
size_type tbb::interface5::concurrent_priority_queue< T, Compare, A >::size () const
+
+inline
+
+ +

Returns the current number of elements contained in the queue.

+

Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition.

-

A high-performance thread-safe non-blocking concurrent queue.

-

Multiple threads may each push and pop concurrently. Assignment construction is not allowed.

-

Member Function Documentation

- +
+
+ +
+
+
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
void tbb::interface5::concurrent_priority_queue< T, Compare, A >::swap (concurrent_priority_queue< T, Compare, A > & q)
+
+inline
+
+ +

Swap this queue with another; not thread-safe.

+

This operation is unsafe if there are pending concurrent operations on the queue.

+ +
+
+
-template<typename T , typename A = cache_aligned_allocator<T>>
+template<typename T , typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00054.png b/doc/html/a00054.png deleted file mode 100644 index 6fa3b58c9af6e07c385a119cbebb0f48e002ea6d..0000000000000000000000000000000000000000 Binary files a/doc/html/a00054.png and /dev/null differ diff --git a/doc/html/a00055.html b/doc/html/a00055.html index 4832f73092194bc19ff1b54c9f256fe6c9b67fa2..6e19e508126888f3df860dfd401722e991f2ffc3 100644 --- a/doc/html/a00055.html +++ b/doc/html/a00055.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator > Class Template Reference +tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator > Class Template Reference @@ -33,7 +33,7 @@
-
tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator > Class Template Reference
+
tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator > Class Template Reference
-Inheritance diagram for tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator >:
+Inheritance diagram for tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator >:
- - + +
- + - - + +
bool tbb::strict_ppl::concurrent_queue< T, A >::try_pop bool tbb::interface5::concurrent_priority_queue< T, Compare, A >::try_pop (T & result)reference elem)
@@ -204,18 +586,18 @@ template<typename T , typename A = cache_aligned_allocator<T>>
-

Attempt to dequeue an item from head of queue.

-

Does not wait for item to become available. Returns true if successful; false otherwise.

+

Gets a reference to and removes highest priority element.

+

If a highest priority element was found, sets elem and returns true, otherwise returns false. This operation can be safely used concurrently with other push, try_pop or emplace operations.


The documentation for this class was generated from the following file:
    -
  • concurrent_queue.h
  • +
  • concurrent_priority_queue.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00051.png b/doc/html/a00051.png deleted file mode 100644 index c7a9a4dd8a1bdf76bed3cf3af03fbd8ef90a637b..0000000000000000000000000000000000000000 Binary files a/doc/html/a00051.png and /dev/null differ diff --git a/doc/html/a00052.html b/doc/html/a00052.html index 6c96c886f091f2253ae3036b78eea07b7501877b..97613aeff165156fe69abbce3604d1731897508b 100644 --- a/doc/html/a00052.html +++ b/doc/html/a00052.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator > Class Template Reference +tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference @@ -33,132 +33,189 @@
-
tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator > Class Template Reference
+
tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference
+ +

A high-performance thread-safe non-blocking concurrent queue. + More...

+ +

#include <concurrent_queue.h>

-Inheritance diagram for tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator >:
+Inheritance diagram for tbb::strict_ppl::concurrent_queue< T, A >:
- - + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

Public Types

-typedef Key key_type
 
-typedef base_type::value_type value_type
 
-typedef T mapped_type
 
-typedef Hasher hasher
 
-typedef Key_equality key_equal
 
-typedef hash_compare key_compare
 
-typedef base_type::allocator_type allocator_type
 
-typedef base_type::pointer pointer
 
-typedef base_type::const_pointer const_pointer
 
-typedef base_type::reference reference
 
-typedef base_type::const_reference const_reference
 
-typedef base_type::size_type size_type
 
-typedef base_type::difference_type difference_type
 
-typedef base_type::iterator iterator
 
-typedef base_type::const_iterator const_iterator
 
-typedef base_type::iterator local_iterator
 
-typedef base_type::const_iterator const_local_iterator
 
+typedef T value_type
 Element type in the queue.
 
+typedef T & reference
 Reference type.
 
+typedef const T & const_reference
 Const reference type.
 
+typedef size_t size_type
 Integral type for representing size of the queue.
 
+typedef ptrdiff_t difference_type
 Difference type for iterator.
 
+typedef A allocator_type
 Allocator type.
 
+typedef
+internal::concurrent_queue_iterator
+< concurrent_queue, T > 
iterator
 
+typedef
+internal::concurrent_queue_iterator
+< concurrent_queue, const T > 
const_iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

concurrent_unordered_map (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_map (const Allocator &a)
 
-template<typename Iterator >
 concurrent_unordered_map (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_map (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_map (const concurrent_unordered_map &table)
 
-concurrent_unordered_mapoperator= (const concurrent_unordered_map &table)
 
concurrent_unordered_map (concurrent_unordered_map &&table)
 
-concurrent_unordered_mapoperator= (concurrent_unordered_map &&table)
 
concurrent_unordered_map (const concurrent_unordered_map &table, const Allocator &a)
 
concurrent_unordered_map (concurrent_unordered_map &&table, const Allocator &a)
 
-mapped_type & operator[] (const key_type &key)
 
-mapped_type & at (const key_type &key)
 
-const mapped_type & at (const key_type &key) const
 
concurrent_queue (const allocator_type &a=allocator_type())
 Construct empty queue.
 
+template<typename InputIterator >
 concurrent_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type())
 [begin,end) constructor
 
concurrent_queue (const concurrent_queue &src, const allocator_type &a=allocator_type())
 Copy constructor.
 
concurrent_queue (concurrent_queue &&src)
 Move constructors.
 
concurrent_queue (concurrent_queue &&src, const allocator_type &a)
 
~concurrent_queue ()
 Destroy queue.
 
+void push (const T &source)
 Enqueue an item at tail of queue.
 
+void push (T &&source)
 
+template<typename... Arguments>
void emplace (Arguments &&...args)
 
bool try_pop (T &result)
 Attempt to dequeue an item from head of queue. More...
 
+size_type unsafe_size () const
 Return the number of items in the queue; thread unsafe.
 
+bool empty () const
 Equivalent to size()==0.
 
+void clear ()
 Clear the queue. not thread-safe.
 
+allocator_type get_allocator () const
 Return allocator object.
 
+iterator unsafe_begin ()
 
+iterator unsafe_end ()
 
+const_iterator unsafe_begin () const
 
+const_iterator unsafe_end () const
 
+ + + + +

+Friends

+template<typename Container , typename Value >
class internal::concurrent_queue_iterator
 
+

Detailed Description

+

template<typename T, typename A = cache_aligned_allocator<T>>
+class tbb::strict_ppl::concurrent_queue< T, A >

+ +

A high-performance thread-safe non-blocking concurrent queue.

+

Multiple threads may each push and pop concurrently. Assignment construction is not allowed.

+

Member Function Documentation

+ +
+
+
+template<typename T , typename A = cache_aligned_allocator<T>>
+ + + + +
+ + + + + + + + +
bool tbb::strict_ppl::concurrent_queue< T, A >::try_pop (T & result)
+
+inline
+
+ +

Attempt to dequeue an item from head of queue.

+

Does not wait for item to become available. Returns true if successful; false otherwise.

+ +
+

The documentation for this class was generated from the following file:
    -
  • concurrent_unordered_map.h
  • +
  • concurrent_queue.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00052.png b/doc/html/a00052.png index 0e3c40436b0749b06f4880bfe7bb6a5d63b2a463..c7a9a4dd8a1bdf76bed3cf3af03fbd8ef90a637b 100644 Binary files a/doc/html/a00052.png and b/doc/html/a00052.png differ diff --git a/doc/html/a00053.html b/doc/html/a00053.html index 5e3ddf525a87907afe2dd158ef18662cb42202e0..25c4a1682b79533aba09d7daf899ede97deafdb5 100644 --- a/doc/html/a00053.html +++ b/doc/html/a00053.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping > Class Template Reference +tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator > Class Template Reference @@ -33,64 +33,124 @@
-
tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping > Class Template Reference
+
tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator > Class Template Reference
+
+Inheritance diagram for tbb::interface5::concurrent_unordered_map< Key, T, Hasher, Key_equality, Allocator >:
+
+
+ + + +
- - - -

-Classes

class  value_compare
 
- - - - - - + - - - - - -

-Protected Types

enum  { allow_multimapping = Allow_multimapping - }
 
-typedef std::pair< const Key, T > value_type
 
+

+Public Types

typedef Key key_type
 
-typedef Hash_compare hash_compare
 
-typedef Allocator::template
-rebind< value_type >::other 
allocator_type
 
- - - -

-Protected Member Functions

concurrent_unordered_map_traits (const hash_compare &hc)
 
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Static Protected Member Functions

-template<class Type1 , class Type2 >
static const Key & get_key (const std::pair< Type1, Type2 > &value)
 
 
+typedef base_type::value_type value_type
 
+typedef T mapped_type
 
+typedef Hasher hasher
 
+typedef Key_equality key_equal
 
+typedef hash_compare key_compare
 
+typedef base_type::allocator_type allocator_type
 
+typedef base_type::pointer pointer
 
+typedef base_type::const_pointer const_pointer
 
+typedef base_type::reference reference
 
+typedef base_type::const_reference const_reference
 
+typedef base_type::size_type size_type
 
+typedef base_type::difference_type difference_type
 
+typedef base_type::iterator iterator
 
+typedef base_type::const_iterator const_iterator
 
+typedef base_type::iterator local_iterator
 
+typedef base_type::const_iterator const_local_iterator
 
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Protected Attributes

-hash_compare my_hash_compare
 

+Public Member Functions

concurrent_unordered_map (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_map (const Allocator &a)
 
+template<typename Iterator >
 concurrent_unordered_map (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_map (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_map (const concurrent_unordered_map &table)
 
+concurrent_unordered_mapoperator= (const concurrent_unordered_map &table)
 
concurrent_unordered_map (concurrent_unordered_map &&table)
 
+concurrent_unordered_mapoperator= (concurrent_unordered_map &&table)
 
concurrent_unordered_map (const concurrent_unordered_map &table, const Allocator &a)
 
concurrent_unordered_map (concurrent_unordered_map &&table, const Allocator &a)
 
+mapped_type & operator[] (const key_type &key)
 
+mapped_type & at (const key_type &key)
 
+const mapped_type & at (const key_type &key) const
 

The documentation for this class was generated from the following file:
  • concurrent_unordered_map.h
  • @@ -98,7 +158,7 @@ hash_compare 
my_hash_compa

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00053.png b/doc/html/a00053.png new file mode 100644 index 0000000000000000000000000000000000000000..0e3c40436b0749b06f4880bfe7bb6a5d63b2a463 Binary files /dev/null and b/doc/html/a00053.png differ diff --git a/doc/html/a00054.html b/doc/html/a00054.html index bf5c466cfea45219dba70f11f042eff1b3b1d381..3fa42884ee99ad79d57e41492b77e8b8bdcd96c3 100644 --- a/doc/html/a00054.html +++ b/doc/html/a00054.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator > Class Template Reference +tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping > Class Template Reference @@ -33,115 +33,64 @@
-
tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator > Class Template Reference
+
tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping > Class Template Reference
-
-Inheritance diagram for tbb::interface5::concurrent_unordered_multimap< Key, T, Hasher, Key_equality, Allocator >:
-
-
- - - -
- - + + +

-Public Types

+

+Classes

class  value_compare
 
+ + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +

+Protected Types

enum  { allow_multimapping = Allow_multimapping + }
 
+typedef std::pair< const Key, T > value_type
 
typedef Key key_type
 
-typedef base_type::value_type value_type
 
-typedef T mapped_type
 
-typedef Hasher hasher
 
-typedef Key_equality key_equal
 
-typedef hash_compare key_compare
 
-typedef base_type::allocator_type allocator_type
 
-typedef base_type::pointer pointer
 
-typedef base_type::const_pointer const_pointer
 
-typedef base_type::reference reference
 
-typedef base_type::const_reference const_reference
 
-typedef base_type::size_type size_type
 
-typedef base_type::difference_type difference_type
 
-typedef base_type::iterator iterator
 
-typedef base_type::const_iterator const_iterator
 
-typedef base_type::iterator local_iterator
 
-typedef base_type::const_iterator const_local_iterator
 
 
+typedef Hash_compare hash_compare
 
+typedef Allocator::template
+rebind< value_type >::other 
allocator_type
 
+ + + +

+Protected Member Functions

concurrent_unordered_map_traits (const hash_compare &hc)
 
+ + + +

+Static Protected Member Functions

+template<class Type1 , class Type2 >
static const Key & get_key (const std::pair< Type1, Type2 > &value)
 
- - - - - - - - - - - - - - - - - - - - - - - + + +

-Public Member Functions

concurrent_unordered_multimap (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multimap (const Allocator &a)
 
-template<typename Iterator >
 concurrent_unordered_multimap (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multimap (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_multimap (const concurrent_unordered_multimap &table)
 
-concurrent_unordered_multimapoperator= (const concurrent_unordered_multimap &table)
 
concurrent_unordered_multimap (concurrent_unordered_multimap &&table)
 
-concurrent_unordered_multimapoperator= (concurrent_unordered_multimap &&table)
 
concurrent_unordered_multimap (const concurrent_unordered_multimap &table, const Allocator &a)
 
concurrent_unordered_multimap (concurrent_unordered_multimap &&table, const Allocator &a)
 

+Protected Attributes

+hash_compare my_hash_compare
 

The documentation for this class was generated from the following file:
  • concurrent_unordered_map.h
  • @@ -149,7 +98,7 @@ template<typename Iterator >
- - - + - - - - + + + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - +

Public Types

+
typedef Key key_type
 
+
 
typedef base_type::value_type value_type
 
-typedef Key mapped_type
 
+
 
+typedef T mapped_type
 
typedef Hasher hasher
 
+
 
typedef Key_equality key_equal
 
+
 
typedef hash_compare key_compare
 
+
 
typedef base_type::allocator_type allocator_type
 
+
 
typedef base_type::pointer pointer
 
+
 
typedef base_type::const_pointer const_pointer
 
+
 
typedef base_type::reference reference
 
+
 
typedef base_type::const_reference const_reference
 
+
 
typedef base_type::size_type size_type
 
+
 
typedef base_type::difference_type difference_type
 
+
 
typedef base_type::iterator iterator
 
+
 
typedef base_type::const_iterator const_iterator
 
+
 
typedef base_type::iterator local_iterator
 
+
 
typedef base_type::const_iterator const_local_iterator
 
 
- - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +

Public Member Functions

concurrent_unordered_multiset (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multiset (const Allocator &a)
 
+
concurrent_unordered_multimap (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multimap (const Allocator &a)
 
template<typename Iterator >
 concurrent_unordered_multiset (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multiset (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_multiset (const concurrent_unordered_multiset &table)
 
-concurrent_unordered_multisetoperator= (const concurrent_unordered_multiset &table)
 
concurrent_unordered_multiset (concurrent_unordered_multiset &&table)
 
-concurrent_unordered_multisetoperator= (concurrent_unordered_multiset &&table)
 
concurrent_unordered_multiset (const concurrent_unordered_multiset &table, const Allocator &a)
 
concurrent_unordered_multiset (concurrent_unordered_multiset &&table, const Allocator &a)
 
 concurrent_unordered_multimap (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multimap (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_multimap (const concurrent_unordered_multimap &table)
 
+concurrent_unordered_multimapoperator= (const concurrent_unordered_multimap &table)
 
concurrent_unordered_multimap (concurrent_unordered_multimap &&table)
 
+concurrent_unordered_multimapoperator= (concurrent_unordered_multimap &&table)
 
concurrent_unordered_multimap (const concurrent_unordered_multimap &table, const Allocator &a)
 
concurrent_unordered_multimap (concurrent_unordered_multimap &&table, const Allocator &a)
 

The documentation for this class was generated from the following file:
    -
  • concurrent_unordered_set.h
  • +
  • concurrent_unordered_map.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00055.png b/doc/html/a00055.png index 3ef6d1904236c3649eed742e1ffccb737f059db0..6fa3b58c9af6e07c385a119cbebb0f48e002ea6d 100644 Binary files a/doc/html/a00055.png and b/doc/html/a00055.png differ diff --git a/doc/html/a00056.html b/doc/html/a00056.html index cd93034d4fce016e404975db4f9e74052e715e29..9c665536b94a527c1cb28ef01f2e94bfb84fb5c8 100644 --- a/doc/html/a00056.html +++ b/doc/html/a00056.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator > Class Template Reference +tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator > Class Template Reference @@ -33,115 +33,115 @@
-
tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator > Class Template Reference
+
tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator > Class Template Reference
-Inheritance diagram for tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator >:
+Inheritance diagram for tbb::interface5::concurrent_unordered_multiset< Key, Hasher, Key_equality, Allocator >:
- - + +
- - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - +

Public Types

+
typedef Key key_type
 
+
 
typedef base_type::value_type value_type
 
+
 
typedef Key mapped_type
 
+
 
typedef Hasher hasher
 
+
 
typedef Key_equality key_equal
 
+
 
typedef hash_compare key_compare
 
+
 
typedef base_type::allocator_type allocator_type
 
+
 
typedef base_type::pointer pointer
 
+
 
typedef base_type::const_pointer const_pointer
 
+
 
typedef base_type::reference reference
 
+
 
typedef base_type::const_reference const_reference
 
+
 
typedef base_type::size_type size_type
 
+
 
typedef base_type::difference_type difference_type
 
+
 
typedef base_type::iterator iterator
 
+
 
typedef base_type::const_iterator const_iterator
 
+
 
typedef base_type::iterator local_iterator
 
+
 
typedef base_type::const_iterator const_local_iterator
 
 
- - - - - + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +

Public Member Functions

concurrent_unordered_set (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_set (const Allocator &a)
 
+
concurrent_unordered_multiset (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multiset (const Allocator &a)
 
template<typename Iterator >
 concurrent_unordered_set (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_set (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_set (const concurrent_unordered_set &table)
 
-concurrent_unordered_setoperator= (const concurrent_unordered_set &table)
 
concurrent_unordered_set (concurrent_unordered_set &&table)
 
-concurrent_unordered_setoperator= (concurrent_unordered_set &&table)
 
concurrent_unordered_set (const concurrent_unordered_set &table, const Allocator &a)
 
concurrent_unordered_set (concurrent_unordered_set &&table, const Allocator &a)
 
 concurrent_unordered_multiset (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &_Hasher=hasher(), const key_equal &_Key_equality=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_multiset (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_multiset (const concurrent_unordered_multiset &table)
 
+concurrent_unordered_multisetoperator= (const concurrent_unordered_multiset &table)
 
concurrent_unordered_multiset (concurrent_unordered_multiset &&table)
 
+concurrent_unordered_multisetoperator= (concurrent_unordered_multiset &&table)
 
concurrent_unordered_multiset (const concurrent_unordered_multiset &table, const Allocator &a)
 
concurrent_unordered_multiset (concurrent_unordered_multiset &&table, const Allocator &a)
 

The documentation for this class was generated from the following file:
  • concurrent_unordered_set.h
  • @@ -149,7 +149,7 @@ template<typename Iterator >

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00056.png b/doc/html/a00056.png index 9f9a0992510e41f62a52fb5849b985065586c9cb..3ef6d1904236c3649eed742e1ffccb737f059db0 100644 Binary files a/doc/html/a00056.png and b/doc/html/a00056.png differ diff --git a/doc/html/a00057.html b/doc/html/a00057.html index 6543958f405a0d71e595a3127df3dac280d10c96..1ea349df162f8edec717f7737946927cbaa14ece 100644 --- a/doc/html/a00057.html +++ b/doc/html/a00057.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping > Class Template Reference +tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator > Class Template Reference @@ -33,60 +33,115 @@
-
tbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping > Class Template Reference
+
tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator > Class Template Reference
+
+Inheritance diagram for tbb::interface5::concurrent_unordered_set< Key, Hasher, Key_equality, Allocator >:
+
+
+ + + +
- - - - - - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Protected Types

enum  { allow_multimapping = Allow_multimapping - }
 
-typedef Key value_type
 
+

+Public Types

typedef Key key_type
 
-typedef Hash_compare hash_compare
 
-typedef Allocator::template
-rebind< value_type >::other 
allocator_type
 
-typedef hash_compare value_compare
 
 
+typedef base_type::value_type value_type
 
+typedef Key mapped_type
 
+typedef Hasher hasher
 
+typedef Key_equality key_equal
 
+typedef hash_compare key_compare
 
+typedef base_type::allocator_type allocator_type
 
+typedef base_type::pointer pointer
 
+typedef base_type::const_pointer const_pointer
 
+typedef base_type::reference reference
 
+typedef base_type::const_reference const_reference
 
+typedef base_type::size_type size_type
 
+typedef base_type::difference_type difference_type
 
+typedef base_type::iterator iterator
 
+typedef base_type::const_iterator const_iterator
 
+typedef base_type::iterator local_iterator
 
+typedef base_type::const_iterator const_local_iterator
 
- - - -

-Protected Member Functions

concurrent_unordered_set_traits (const hash_compare &hc)
 
- - - -

-Static Protected Member Functions

-static const Key & get_key (const value_type &value)
 
- - - + + + + + + + + + + + + + + + + + + + + + + +

-Protected Attributes

-hash_compare my_hash_compare
 

+Public Member Functions

concurrent_unordered_set (size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_set (const Allocator &a)
 
+template<typename Iterator >
 concurrent_unordered_set (Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 
concurrent_unordered_set (std::initializer_list< value_type > il, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_unordered_set (const concurrent_unordered_set &table)
 
+concurrent_unordered_setoperator= (const concurrent_unordered_set &table)
 
concurrent_unordered_set (concurrent_unordered_set &&table)
 
+concurrent_unordered_setoperator= (concurrent_unordered_set &&table)
 
concurrent_unordered_set (const concurrent_unordered_set &table, const Allocator &a)
 
concurrent_unordered_set (concurrent_unordered_set &&table, const Allocator &a)
 

The documentation for this class was generated from the following file:
  • concurrent_unordered_set.h
  • @@ -94,7 +149,7 @@ hash_compare my_hash_compa

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00057.png b/doc/html/a00057.png new file mode 100644 index 0000000000000000000000000000000000000000..9f9a0992510e41f62a52fb5849b985065586c9cb Binary files /dev/null and b/doc/html/a00057.png differ diff --git a/doc/html/a00058.html b/doc/html/a00058.html index 6255390b1f73c396bd5247addb777c55d7136c63..0191be4aa8002634f498441520c1b6c94a310d6d 100644 --- a/doc/html/a00058.html +++ b/doc/html/a00058.html @@ -4,7 +4,7 @@ -tbb::concurrent_vector< T, A > Class Template Reference +tbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping > Class Template Reference @@ -33,775 +33,68 @@
-
tbb::concurrent_vector< T, A > Class Template Reference
+
tbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping > Class Template Reference
- -

Concurrent vector container. - More...

- -

#include <concurrent_vector.h>

-
-Inheritance diagram for tbb::concurrent_vector< T, A >:
-
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +

-Public Types

-typedef
-internal::concurrent_vector_base_v3::size_type 
size_type
 
-typedef
-internal::allocator_base< T, A >
-::allocator_type 
allocator_type
 
-typedef T value_type
 
-typedef ptrdiff_t difference_type
 
-typedef T & reference
 
-typedef const T & const_reference
 
-typedef T * pointer
 
-typedef const T * const_pointer
 
-typedef
-internal::vector_iterator
-< concurrent_vector, T > 
iterator
 
-typedef
-internal::vector_iterator
-< concurrent_vector, const T > 
const_iterator
 
-typedef std::reverse_iterator
-< iterator > 
reverse_iterator
 
-typedef std::reverse_iterator
-< const_iterator > 
const_reverse_iterator
 
-typedef std::reverse_iterator
-< iterator, T, T &, T * > 
reverse_iterator
 
-typedef std::reverse_iterator
-< const_iterator, T, const T
-&, const T * > 
const_reverse_iterator
 
-typedef generic_range_type
-< iterator > 
range_type
 
-typedef generic_range_type
-< const_iterator > 
const_range_type
 

+Protected Types

enum  { allow_multimapping = Allow_multimapping + }
 
+typedef Key value_type
 
+typedef Key key_type
 
+typedef Hash_compare hash_compare
 
+typedef Allocator::template
+rebind< value_type >::other 
allocator_type
 
+typedef hash_compare value_compare
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +

-Public Member Functions

concurrent_vector (const allocator_type &a=allocator_type())
 Construct empty vector.
 
concurrent_vector (std::initializer_list< T > init_list, const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_vector (const concurrent_vector &vector, const allocator_type &a=allocator_type())
 Copying constructor.
 
concurrent_vector (concurrent_vector &&source)
 Move constructor.
 
concurrent_vector (concurrent_vector &&source, const allocator_type &a)
 
-template<class M >
 concurrent_vector (const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())
 Copying constructor for vector with different allocator type.
 
concurrent_vector (size_type n)
 Construction with initial size specified by argument n.
 
concurrent_vector (size_type n, const_reference t, const allocator_type &a=allocator_type())
 Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance.
 
-template<class I >
 concurrent_vector (I first, I last, const allocator_type &a=allocator_type())
 Construction with copying iteration range and given allocator instance.
 
-concurrent_vectoroperator= (const concurrent_vector &vector)
 Assignment.
 
-concurrent_vectoroperator= (concurrent_vector &&other)
 Move assignment.
 
-template<class M >
concurrent_vectoroperator= (const concurrent_vector< T, M > &vector)
 Assignment for vector with different allocator type.
 
-concurrent_vectoroperator= (std::initializer_list< T > init_list)
 Assignment for initializer_list.
 
iterator grow_by (size_type delta)
 Grow by "delta" elements. More...
 
iterator grow_by (size_type delta, const_reference t)
 Grow by "delta" elements using copying constructor. More...
 
template<typename I >
iterator grow_by (I first, I last)
 
iterator grow_by (std::initializer_list< T > init_list)
 
iterator grow_to_at_least (size_type n)
 Append minimal sequence of elements such that size()>=n. More...
 
iterator grow_to_at_least (size_type n, const_reference t)
 
iterator push_back (const_reference item)
 Push item. More...
 
iterator push_back (T &&item)
 Push item, move-aware. More...
 
template<typename... Args>
iterator emplace_back (Args &&...args)
 Push item, create item "in place" with provided arguments. More...
 
reference operator[] (size_type index)
 Get reference to element at given index. More...
 
-const_reference operator[] (size_type index) const
 Get const reference to element at given index.
 
-reference at (size_type index)
 Get reference to element at given index. Throws exceptions on errors.
 
-const_reference at (size_type index) const
 Get const reference to element at given index. Throws exceptions on errors.
 
-range_type range (size_t grainsize=1)
 Get range for iterating with parallel algorithms.
 
-const_range_type range (size_t grainsize=1) const
 Get const range for iterating with parallel algorithms.
 
-size_type size () const
 Return size of vector. It may include elements under construction.
 
-bool empty () const
 Return false if vector is not empty or has elements under construction at least.
 
-size_type capacity () const
 Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value.
 
void reserve (size_type n)
 Allocate enough space to grow to size n without having to allocate more memory later. More...
 
-void resize (size_type n)
 Resize the vector. Not thread-safe.
 
-void resize (size_type n, const_reference t)
 Resize the vector, copy t for new elements. Not thread-safe.
 
-void shrink_to_fit ()
 Optimize memory usage and fragmentation.
 
-size_type max_size () const
 Upper bound on argument to reserve.
 
-iterator begin ()
 start iterator
 
-iterator end ()
 end iterator
 
-const_iterator begin () const
 start const iterator
 
-const_iterator end () const
 end const iterator
 
-const_iterator cbegin () const
 start const iterator
 
-const_iterator cend () const
 end const iterator
 
-reverse_iterator rbegin ()
 reverse start iterator
 
-reverse_iterator rend ()
 reverse end iterator
 
-const_reverse_iterator rbegin () const
 reverse start const iterator
 
-const_reverse_iterator rend () const
 reverse end const iterator
 
-const_reverse_iterator crbegin () const
 reverse start const iterator
 
-const_reverse_iterator crend () const
 reverse end const iterator
 
-reference front ()
 the first item
 
-const_reference front () const
 the first item const
 
-reference back ()
 the last item
 
-const_reference back () const
 the last item const
 
-allocator_type get_allocator () const
 return allocator object
 
-void assign (size_type n, const_reference t)
 assign n items by copying t item
 
-template<class I >
void assign (I first, I last)
 assign range [first, last)
 
-void assign (std::initializer_list< T > init_list)
 assigns an initializer list
 
-void swap (concurrent_vector &vector)
 swap two instances
 
void clear ()
 Clear container while keeping memory allocated. More...
 
~concurrent_vector ()
 Clear and destroy vector.
 
-const
-internal::concurrent_vector_base_v3 & 
internal_vector_base () const
 
-template<typename I >
void copy_range (void *dst, const void *p_type_erased_iterator, size_type n)
 

+Protected Member Functions

concurrent_unordered_set_traits (const hash_compare &hc)
 
- - - - -

-Friends

-template<typename C , typename U >
class internal::vector_iterator
 
-

Detailed Description

-

template<typename T, class A = cache_aligned_allocator<T>>
-class tbb::concurrent_vector< T, A >

- -

Concurrent vector container.

-
concurrent_vector is a container having the following main properties:
-- It provides random indexed access to its elements. The index of the first element is 0.
-- It ensures safe concurrent growing its size (different threads can safely append new elements).
-- Adding new elements does not invalidate existing iterators and does not change indices of existing items.
-
Compatibility
The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods.
-
Exception Safety
Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements:
    -
  • Throwing an exception is forbidden for destructor of T.
  • -
  • Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.
  • -
-Otherwise, the program's behavior is undefined.
-
If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means:
    -
  • There are no guarantees that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.
  • -
  • An invalid vector instance cannot be repaired; it is unable to grow anymore.
  • -
  • Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.
  • -
  • Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown.
  • -
-If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.
-
Fragmentation
Unlike an STL vector, a concurrent_vector does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be optimized by method compact() that merges several smaller arrays into one solid.
-
Changes since TBB 2.1
    -
  • Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated.
  • -
  • Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector
  • -
  • Added resize() methods (not thread-safe)
  • -
  • Added cbegin/cend/crbegin/crend methods
  • -
  • Changed return type of methods grow* and push_back to iterator
  • -
-
-
Changes since TBB 2.0
    -
  • Implemented exception-safety guarantees
  • -
  • Added template argument for allocator
  • -
  • Added allocator argument in constructors
  • -
  • Faster index calculation
  • -
  • First growth call specifies a number of segments to be merged in the first allocation.
  • -
  • Fixed memory blow up for swarm of vector's instances of small size
  • -
  • Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items.
  • -
  • Added STL-like constructors.
  • -
  • Added operators ==, < and derivatives
  • -
  • Added at() method, approved for using after an exception was thrown inside the vector
  • -
  • Added get_allocator() method.
  • -
  • Added assign() methods
  • -
  • Added compact() method to defragment first segments
  • -
  • Added swap() method
  • -
  • range() defaults on grainsize = 1 supporting auto grainsize algorithms.
  • -
-
-

Member Function Documentation

- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - -
void tbb::concurrent_vector< T, A >::clear ()
-
-inline
-
- -

Clear container while keeping memory allocated.

-

To free up the memory, use in conjunction with method compact(). Not thread safe

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
-
-template<typename... Args>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::emplace_back (Args &&... args)
-
-inline
-
- -

Push item, create item "in place" with provided arguments.

-

Returns iterator pointing to the new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_by (size_type delta)
-
-inline
-
- -

Grow by "delta" elements.

-

Returns iterator pointing to the first new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_by (size_type delta,
const_reference t 
)
-
-inline
-
- -

Grow by "delta" elements using copying constructor.

-

Returns iterator pointing to the first new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
-
-template<typename I >
- - - - - -
- - - - - - - - - - - - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_by (first,
last 
)
-
-inline
-
-

Returns iterator pointing to the first new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_by (std::initializer_list< T > init_list)
-
-inline
-
-

Returns iterator pointing to the first new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_to_at_least (size_type n)
-
-inline
-
- -

Append minimal sequence of elements such that size()>=n.

-

The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. Returns iterator that points to beginning of appended sequence. If no elements were appended, returns iterator pointing to nth element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - - - - - - - - - - - -
iterator tbb::concurrent_vector< T, A >::grow_to_at_least (size_type n,
const_reference t 
)
-
-inline
-
-

Analogous to grow_to_at_least( size_type n ) with exception that the new elements are initialized by copying of t instead of default construction.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
reference tbb::concurrent_vector< T, A >::operator[] (size_type index)
-
-inline
-
- -

Get reference to element at given index.

-

This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index < size().

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::push_back (const_reference item)
-
-inline
-
- -

Push item.

-

Returns iterator pointing to the new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - -
- - - - - - - - -
iterator tbb::concurrent_vector< T, A >::push_back (T && item)
-
-inline
-
- -

Push item, move-aware.

-

Returns iterator pointing to the new element.

- -
-
- -
-
-
-template<typename T, class A = cache_aligned_allocator<T>>
- - - - - + + + +
- - - - - - - - -
void tbb::concurrent_vector< T, A >::reserve (size_type n)
-
-inline

+Static Protected Member Functions

+static const Key & get_key (const value_type &value)
 
+ + +

+Protected Attributes

+hash_compare my_hash_compare
 
-
- -

Allocate enough space to grow to size n without having to allocate more memory later.

-

Like most of the methods provided for STL compatibility, this method is not thread safe. The capacity afterwards may be bigger than the requested reservation.

- -
-

The documentation for this class was generated from the following file:
    -
  • concurrent_vector.h
  • +
  • concurrent_unordered_set.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00058.png b/doc/html/a00058.png deleted file mode 100644 index 4ffff4fb1059c9d9a8a0874b4a005bb96fa0379a..0000000000000000000000000000000000000000 Binary files a/doc/html/a00058.png and /dev/null differ diff --git a/doc/html/a00059.html b/doc/html/a00059.html index 154286a31a9e5a7a0a85fa157894b38326c058b9..77e0d67bac292d01af8ea451b8aa7e7cd90088f1 100644 --- a/doc/html/a00059.html +++ b/doc/html/a00059.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class Reference +tbb::concurrent_vector< T, A > Class Template Reference @@ -33,107 +33,775 @@
-
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class Reference
+
tbb::concurrent_vector< T, A > Class Template Reference
-

Combines data access, locking, and garbage collection. +

Concurrent vector container. More...

-

#include <concurrent_hash_map.h>

+

#include <concurrent_vector.h>

-Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor:
+Inheritance diagram for tbb::concurrent_vector< T, A >:
- - -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::accessor + +
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

-typedef const
-concurrent_hash_map::value_type 
value_type
 Type of value.
 
+typedef
+internal::concurrent_vector_base_v3::size_type 
size_type
 
+typedef
+internal::allocator_base< T, A >
+::allocator_type 
allocator_type
 
+typedef T value_type
 
+typedef ptrdiff_t difference_type
 
+typedef T & reference
 
+typedef const T & const_reference
 
+typedef T * pointer
 
+typedef const T * const_pointer
 
+typedef
+internal::vector_iterator
+< concurrent_vector, T > 
iterator
 
+typedef
+internal::vector_iterator
+< concurrent_vector, const T > 
const_iterator
 
+typedef std::reverse_iterator
+< iterator > 
reverse_iterator
 
+typedef std::reverse_iterator
+< const_iterator > 
const_reverse_iterator
 
+typedef std::reverse_iterator
+< iterator, T, T &, T * > 
reverse_iterator
 
+typedef std::reverse_iterator
+< const_iterator, T, const T
+&, const T * > 
const_reverse_iterator
 
+typedef generic_range_type
+< iterator > 
range_type
 
+typedef generic_range_type
+< const_iterator > 
const_range_type
 
- - - - - - - - - - - - - - - - - - -

Public Member Functions

-bool empty () const
 True if result is empty.
 
-void release ()
 Set to null.
 
-const_reference operator* () const
 Return reference to associated value in hash table.
 
-const_pointer operator-> () const
 Return pointer to associated value in hash table.
 
const_accessor ()
 Create empty result.
 
~const_accessor ()
 Destroy result after releasing the underlying reference.
 
- - - -

-Protected Member Functions

-bool is_writer ()
 
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Protected Attributes

-nodemy_node
 
-hashcode_t my_hash
 
concurrent_vector (const allocator_type &a=allocator_type())
 Construct empty vector.
 
concurrent_vector (std::initializer_list< T > init_list, const allocator_type &a=allocator_type())
 Constructor from initializer_list.
 
concurrent_vector (const concurrent_vector &vector, const allocator_type &a=allocator_type())
 Copying constructor.
 
concurrent_vector (concurrent_vector &&source)
 Move constructor.
 
concurrent_vector (concurrent_vector &&source, const allocator_type &a)
 
+template<class M >
 concurrent_vector (const concurrent_vector< T, M > &vector, const allocator_type &a=allocator_type())
 Copying constructor for vector with different allocator type.
 
concurrent_vector (size_type n)
 Construction with initial size specified by argument n.
 
concurrent_vector (size_type n, const_reference t, const allocator_type &a=allocator_type())
 Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance.
 
+template<class I >
 concurrent_vector (I first, I last, const allocator_type &a=allocator_type())
 Construction with copying iteration range and given allocator instance.
 
+concurrent_vectoroperator= (const concurrent_vector &vector)
 Assignment.
 
+concurrent_vectoroperator= (concurrent_vector &&other)
 Move assignment.
 
+template<class M >
concurrent_vectoroperator= (const concurrent_vector< T, M > &vector)
 Assignment for vector with different allocator type.
 
+concurrent_vectoroperator= (std::initializer_list< T > init_list)
 Assignment for initializer_list.
 
iterator grow_by (size_type delta)
 Grow by "delta" elements. More...
 
iterator grow_by (size_type delta, const_reference t)
 Grow by "delta" elements using copying constructor. More...
 
template<typename I >
iterator grow_by (I first, I last)
 
iterator grow_by (std::initializer_list< T > init_list)
 
iterator grow_to_at_least (size_type n)
 Append minimal sequence of elements such that size()>=n. More...
 
iterator grow_to_at_least (size_type n, const_reference t)
 
iterator push_back (const_reference item)
 Push item. More...
 
iterator push_back (T &&item)
 Push item, move-aware. More...
 
template<typename... Args>
iterator emplace_back (Args &&...args)
 Push item, create item "in place" with provided arguments. More...
 
reference operator[] (size_type index)
 Get reference to element at given index. More...
 
+const_reference operator[] (size_type index) const
 Get const reference to element at given index.
 
+reference at (size_type index)
 Get reference to element at given index. Throws exceptions on errors.
 
+const_reference at (size_type index) const
 Get const reference to element at given index. Throws exceptions on errors.
 
+range_type range (size_t grainsize=1)
 Get range for iterating with parallel algorithms.
 
+const_range_type range (size_t grainsize=1) const
 Get const range for iterating with parallel algorithms.
 
+size_type size () const
 Return size of vector. It may include elements under construction.
 
+bool empty () const
 Return false if vector is not empty or has elements under construction at least.
 
+size_type capacity () const
 Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value.
 
void reserve (size_type n)
 Allocate enough space to grow to size n without having to allocate more memory later. More...
 
+void resize (size_type n)
 Resize the vector. Not thread-safe.
 
+void resize (size_type n, const_reference t)
 Resize the vector, copy t for new elements. Not thread-safe.
 
+void shrink_to_fit ()
 Optimize memory usage and fragmentation.
 
+size_type max_size () const
 Upper bound on argument to reserve.
 
+iterator begin ()
 start iterator
 
+iterator end ()
 end iterator
 
+const_iterator begin () const
 start const iterator
 
+const_iterator end () const
 end const iterator
 
+const_iterator cbegin () const
 start const iterator
 
+const_iterator cend () const
 end const iterator
 
+reverse_iterator rbegin ()
 reverse start iterator
 
+reverse_iterator rend ()
 reverse end iterator
 
+const_reverse_iterator rbegin () const
 reverse start const iterator
 
+const_reverse_iterator rend () const
 reverse end const iterator
 
+const_reverse_iterator crbegin () const
 reverse start const iterator
 
+const_reverse_iterator crend () const
 reverse end const iterator
 
+reference front ()
 the first item
 
+const_reference front () const
 the first item const
 
+reference back ()
 the last item
 
+const_reference back () const
 the last item const
 
+allocator_type get_allocator () const
 return allocator object
 
+void assign (size_type n, const_reference t)
 assign n items by copying t item
 
+template<class I >
void assign (I first, I last)
 assign range [first, last)
 
+void assign (std::initializer_list< T > init_list)
 assigns an initializer list
 
+void swap (concurrent_vector &vector)
 swap two instances
 
void clear ()
 Clear container while keeping memory allocated. More...
 
~concurrent_vector ()
 Clear and destroy vector.
 
+const
+internal::concurrent_vector_base_v3 & 
internal_vector_base () const
 
+template<typename I >
void copy_range (void *dst, const void *p_type_erased_iterator, size_type n)
 
- - - - + + +

Friends

-class concurrent_hash_map< Key, T, HashCompare, Allocator >
 
-class accessor
 
+template<typename C , typename U >
class internal::vector_iterator
 

Detailed Description

-

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
-class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor

+

template<typename T, class A = cache_aligned_allocator<T>>
+class tbb::concurrent_vector< T, A >

+ +

Concurrent vector container.

+
concurrent_vector is a container having the following main properties:
+- It provides random indexed access to its elements. The index of the first element is 0.
+- It ensures safe concurrent growing its size (different threads can safely append new elements).
+- Adding new elements does not invalidate existing iterators and does not change indices of existing items.
+
Compatibility
The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods.
+
Exception Safety
Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements:
    +
  • Throwing an exception is forbidden for destructor of T.
  • +
  • Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.
  • +
+Otherwise, the program's behavior is undefined.
+
If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means:
    +
  • There are no guarantees that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.
  • +
  • An invalid vector instance cannot be repaired; it is unable to grow anymore.
  • +
  • Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.
  • +
  • Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown.
  • +
+If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.
+
Fragmentation
Unlike an STL vector, a concurrent_vector does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be optimized by method compact() that merges several smaller arrays into one solid.
+
Changes since TBB 2.1
    +
  • Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated.
  • +
  • Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector
  • +
  • Added resize() methods (not thread-safe)
  • +
  • Added cbegin/cend/crbegin/crend methods
  • +
  • Changed return type of methods grow* and push_back to iterator
  • +
+
+
Changes since TBB 2.0
    +
  • Implemented exception-safety guarantees
  • +
  • Added template argument for allocator
  • +
  • Added allocator argument in constructors
  • +
  • Faster index calculation
  • +
  • First growth call specifies a number of segments to be merged in the first allocation.
  • +
  • Fixed memory blow up for swarm of vector's instances of small size
  • +
  • Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items.
  • +
  • Added STL-like constructors.
  • +
  • Added operators ==, < and derivatives
  • +
  • Added at() method, approved for using after an exception was thrown inside the vector
  • +
  • Added get_allocator() method.
  • +
  • Added assign() methods
  • +
  • Added compact() method to defragment first segments
  • +
  • Added swap() method
  • +
  • range() defaults on grainsize = 1 supporting auto grainsize algorithms.
  • +
+
+

Member Function Documentation

+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + +
void tbb::concurrent_vector< T, A >::clear ()
+
+inline
+
+ +

Clear container while keeping memory allocated.

+

To free up the memory, use in conjunction with method compact(). Not thread safe

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+
+template<typename... Args>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::emplace_back (Args &&... args)
+
+inline
+
+ +

Push item, create item "in place" with provided arguments.

+

Returns iterator pointing to the new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_by (size_type delta)
+
+inline
+
+ +

Grow by "delta" elements.

+

Returns iterator pointing to the first new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_by (size_type delta,
const_reference t 
)
+
+inline
+
+ +

Grow by "delta" elements using copying constructor.

+

Returns iterator pointing to the first new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+
+template<typename I >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_by (first,
last 
)
+
+inline
+
+

Returns iterator pointing to the first new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_by (std::initializer_list< T > init_list)
+
+inline
+
+

Returns iterator pointing to the first new element.

-

Combines data access, locking, and garbage collection.

-

The documentation for this class was generated from the following file:
    -
  • concurrent_hash_map.h
  • +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_to_at_least (size_type n)
+
+inline
+
+ +

Append minimal sequence of elements such that size()>=n.

+

The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. Returns iterator that points to beginning of appended sequence. If no elements were appended, returns iterator pointing to nth element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
iterator tbb::concurrent_vector< T, A >::grow_to_at_least (size_type n,
const_reference t 
)
+
+inline
+
+

Analogous to grow_to_at_least( size_type n ) with exception that the new elements are initialized by copying of t instead of default construction.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
reference tbb::concurrent_vector< T, A >::operator[] (size_type index)
+
+inline
+
+ +

Get reference to element at given index.

+

This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index < size().

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::push_back (const_reference item)
+
+inline
+
+ +

Push item.

+

Returns iterator pointing to the new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
iterator tbb::concurrent_vector< T, A >::push_back (T && item)
+
+inline
+
+ +

Push item, move-aware.

+

Returns iterator pointing to the new element.

+ +
+
+ +
+
+
+template<typename T, class A = cache_aligned_allocator<T>>
+ + + + + +
+ + + + + + + + +
void tbb::concurrent_vector< T, A >::reserve (size_type n)
+
+inline
+
+ +

Allocate enough space to grow to size n without having to allocate more memory later.

+

Like most of the methods provided for STL compatibility, this method is not thread safe. The capacity afterwards may be bigger than the requested reservation.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • concurrent_vector.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00059.png b/doc/html/a00059.png index e861a116ac2abfa8cb7650d913490b2180287e83..4ffff4fb1059c9d9a8a0874b4a005bb96fa0379a 100644 Binary files a/doc/html/a00059.png and b/doc/html/a00059.png differ diff --git a/doc/html/a00060.html b/doc/html/a00060.html index 166178d23cc8f76ebd97eb534041ffc27d001d58..167c32720eb951ee9fe5b9a2918f8c0cd54506f6 100644 --- a/doc/html/a00060.html +++ b/doc/html/a00060.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::continue_msg Class Reference +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class Reference @@ -33,28 +33,107 @@
+
-
tbb::flow::interface8::continue_msg Class Reference
+
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor Class Reference
-

An empty class used for messages that mean "I'm done". +

Combines data access, locking, and garbage collection. More...

-

#include <flow_graph.h>

+

#include <concurrent_hash_map.h>

+
+Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor:
+
+
+ + +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::accessor + +
+ + + + + +

+Public Types

+typedef const
+concurrent_hash_map::value_type 
value_type
 Type of value.
 
+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+bool empty () const
 True if result is empty.
 
+void release ()
 Set to null.
 
+const_reference operator* () const
 Return reference to associated value in hash table.
 
+const_pointer operator-> () const
 Return pointer to associated value in hash table.
 
const_accessor ()
 Create empty result.
 
~const_accessor ()
 Destroy result after releasing the underlying reference.
 
+ + + +

+Protected Member Functions

+bool is_writer ()
 
+ + + + + +

+Protected Attributes

+nodemy_node
 
+hashcode_t my_hash
 
+ + + + + +

+Friends

+class concurrent_hash_map< Key, T, HashCompare, Allocator >
 
+class accessor
 

Detailed Description

-

An empty class used for messages that mean "I'm done".

+

template<typename Key, typename T, typename HashCompare = tbb_hash_compare<Key>, typename A = tbb_allocator<std::pair<Key, T> >>
+class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::const_accessor

+ +

Combines data access, locking, and garbage collection.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00060.png b/doc/html/a00060.png new file mode 100644 index 0000000000000000000000000000000000000000..e861a116ac2abfa8cb7650d913490b2180287e83 Binary files /dev/null and b/doc/html/a00060.png differ diff --git a/doc/html/a00061.html b/doc/html/a00061.html index ecb13f47691057a8140791a21f3637387c980037..64eb0003e97498bbe58c85ab6471e99a0c44e211 100644 --- a/doc/html/a00061.html +++ b/doc/html/a00061.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::continue_node< Output > Class Template Reference +tbb::flow::interface8::continue_msg Class Reference @@ -33,137 +33,28 @@
-
-
tbb::flow::interface8::continue_node< Output > Class Template Reference
+
tbb::flow::interface8::continue_msg Class Reference
-

Implements an executable node that supports continue_msg -> Output. +

An empty class used for messages that mean "I'm done". More...

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::continue_node< Output >:
-
-
- - -tbb::flow::interface8::graph_node - -
- - - - - - - - - - - - - - -

-Public Types

-typedef continue_msg input_type
 
-typedef Output output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_type > successor_type
 
-typedef
-internal::continue_input
-< Output > 
fInput_type
 
-typedef
-internal::function_output
-< output_type > 
fOutput_type
 
- - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-template<typename Body >
 continue_node (graph &g, Body body)
 Constructor for executable node with continue_msg -> Output.
 
-template<typename Body >
 continue_node (graph &g, int number_of_predecessors, Body body)
 Constructor for executable node with continue_msg -> Output.
 
continue_node (const continue_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - - - -

-Protected Member Functions

-internal::broadcast_cache
-< output_type > & 
successors ()
 
-void reset_node (reset_flags f)
 
- - - - - - - - - - -

-Friends

-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
- - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 

Detailed Description

-

template<typename Output>
-class tbb::flow::interface8::continue_node< Output >

- -

Implements an executable node that supports continue_msg -> Output.

+

An empty class used for messages that mean "I'm done".


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00061.png b/doc/html/a00061.png deleted file mode 100644 index d8775967504b3755493a5c165a0791c2538966e7..0000000000000000000000000000000000000000 Binary files a/doc/html/a00061.png and /dev/null differ diff --git a/doc/html/a00062.html b/doc/html/a00062.html index 1b84becab3fd7ac8dccbc683d5a5835887cbe0dc..f3ec3be148f27cb3f7d18e5032b74bc5f2ea939c 100644 --- a/doc/html/a00062.html +++ b/doc/html/a00062.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::continue_receiver Class Reference +tbb::flow::interface8::continue_node< Output > Class Template Reference @@ -33,7 +33,7 @@
+List of all members
-
tbb::flow::interface8::continue_receiver Class Referenceabstract
+
tbb::flow::interface8::continue_node< Output > Class Template Reference
-

Base class for receivers of completion messages. +

Implements an executable node that supports continue_msg -> Output. More...

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::continue_receiver:
+Inheritance diagram for tbb::flow::interface8::continue_node< Output >:
- - -tbb::flow::interface8::receiver< continue_msg > + + +tbb::flow::interface8::graph_node
- - - - - - - + + + + + + + + - - + + - - - - - - - - - - - - +internal::function_output
+< output_type >  +

Public Types

-typedef continue_msg input_type
 The input type.
 
-typedef sender< continue_msgpredecessor_type
 The predecessor type for this node.
 
+
+typedef continue_msg input_type
 
+typedef Output output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_type > successor_type
 
typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
+internal::continue_input
+< Output > 
fInput_type
 
typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< continue_msg >
-typedef continue_msg input_type
 The input type of this receiver.
 
-typedef sender< continue_msgpredecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
fOutput_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

continue_receiver (int number_of_predecessors=0)
 Constructor.
 
continue_receiver (const continue_receiver &src)
 Copy constructor.
 
-virtual ~continue_receiver ()
 Destructor.
 
-bool register_predecessor (predecessor_type &)
 Increments the trigger threshold.
 
bool remove_predecessor (predecessor_type &)
 Decrements the trigger threshold. More...
 
-built_predecessors_typebuilt_predecessors ()
 
-void internal_add_built_predecessor (predecessor_type &s)
 
-void internal_delete_built_predecessor (predecessor_type &s)
 
-void copy_predecessors (predecessor_list_type &v)
 
-size_t predecessor_count ()
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< continue_msg >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const continue_msg &t)
 Put an item to the receiver.
 
+template<typename Body >
 continue_node (graph &g, Body body)
 Constructor for executable node with continue_msg -> Output.
 
+template<typename Body >
 continue_node (graph &g, int number_of_predecessors, Body body)
 Constructor for executable node with continue_msg -> Output.
 
continue_node (const continue_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - - - - - - - -

Protected Member Functions

-task * try_put_task (const input_type &)
 
-void reset_receiver (reset_flags f)
 
virtual task * execute ()=0
 Does whatever should happen when the threshold is reached. More...
 
-bool is_continue_receiver ()
 
- - - - - - - - - - - + + + +

-Protected Attributes

-built_predecessors_type my_built_predecessors
 
-spin_mutex my_mutex
 
-int my_predecessor_count
 
-int my_current_count
 
-int my_initial_predecessor_count
 
+internal::broadcast_cache
+< output_type > & 
successors ()
 
+void reset_node (reset_flags f)
 
@@ -194,81 +138,32 @@ template<typename X , typename Y > template<typename X , typename Y > - - - - - - +

Friends

class internal::round_robin_cache
 
-template<typename U >
class limiter_node
 
-template<typename TT , typename M >
class internal::successor_cache
 
+ + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

Detailed Description

-

Base class for receivers of completion messages.

-

These receivers automatically reset, but cannot be explicitly waited on

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
virtual task* tbb::flow::interface8::continue_receiver::execute ()
-
-protectedpure virtual
-
- -

Does whatever should happen when the threshold is reached.

-

This should be very fast or else spawn a task. This is called while the sender is blocked in the try_put().

- -
-
- -
-
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::continue_receiver::remove_predecessor (predecessor_type)
-
-inlinevirtual
-
- -

Decrements the trigger threshold.

-

Does not check to see if the removal of the predecessor now makes the current count exceed the new threshold. So removing a predecessor while the graph is active can cause unexpected results.

+

template<typename Output>
+class tbb::flow::interface8::continue_node< Output >

-

Reimplemented from tbb::flow::interface8::receiver< continue_msg >.

- -
-
-
The documentation for this class was generated from the following file:

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00062.png b/doc/html/a00062.png index 1fbcea13e9a28cf84f895908c4504c1bf67176c4..d8775967504b3755493a5c165a0791c2538966e7 100644 Binary files a/doc/html/a00062.png and b/doc/html/a00062.png differ diff --git a/doc/html/a00063.html b/doc/html/a00063.html index 8a27c3a84d0aed83a8d3a3131fa238977e89a68b..01c1954df9e819e32ba4bd52ca911936ad5e1227 100644 --- a/doc/html/a00063.html +++ b/doc/html/a00063.html @@ -4,7 +4,7 @@ -tbb::internal::critical_section_v4 Class Reference +tbb::flow::interface8::continue_receiver Class Reference @@ -33,67 +33,242 @@
-
tbb::internal::critical_section_v4 Class Reference
+
tbb::flow::interface8::continue_receiver Class Referenceabstract
+ +

Base class for receivers of completion messages. + More...

+ +

#include <flow_graph.h>

-Inheritance diagram for tbb::internal::critical_section_v4:
+Inheritance diagram for tbb::flow::interface8::continue_receiver:
- - + + +tbb::flow::interface8::receiver< continue_msg >
- - - + + + + + + + + + + + + + + + + + + + + + +

-Classes

class  scoped_lock
 

+Public Types

+typedef continue_msg input_type
 The input type.
 
+typedef sender< continue_msgpredecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< continue_msg >
+typedef continue_msg input_type
 The input type of this receiver.
 
+typedef sender< continue_msgpredecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-void __TBB_EXPORTED_METHOD internal_construct ()
 
-void lock ()
 
-bool try_lock ()
 
-void unlock ()
 
continue_receiver (int number_of_predecessors=0)
 Constructor.
 
continue_receiver (const continue_receiver &src)
 Copy constructor.
 
+virtual ~continue_receiver ()
 Destructor.
 
+bool register_predecessor (predecessor_type &)
 Increments the trigger threshold.
 
bool remove_predecessor (predecessor_type &)
 Decrements the trigger threshold. More...
 
+built_predecessors_typebuilt_predecessors ()
 
+void internal_add_built_predecessor (predecessor_type &s)
 
+void internal_delete_built_predecessor (predecessor_type &s)
 
+void copy_predecessors (predecessor_list_type &v)
 
+size_t predecessor_count ()
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< continue_msg >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const continue_msg &t)
 Put an item to the receiver.
 
- - - - - - - + + + + + + + + + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = true
 

+Protected Member Functions

+task * try_put_task (const input_type &)
 
+void reset_receiver (reset_flags f)
 
virtual task * execute ()=0
 Does whatever should happen when the threshold is reached. More...
 
+bool is_continue_receiver ()
 
+ + + + + + + + + + + +

+Protected Attributes

+built_predecessors_type my_built_predecessors
 
+spin_mutex my_mutex
 
+int my_predecessor_count
 
+int my_current_count
 
+int my_initial_predecessor_count
 
+ + + + + + + + + + + + + + + + +

+Friends

+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+template<typename U >
class limiter_node
 
+template<typename TT , typename M >
class internal::successor_cache
 
+

Detailed Description

+

Base class for receivers of completion messages.

+

These receivers automatically reset, but cannot be explicitly waited on

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual task* tbb::flow::interface8::continue_receiver::execute ()
+
+protectedpure virtual
+
+ +

Does whatever should happen when the threshold is reached.

+

This should be very fast or else spawn a task. This is called while the sender is blocked in the try_put().

+ +
+
+ +
+
+ + + + +
+ + + + + + + + +
bool tbb::flow::interface8::continue_receiver::remove_predecessor (predecessor_type)
+
+inlinevirtual
+
+ +

Decrements the trigger threshold.

+

Does not check to see if the removal of the predecessor now makes the current count exceed the new threshold. So removing a predecessor while the graph is active can cause unexpected results.

+ +

Reimplemented from tbb::flow::interface8::receiver< continue_msg >.

+ +
+

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00063.png b/doc/html/a00063.png index 835e586da28f510461f35f10ee6b875f87115368..1fbcea13e9a28cf84f895908c4504c1bf67176c4 100644 Binary files a/doc/html/a00063.png and b/doc/html/a00063.png differ diff --git a/doc/html/a00064.html b/doc/html/a00064.html index 38f0907dcb15e7eebe6fa2e5ce74292d651680d5..1e82c01fc1ba5f660212665d4bd3980374ad0f47 100644 --- a/doc/html/a00064.html +++ b/doc/html/a00064.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::default_opencl_factory Class Reference +tbb::internal::critical_section_v4 Class Reference @@ -33,47 +33,67 @@
-
tbb::flow::interface8::default_opencl_factory Class Reference
+
tbb::internal::critical_section_v4 Class Reference
-Inheritance diagram for tbb::flow::interface8::default_opencl_factory:
+Inheritance diagram for tbb::internal::critical_section_v4:
- - -tbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter > + +
+ + + +

+Classes

class  scoped_lock
 
- - - - - - - + + + + + + + + +

Public Member Functions

default_opencl_factory (opencl_graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter >
opencl_factory (opencl_graph &g)
 
-bool init (const opencl_device_list &device_list)
 
+void __TBB_EXPORTED_METHOD internal_construct ()
 
+void lock ()
 
+bool try_lock ()
 
+void unlock ()
 
+ + + + + + +

+Static Public Attributes

+static const bool is_rw_mutex = false
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = true
 

The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +
  • critical_section.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00064.png b/doc/html/a00064.png index e66950efeb2243f5a83b7fd24c0d7687bfa1bf55..835e586da28f510461f35f10ee6b875f87115368 100644 Binary files a/doc/html/a00064.png and b/doc/html/a00064.png differ diff --git a/doc/html/a00065.html b/doc/html/a00065.html index abacd66d20006076806fcbdf75df11ce82576538..662b2c4eaf4cfcf140cff68f08bf3699e3d0847b 100644 --- a/doc/html/a00065.html +++ b/doc/html/a00065.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::default_opencl_factory_device_filter Struct Reference +tbb::flow::interface8::default_opencl_factory Class Reference @@ -33,31 +33,47 @@
-
tbb::flow::interface8::default_opencl_factory_device_filter Struct Reference
+
tbb::flow::interface8::default_opencl_factory Class Reference
+
+Inheritance diagram for tbb::flow::interface8::default_opencl_factory:
+
+
+ + +tbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter > + +
- - + + + + + + +

Public Member Functions

-opencl_device_list operator() (const opencl_device_list &devices)
 
default_opencl_factory (opencl_graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter >
opencl_factory (opencl_graph &g)
 
+bool init (const opencl_device_list &device_list)
 
-
The documentation for this struct was generated from the following file:
    +
    The documentation for this class was generated from the following file:
    • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00065.png b/doc/html/a00065.png new file mode 100644 index 0000000000000000000000000000000000000000..e66950efeb2243f5a83b7fd24c0d7687bfa1bf55 Binary files /dev/null and b/doc/html/a00065.png differ diff --git a/doc/html/a00066.html b/doc/html/a00066.html index 8b1289e00202663e1408de20405bbe1df6f7a660..2cb15552f87033b62e0c3e32a8ea1bcb724db418 100644 --- a/doc/html/a00066.html +++ b/doc/html/a00066.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::dependency_msg< T, Factory > Class Template Reference +tbb::flow::interface8::default_opencl_factory_device_filter Struct Reference @@ -33,81 +33,31 @@
-
tbb::flow::interface8::dependency_msg< T, Factory > Class Template Reference
+
tbb::flow::interface8::default_opencl_factory_device_filter Struct Reference
- - - -

-Public Types

-typedef T value_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Public Member Functions

dependency_msg (const T &data)
 
dependency_msg (opencl_graph &g, const T &data)
 
dependency_msg (const T &data, cl_event event)
 
-T & data (bool wait=true)
 
-const T & data (bool wait=true) const
 
dependency_msg (const dependency_msg &dmsg)
 
dependency_msg (dependency_msg &&dmsg)
 
-dependency_msgoperator= (const dependency_msg &dmsg)
 
-cl_event const * get_event () const
 
-void set_event (cl_event e) const
 
-void set_graph (graph &g)
 
-void clear_event () const
 
-template<typename Callback >
void register_callback (Callback c) const
 
operator T & ()
 
operator const T & () const
 
+opencl_device_list operator() (const opencl_device_list &devices)
 
-
The documentation for this class was generated from the following file:
    +
    The documentation for this struct was generated from the following file:
    • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00067.html b/doc/html/a00067.html index 0820202fbdf081f9506de20105525bb5965e045c..652ab2f0c92a409b9d14d954daadca1a9a0a1238 100644 --- a/doc/html/a00067.html +++ b/doc/html/a00067.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::internal::edge_container< C > Class Template Reference +tbb::flow::interface8::dependency_msg< T, Factory > Class Template Reference @@ -33,59 +33,81 @@
-
tbb::flow::interface8::internal::edge_container< C > Class Template Reference
+
tbb::flow::interface8::dependency_msg< T, Factory > Class Template Reference
- - + +

Public Types

-typedef std::list< C
-*, tbb::tbb_allocator< C * > > 
edge_list_type
 
+typedef T value_type
 
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-void add_edge (C &s)
 
-void delete_edge (C &s)
 
-void copy_edges (edge_list_type &v)
 
-size_t edge_count ()
 
-void clear ()
 
-template<typename S >
void sender_extract (S &s)
 
-template<typename R >
void receiver_extract (R &r)
 
dependency_msg (const T &data)
 
dependency_msg (opencl_graph &g, const T &data)
 
dependency_msg (const T &data, cl_event event)
 
+T & data (bool wait=true)
 
+const T & data (bool wait=true) const
 
dependency_msg (const dependency_msg &dmsg)
 
dependency_msg (dependency_msg &&dmsg)
 
+dependency_msgoperator= (const dependency_msg &dmsg)
 
+cl_event const * get_event () const
 
+void set_event (cl_event e) const
 
+void set_graph (graph &g)
 
+void clear_event () const
 
+template<typename Callback >
void register_callback (Callback c) const
 
operator T & ()
 
operator const T & () const
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00068.html b/doc/html/a00068.html index bd23f2b05c6b8ce5324eb45e2f2b60b692464c7a..0a3c86f51932e013a0e3756381c70392159a58a4 100644 --- a/doc/html/a00068.html +++ b/doc/html/a00068.html @@ -4,7 +4,7 @@ -tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard Struct Reference +tbb::flow::interface8::internal::edge_container< C > Class Template Reference @@ -33,49 +33,59 @@
-
tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard Struct Reference
+
tbb::flow::interface8::internal::edge_container< C > Class Template Reference
-
-Inheritance diagram for tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard:
-
-
- - - -
+ + + +

+Public Types

+typedef std::list< C
+*, tbb::tbb_allocator< C * > > 
edge_list_type
 
- - - - -

Public Member Functions

element_construction_guard (pointer an_element)
 
-void dismiss ()
 
- - - + + + + + + + + + + + + + + + +

-Public Attributes

-pointer element
 
+void add_edge (C &s)
 
+void delete_edge (C &s)
 
+void copy_edges (edge_list_type &v)
 
+size_t edge_count ()
 
+void clear ()
 
+template<typename S >
void sender_extract (S &s)
 
+template<typename R >
void receiver_extract (R &r)
 
-
The documentation for this struct was generated from the following file:
    -
  • concurrent_vector.h
  • +
    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00068.png b/doc/html/a00068.png deleted file mode 100644 index 0b05314963f9bf5563543dda942f32e1d95f8dc4..0000000000000000000000000000000000000000 Binary files a/doc/html/a00068.png and /dev/null differ diff --git a/doc/html/a00069.html b/doc/html/a00069.html index 5310f7542e4b46273359a179468960935f96d7fb..73fb0a122d9db7c688508bd78a06d4f102159348 100644 --- a/doc/html/a00069.html +++ b/doc/html/a00069.html @@ -4,7 +4,7 @@ -tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type > Class Template Reference +tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard Struct Reference @@ -33,226 +33,49 @@
-
tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type > Class Template Reference
+
tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard Struct Reference
- -

The enumerable_thread_specific container. - More...

- -

#include <enumerable_thread_specific.h>

-Inheritance diagram for tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >:
+Inheritance diagram for tbb::concurrent_vector< T, A >::push_back_helper::element_construction_guard:
- - + +
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef Allocator allocator_type
 Basic types.
 
-typedef T value_type
 
-typedef T & reference
 
-typedef const T & const_reference
 
-typedef T * pointer
 
-typedef const T * const_pointer
 
-typedef
-internal_collection_type::size_type 
size_type
 
-typedef
-internal_collection_type::difference_type 
difference_type
 
-typedef
-internal::enumerable_thread_specific_iterator
-< internal_collection_type,
-value_type > 
iterator
 
-typedef
-internal::enumerable_thread_specific_iterator
-< internal_collection_type,
-const value_type > 
const_iterator
 
-typedef generic_range_type
-< iterator > 
range_type
 
-typedef generic_range_type
-< const_iterator > 
const_range_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +

Public Member Functions

enumerable_thread_specific ()
 Default constructor. Each local instance of T is default constructed.
 
-template<typename Finit#if __TBB_ETS_USE_CPP11, typename = typename internal::enable_if<internal::is_callable_no_args<typename internal::strip<Finit>::type>::value>::type #endif>
 enumerable_thread_specific (Finit finit)
 Constructor with initializer functor. Each local instance of T is constructed by T(finit()).
 
enumerable_thread_specific (const T &exemplar)
 Constructor with exemplar. Each local instance of T is copy-constructed from the exemplar.
 
enumerable_thread_specific (T &&exemplar)
 
-template<typename P1 , typename... P, typename = typename internal::enable_if<!internal::is_callable_no_args<typename internal::strip<P1>::type>::value && !internal::is_compatible_ets<T, typename internal::strip<P1>::type>::value && !internal::is_same_type<T, typename internal::strip<P1>::type>::value >::type>
 enumerable_thread_specific (P1 &&arg1, P &&...args)
 Variadic constructor with initializer arguments. Each local instance of T is constructed by T(args...)
 
~enumerable_thread_specific ()
 Destructor.
 
-reference local ()
 returns reference to local, discarding exists
 
-reference local (bool &exists)
 Returns reference to calling thread's local copy, creating one if necessary.
 
-size_type size () const
 Get the number of local copies.
 
-bool empty () const
 true if there have been no local copies created
 
-iterator begin ()
 begin iterator
 
-iterator end ()
 end iterator
 
-const_iterator begin () const
 begin const iterator
 
-const_iterator end () const
 end const iterator
 
-range_type range (size_t grainsize=1)
 Get range for parallel algorithms.
 
-const_range_type range (size_t grainsize=1) const
 Get const range for parallel algorithms.
 
-void clear ()
 Destroys local copies.
 
enumerable_thread_specific (const enumerable_thread_specific &other)
 
-template<typename Alloc , ets_key_usage_type Cachetype>
 enumerable_thread_specific (const enumerable_thread_specific< T, Alloc, Cachetype > &other)
 
enumerable_thread_specific (enumerable_thread_specific &&other)
 
-template<typename Alloc , ets_key_usage_type Cachetype>
 enumerable_thread_specific (enumerable_thread_specific< T, Alloc, Cachetype > &&other)
 
-enumerable_thread_specificoperator= (const enumerable_thread_specific &other)
 
-template<typename Alloc , ets_key_usage_type Cachetype>
enumerable_thread_specificoperator= (const enumerable_thread_specific< T, Alloc, Cachetype > &other)
 
-enumerable_thread_specificoperator= (enumerable_thread_specific &&other)
 
-template<typename Alloc , ets_key_usage_type Cachetype>
enumerable_thread_specificoperator= (enumerable_thread_specific< T, Alloc, Cachetype > &&other)
 
-template<typename combine_func_t >
combine (combine_func_t f_combine)
 
-template<typename combine_func_t >
void combine_each (combine_func_t f_combine)
 
element_construction_guard (pointer an_element)
 
+void dismiss ()
 
- - - - + + +

-Friends

-template<typename U , typename A , ets_key_usage_type C>
class enumerable_thread_specific
 

+Public Attributes

+pointer element
 
-

Detailed Description

-

template<typename T, typename Allocator, ets_key_usage_type ETS_key_type>
-class tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >

- -

The enumerable_thread_specific container.

-
enumerable_thread_specific has the following properties:
-- thread-local copies are lazily created, with default, exemplar or function initialization.
-- thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant.
-- the contained objects need not have operator=() defined if combine is not used.
-- enumerable_thread_specific containers may be copy-constructed or assigned.
-- thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed.
-- outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods
-
Segmented iterator
When the thread-local objects are containers with input_iterators defined, a segmented iterator may be used to iterate over all the elements of all thread-local copies.
-
combine and combine_each
    -
  • Both methods are defined for enumerable_thread_specific.
  • -
  • combine() requires the type T have operator=() defined.
  • -
  • neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.)
  • -
  • Both are evaluated in serial context (the methods are assumed to be non-benign.)
  • -
-
-

The documentation for this class was generated from the following file:
    -
  • enumerable_thread_specific.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • concurrent_vector.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00069.png b/doc/html/a00069.png index fba36b8c91269acd17d4473428f5d5e566a1b3e6..0b05314963f9bf5563543dda942f32e1d95f8dc4 100644 Binary files a/doc/html/a00069.png and b/doc/html/a00069.png differ diff --git a/doc/html/a00070.html b/doc/html/a00070.html index 57c532d0ff6800e52611db9c4fee1c530bfb61b1..587af4273cfca3004859145dcf14a0508d06aa1e 100644 --- a/doc/html/a00070.html +++ b/doc/html/a00070.html @@ -4,7 +4,7 @@ -tbb::filter Class Reference +tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type > Class Template Reference @@ -33,111 +33,226 @@
-
tbb::filter Class Reference
+
tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type > Class Template Reference
-

A stage in a pipeline. +

The enumerable_thread_specific container. More...

-

#include <pipeline.h>

+

#include <enumerable_thread_specific.h>

-Inheritance diagram for tbb::filter:
+Inheritance diagram for tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >:
- - -tbb::thread_bound_filter + +
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Static Protected Attributes

-static const unsigned char filter_is_serial = 0x1
 The lowest bit 0 is for parallel vs. serial.
 
static const unsigned char filter_is_out_of_order = 0x1<<4
 4th bit distinguishes ordered vs unordered filters. More...
 
-static const unsigned char filter_is_bound = 0x1<<5
 5th bit distinguishes thread-bound and regular filters.
 
-static const unsigned char filter_may_emit_null = 0x1<<6
 6th bit marks input filters emitting small objects
 
static const unsigned char exact_exception_propagation
 7th bit defines exception propagation mode expected by the application. More...
 

+Public Types

+typedef Allocator allocator_type
 Basic types.
 
+typedef T value_type
 
+typedef T & reference
 
+typedef const T & const_reference
 
+typedef T * pointer
 
+typedef const T * const_pointer
 
+typedef
+internal_collection_type::size_type 
size_type
 
+typedef
+internal_collection_type::difference_type 
difference_type
 
+typedef
+internal::enumerable_thread_specific_iterator
+< internal_collection_type,
+value_type > 
iterator
 
+typedef
+internal::enumerable_thread_specific_iterator
+< internal_collection_type,
+const value_type > 
const_iterator
 
+typedef generic_range_type
+< iterator > 
range_type
 
+typedef generic_range_type
+< const_iterator > 
const_range_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

enumerable_thread_specific ()
 Default constructor. Each local instance of T is default constructed.
 
+template<typename Finit#if __TBB_ETS_USE_CPP11, typename = typename internal::enable_if<internal::is_callable_no_args<typename internal::strip<Finit>::type>::value>::type #endif>
 enumerable_thread_specific (Finit finit)
 Constructor with initializer functor. Each local instance of T is constructed by T(finit()).
 
enumerable_thread_specific (const T &exemplar)
 Constructor with exemplar. Each local instance of T is copy-constructed from the exemplar.
 
enumerable_thread_specific (T &&exemplar)
 
+template<typename P1 , typename... P, typename = typename internal::enable_if<!internal::is_callable_no_args<typename internal::strip<P1>::type>::value && !internal::is_compatible_ets<T, typename internal::strip<P1>::type>::value && !internal::is_same_type<T, typename internal::strip<P1>::type>::value >::type>
 enumerable_thread_specific (P1 &&arg1, P &&...args)
 Variadic constructor with initializer arguments. Each local instance of T is constructed by T(args...)
 
~enumerable_thread_specific ()
 Destructor.
 
+reference local ()
 returns reference to local, discarding exists
 
+reference local (bool &exists)
 Returns reference to calling thread's local copy, creating one if necessary.
 
+size_type size () const
 Get the number of local copies.
 
+bool empty () const
 true if there have been no local copies created
 
+iterator begin ()
 begin iterator
 
+iterator end ()
 end iterator
 
+const_iterator begin () const
 begin const iterator
 
+const_iterator end () const
 end const iterator
 
+range_type range (size_t grainsize=1)
 Get range for parallel algorithms.
 
+const_range_type range (size_t grainsize=1) const
 Get const range for parallel algorithms.
 
+void clear ()
 Destroys local copies.
 
enumerable_thread_specific (const enumerable_thread_specific &other)
 
+template<typename Alloc , ets_key_usage_type Cachetype>
 enumerable_thread_specific (const enumerable_thread_specific< T, Alloc, Cachetype > &other)
 
enumerable_thread_specific (enumerable_thread_specific &&other)
 
+template<typename Alloc , ets_key_usage_type Cachetype>
 enumerable_thread_specific (enumerable_thread_specific< T, Alloc, Cachetype > &&other)
 
+enumerable_thread_specificoperator= (const enumerable_thread_specific &other)
 
+template<typename Alloc , ets_key_usage_type Cachetype>
enumerable_thread_specificoperator= (const enumerable_thread_specific< T, Alloc, Cachetype > &other)
 
+enumerable_thread_specificoperator= (enumerable_thread_specific &&other)
 
+template<typename Alloc , ets_key_usage_type Cachetype>
enumerable_thread_specificoperator= (enumerable_thread_specific< T, Alloc, Cachetype > &&other)
 
+template<typename combine_func_t >
combine (combine_func_t f_combine)
 
+template<typename combine_func_t >
void combine_each (combine_func_t f_combine)
 
+ + + +

+Friends

+template<typename U , typename A , ets_key_usage_type C>
class enumerable_thread_specific
 

Detailed Description

-

A stage in a pipeline.

-

Member Data Documentation

- -
-
- - - - - -
- - - - -
const unsigned char tbb::filter::exact_exception_propagation
-
-staticprotected
-
-Initial value:
=
-
#if TBB_USE_CAPTURED_EXCEPTION
-
0x0
-
-

7th bit defines exception propagation mode expected by the application.

- -
-
- -
-
- - - - - -
- - - - -
const unsigned char tbb::filter::filter_is_out_of_order = 0x1<<4
-
-staticprotected
-
+

template<typename T, typename Allocator, ets_key_usage_type ETS_key_type>
+class tbb::interface6::enumerable_thread_specific< T, Allocator, ETS_key_type >

-

4th bit distinguishes ordered vs unordered filters.

-

The bit was not set for parallel filters in TBB 2.1 and earlier, but is_ordered() function always treats parallel filters as out of order.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • pipeline.h
  • +

    The enumerable_thread_specific container.

    +
    enumerable_thread_specific has the following properties:
    +- thread-local copies are lazily created, with default, exemplar or function initialization.
    +- thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant.
    +- the contained objects need not have operator=() defined if combine is not used.
    +- enumerable_thread_specific containers may be copy-constructed or assigned.
    +- thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed.
    +- outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods
    +
    Segmented iterator
    When the thread-local objects are containers with input_iterators defined, a segmented iterator may be used to iterate over all the elements of all thread-local copies.
    +
    combine and combine_each
      +
    • Both methods are defined for enumerable_thread_specific.
    • +
    • combine() requires the type T have operator=() defined.
    • +
    • neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.)
    • +
    • Both are evaluated in serial context (the methods are assumed to be non-benign.)
    • +
    +
    +

The documentation for this class was generated from the following file:
    +
  • enumerable_thread_specific.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00070.png b/doc/html/a00070.png index a4923e5f6f12f4fc6c995790a39ddc23f8d14425..fba36b8c91269acd17d4473428f5d5e566a1b3e6 100644 Binary files a/doc/html/a00070.png and b/doc/html/a00070.png differ diff --git a/doc/html/a00071.html b/doc/html/a00071.html index 509c39cd2611d4f70cc4e58907a7140c060ca8e3..80631afc5aca34774495524106ec86a743ee09ec 100644 --- a/doc/html/a00071.html +++ b/doc/html/a00071.html @@ -4,7 +4,7 @@ -tbb::interface6::filter_t< T, U > Class Template Reference +tbb::filter Class Reference @@ -33,67 +33,111 @@
-
tbb::interface6::filter_t< T, U > Class Template Reference
+
tbb::filter Class Reference
-

Class representing a chain of type-safe pipeline filters. +

A stage in a pipeline. More...

#include <pipeline.h>

+
+Inheritance diagram for tbb::filter:
+
+
+ + +tbb::thread_bound_filter + +
- - - - - - - - - - -

-Public Member Functions

filter_t (const filter_t< T, U > &rhs)
 
-template<typename Body >
 filter_t (tbb::filter::mode mode, const Body &body)
 
-void operator= (const filter_t< T, U > &rhs)
 
-void clear ()
 
- - - - - - - - - - + + + + + + + + + + + + + + + +

-Friends

-class internal::pipeline_proxy
 
-template<typename T_ , typename U_ , typename Body >
filter_t< T_, U_ > make_filter (tbb::filter::mode, const Body &)
 Create a filter to participate in parallel_pipeline.
 
-template<typename T_ , typename V_ , typename U_ >
filter_t< T_, U_ > operator& (const filter_t< T_, V_ > &, const filter_t< V_, U_ > &)
 

+Static Protected Attributes

+static const unsigned char filter_is_serial = 0x1
 The lowest bit 0 is for parallel vs. serial.
 
static const unsigned char filter_is_out_of_order = 0x1<<4
 4th bit distinguishes ordered vs unordered filters. More...
 
+static const unsigned char filter_is_bound = 0x1<<5
 5th bit distinguishes thread-bound and regular filters.
 
+static const unsigned char filter_may_emit_null = 0x1<<6
 6th bit marks input filters emitting small objects
 
static const unsigned char exact_exception_propagation
 7th bit defines exception propagation mode expected by the application. More...
 

Detailed Description

-

template<typename T, typename U>
-class tbb::interface6::filter_t< T, U >

+

A stage in a pipeline.

+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
const unsigned char tbb::filter::exact_exception_propagation
+
+staticprotected
+
+Initial value:
=
+
#if TBB_USE_CAPTURED_EXCEPTION
+
0x0
+
+

7th bit defines exception propagation mode expected by the application.

+ +
+
+ +
+
+ + + + + +
+ + + + +
const unsigned char tbb::filter::filter_is_out_of_order = 0x1<<4
+
+staticprotected
+
+ +

4th bit distinguishes ordered vs unordered filters.

+

The bit was not set for parallel filters in TBB 2.1 and earlier, but is_ordered() function always treats parallel filters as out of order.

-

Class representing a chain of type-safe pipeline filters.

-

The documentation for this class was generated from the following file:
    +
+
+
The documentation for this class was generated from the following file:
  • pipeline.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00071.png b/doc/html/a00071.png new file mode 100644 index 0000000000000000000000000000000000000000..a4923e5f6f12f4fc6c995790a39ddc23f8d14425 Binary files /dev/null and b/doc/html/a00071.png differ diff --git a/doc/html/a00072.html b/doc/html/a00072.html index eff985502d5bcc0f44ee0a8badf540ab3dcdd4e4..83a959ad595fc4db1ef0491026001e9ea75e7ad0 100644 --- a/doc/html/a00072.html +++ b/doc/html/a00072.html @@ -4,7 +4,7 @@ -tbb::final_scan_tag Struct Reference +tbb::interface6::filter_t< T, U > Class Template Reference @@ -33,38 +33,67 @@
-
tbb::final_scan_tag Struct Reference
+
tbb::interface6::filter_t< T, U > Class Template Reference
-

Used to indicate that the final scan is being performed. +

Class representing a chain of type-safe pipeline filters. More...

-

#include <parallel_scan.h>

+

#include <pipeline.h>

- - - + + + + + + + + + + +

-Static Public Member Functions

-static bool is_final_scan ()
 

+Public Member Functions

filter_t (const filter_t< T, U > &rhs)
 
+template<typename Body >
 filter_t (tbb::filter::mode mode, const Body &body)
 
+void operator= (const filter_t< T, U > &rhs)
 
+void clear ()
 
+ + + + + + + + + +

+Friends

+class internal::pipeline_proxy
 
+template<typename T_ , typename U_ , typename Body >
filter_t< T_, U_ > make_filter (tbb::filter::mode, const Body &)
 Create a filter to participate in parallel_pipeline.
 
+template<typename T_ , typename V_ , typename U_ >
filter_t< T_, U_ > operator& (const filter_t< T_, V_ > &, const filter_t< V_, U_ > &)
 

Detailed Description

-

Used to indicate that the final scan is being performed.

-

The documentation for this struct was generated from the following file:
    -
  • parallel_scan.h
  • +

    template<typename T, typename U>
    +class tbb::interface6::filter_t< T, U >

    + +

    Class representing a chain of type-safe pipeline filters.

    +

    The documentation for this class was generated from the following file:
      +
    • pipeline.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00073.html b/doc/html/a00073.html index 4fdc284b5e09618892de01f2a73e848f07064573..9a70b906442d8f23fd013d7dfefec959bb98b8fe 100644 --- a/doc/html/a00073.html +++ b/doc/html/a00073.html @@ -4,7 +4,7 @@ -tbb::interface6::fixed_pool Class Reference +tbb::final_scan_tag Struct Reference @@ -33,44 +33,38 @@
-
tbb::interface6::fixed_pool Class Reference
+
tbb::final_scan_tag Struct Reference
-
-Inheritance diagram for tbb::interface6::fixed_pool:
-
-
- - - -
+ +

Used to indicate that the final scan is being performed. + More...

+ +

#include <parallel_scan.h>

- - - - - - - + + +

-Public Member Functions

fixed_pool (void *buf, size_t size)
 construct pool with underlying allocator
 
~fixed_pool ()
 destroy pool
 

+Static Public Member Functions

+static bool is_final_scan ()
 
-
The documentation for this class was generated from the following file:
    -
  • memory_pool.h
  • +

    Detailed Description

    +

    Used to indicate that the final scan is being performed.

    +

    The documentation for this struct was generated from the following file:
      +
    • parallel_scan.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00074.html b/doc/html/a00074.html index 6dd164f063f476d95a646a4409161c396f3108c0..6fa2a14fe5c28a57026d2bd552c632711e0789c2 100644 --- a/doc/html/a00074.html +++ b/doc/html/a00074.html @@ -4,7 +4,7 @@ -tbb::interface6::flattened2d< Container > Class Template Reference +tbb::interface6::fixed_pool Class Reference @@ -33,90 +33,44 @@
-
tbb::interface6::flattened2d< Container > Class Template Reference
+
tbb::interface6::fixed_pool Class Reference
+
+Inheritance diagram for tbb::interface6::fixed_pool:
+
+
+ + + +
- - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef conval_type::size_type size_type
 Basic types.
 
-typedef
-conval_type::difference_type 
difference_type
 
-typedef conval_type::allocator_type allocator_type
 
-typedef conval_type::value_type value_type
 
-typedef conval_type::reference reference
 
-typedef
-conval_type::const_reference 
const_reference
 
-typedef conval_type::pointer pointer
 
-typedef conval_type::const_pointer const_pointer
 
-typedef
-internal::segmented_iterator
-< Container, value_type > 
iterator
 
-typedef
-internal::segmented_iterator
-< Container, const value_type > 
const_iterator
 
- - - - - - - - - - - - - - + + + + + +

Public Member Functions

flattened2d (const Container &c, typename Container::const_iterator b, typename Container::const_iterator e)
 
flattened2d (const Container &c)
 
-iterator begin ()
 
-iterator end ()
 
-const_iterator begin () const
 
-const_iterator end () const
 
-size_type size () const
 
fixed_pool (void *buf, size_t size)
 construct pool with underlying allocator
 
~fixed_pool ()
 destroy pool
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00073.png b/doc/html/a00074.png similarity index 100% rename from doc/html/a00073.png rename to doc/html/a00074.png diff --git a/doc/html/a00075.html b/doc/html/a00075.html index 229cd82d698459fe9e83288f0b50f7c2629d84ae..d081163110bfff1f308d9c7699a5a3975a2606cc 100644 --- a/doc/html/a00075.html +++ b/doc/html/a00075.html @@ -4,7 +4,7 @@ -tbb::interface6::flow_control Class Reference +tbb::interface6::flattened2d< Container > Class Template Reference @@ -33,46 +33,90 @@
-
tbb::interface6::flow_control Class Reference
+
tbb::interface6::flattened2d< Container > Class Template Reference
- -

input_filter control to signal end-of-input for parallel_pipeline - More...

- -

#include <pipeline.h>

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef conval_type::size_type size_type
 Basic types.
 
+typedef
+conval_type::difference_type 
difference_type
 
+typedef conval_type::allocator_type allocator_type
 
+typedef conval_type::value_type value_type
 
+typedef conval_type::reference reference
 
+typedef
+conval_type::const_reference 
const_reference
 
+typedef conval_type::pointer pointer
 
+typedef conval_type::const_pointer const_pointer
 
+typedef
+internal::segmented_iterator
+< Container, value_type > 
iterator
 
+typedef
+internal::segmented_iterator
+< Container, const value_type > 
const_iterator
 
- - -

Public Member Functions

-void stop ()
 
- - - - + + + + + + + + + + + + + +

-Friends

-template<typename T , typename U , typename Body >
class internal::concrete_filter
 
flattened2d (const Container &c, typename Container::const_iterator b, typename Container::const_iterator e)
 
flattened2d (const Container &c)
 
+iterator begin ()
 
+iterator end ()
 
+const_iterator begin () const
 
+const_iterator end () const
 
+size_type size () const
 
-

Detailed Description

-

input_filter control to signal end-of-input for parallel_pipeline

-

The documentation for this class was generated from the following file:
    -
  • pipeline.h
  • +
    The documentation for this class was generated from the following file:
      +
    • enumerable_thread_specific.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00076.html b/doc/html/a00076.html index 41a87907224892ae9ffca741514bbe79849652aa..6f474de0d73109521d31fc7ab3b4278bac9a0b99 100644 --- a/doc/html/a00076.html +++ b/doc/html/a00076.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > Class Template Reference +tbb::interface6::flow_control Class Reference @@ -33,138 +33,46 @@
-
tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > Class Template Reference
+
tbb::interface6::flow_control Class Reference
-

Implements a function node that supports Input -> Output. +

input_filter control to signal end-of-input for parallel_pipeline More...

-

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::function_node< Input, Output, Policy, Allocator >:
-
-
- - -tbb::flow::interface8::graph_node - -
+

#include <pipeline.h>

- - - - - - - - - - - - - - - -

-Public Types

-typedef Input input_type
 
-typedef Output output_type
 
-typedef sender< input_type > predecessor_type
 
-typedef receiver< output_type > successor_type
 
-typedef
-internal::function_input
-< input_type, output_type,
-Allocator > 
fInput_type
 
-typedef
-internal::function_input_queue
-< input_type, Allocator > 
input_queue_type
 
-typedef
-internal::function_output
-< output_type > 
fOutput_type
 
- - - - - - - - - - - - - - -

Public Member Functions

-template<typename Body >
 function_node (graph &g, size_t concurrency, Body body)
 Constructor.
 
function_node (const function_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - - - + +

-Protected Member Functions

-internal::broadcast_cache
-< output_type > & 
successors ()
 
-void reset_node (reset_flags f)
 
+void stop ()
 
- - - - - - - - - -

Friends

-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
- - - - - - - - + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
+template<typename T , typename U , typename Body >
class internal::concrete_filter
 

Detailed Description

-

template<typename Input, typename Output = continue_msg, typename Policy = queueing, typename Allocator = cache_aligned_allocator<Input>>
-class tbb::flow::interface8::function_node< Input, Output, Policy, Allocator >

- -

Implements a function node that supports Input -> Output.

+

input_filter control to signal end-of-input for parallel_pipeline


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00077.html b/doc/html/a00077.html index f099a2237ed61fca4b969550972b7a663fe8386d..ae3c93830326a5b9beac993ec0eb14fa3c82d51b 100644 --- a/doc/html/a00077.html +++ b/doc/html/a00077.html @@ -4,7 +4,7 @@ -tbb::interface9::global_control Class Reference +tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > Class Template Reference @@ -33,47 +33,146 @@
-
tbb::interface9::global_control Class Reference
+
tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > Class Template Reference
+ +

Implements a function node that supports Input -> Output. + More...

+ +

#include <flow_graph.h>

+
+Inheritance diagram for tbb::flow::interface8::function_node< Input, Output, Policy, Allocator >:
+
+
+ + +tbb::flow::interface8::graph_node + +
- - + + + + + + + + + + + + + + + + + +

Public Types

enum  parameter { max_allowed_parallelism, -thread_stack_size, -parameter_max - }
 
+typedef Input input_type
 
+typedef Output output_type
 
+typedef sender< input_type > predecessor_type
 
+typedef receiver< output_type > successor_type
 
+typedef
+internal::function_input
+< input_type, output_type,
+Allocator > 
fInput_type
 
+typedef
+internal::function_input_queue
+< input_type, Allocator > 
input_queue_type
 
+typedef
+internal::function_output
+< output_type > 
fOutput_type
 
+typedef
+fInput_type::predecessor_list_type 
predecessor_list_type
 
+typedef
+fOutput_type::successor_list_type 
successor_list_type
 
- - + + + + + + + + + + + + + +

Public Member Functions

global_control (parameter p, size_t value)
 
+template<typename Body >
 function_node (graph &g, size_t concurrency, Body body)
 Constructor.
 
function_node (const function_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - + + + + + +

-Static Public Member Functions

-static size_t active_value (parameter p)
 

+Protected Member Functions

+internal::broadcast_cache
+< output_type > & 
successors ()
 
+void reset_node (reset_flags f)
 
+ + + + + + + + + + +

+Friends

+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+ + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 
-
The documentation for this class was generated from the following file:
    -
  • global_control.h
  • +

    Detailed Description

    +

    template<typename Input, typename Output = continue_msg, typename Policy = queueing, typename Allocator = cache_aligned_allocator<Input>>
    +class tbb::flow::interface8::function_node< Input, Output, Policy, Allocator >

    + +

    Implements a function node that supports Input -> Output.

    +

    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00076.png b/doc/html/a00077.png similarity index 100% rename from doc/html/a00076.png rename to doc/html/a00077.png diff --git a/doc/html/a00078.html b/doc/html/a00078.html index aea909df6a87ec748fda7a9de6b8cb7a5a0d2bdc..038f29abaa6022e8292691141e6b934c3a65b02b 100644 --- a/doc/html/a00078.html +++ b/doc/html/a00078.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::graph Class Reference +tbb::interface9::global_control Class Reference @@ -33,325 +33,47 @@
-
tbb::flow::interface8::graph Class Reference
+
tbb::interface9::global_control Class Reference
- -

The graph class. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::graph:
-
-
- - -tbb::flow::interface8::opencl_graph - -
- - - - + +

Public Types

-typedef graph_iterator< graph,
-graph_node
iterator
 
-typedef graph_iterator< const
-graph, const graph_node
const_iterator
 
enum  parameter { max_allowed_parallelism, +thread_stack_size, +parameter_max + }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +

Public Member Functions

graph ()
 Constructs a graph with isolated task_group_context.
 
graph (task_group_context &use_this_context)
 Constructs a graph with use_this_context as context.
 
 ~graph ()
 Destroys the graph. More...
 
-void set_name (const char *name)
 
void increment_wait_count ()
 Used to register that an external entity may still interact with the graph. More...
 
void decrement_wait_count ()
 Deregisters an external entity that may have interacted with the graph. More...
 
template<typename Receiver , typename Body >
void run (Receiver &r, Body body)
 Spawns a task that runs a body and puts its output to a specific receiver. More...
 
template<typename Body >
void run (Body body)
 Spawns a task that runs a function object. More...
 
void wait_for_all ()
 Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. More...
 
-task * root_task ()
 Returns the root task of the graph.
 
-void set_active (bool a=true)
 
-bool is_active ()
 
-void add_task_to_reset_list (task *tp)
 
-iterator begin ()
 start iterator
 
-iterator end ()
 end iterator
 
-const_iterator begin () const
 start const iterator
 
-const_iterator end () const
 end const iterator
 
-const_iterator cbegin () const
 start const iterator
 
-const_iterator cend () const
 end const iterator
 
-bool is_cancelled ()
 return status of graph execution
 
-bool exception_thrown ()
 
-void reset (reset_flags f=rf_reset_protocol)
 
global_control (parameter p, size_t value)
 
- - - - - - - - - + + +

-Friends

-class graph_node
 
-template<typename C , typename N >
class graph_iterator
 
-template<typename Input , typename Output , typename Policy , typename Allocator >
class async_node
 

+Static Public Member Functions

+static size_t active_value (parameter p)
 
-

Detailed Description

-

The graph class.

-

This class serves as a handle to the graph

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - -
tbb::flow::interface8::graph::~graph ()
-
-inline
-
- -

Destroys the graph.

-

Calls wait_for_all, then destroys the root task and context.

- -
-
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
void tbb::flow::interface8::graph::decrement_wait_count ()
-
-inline
-
- -

Deregisters an external entity that may have interacted with the graph.

-

The graph will not return from wait_for_all until all the number of decrement_wait_count calls matches the number of increment_wait_count calls.

- -
-
- -
-
- - - - - -
- - - - - - - -
void tbb::flow::interface8::graph::increment_wait_count ()
-
-inline
-
- -

Used to register that an external entity may still interact with the graph.

-

The graph will not return from wait_for_all until a matching number of decrement_wait_count calls is made.

- -
-
- -
-
-
-template<typename Receiver , typename Body >
- - - - - -
- - - - - - - - - - - - - - - - - - -
void tbb::flow::interface8::graph::run (Receiver & r,
Body body 
)
-
-inline
-
- -

Spawns a task that runs a body and puts its output to a specific receiver.

-

The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.

- -
-
- -
-
-
-template<typename Body >
- - - - - -
- - - - - - - - -
void tbb::flow::interface8::graph::run (Body body)
-
-inline
-
- -

Spawns a task that runs a function object.

-

The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.

- -
-
- -
-
- - - - - -
- - - - - - - -
void tbb::flow::interface8::graph::wait_for_all ()
-
-inline
-
- -

Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.

-

The waiting thread will go off and steal work while it is block in the wait_for_all.

- -
-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00079.html b/doc/html/a00079.html index f835f746e9c7b9939d5f2567fc26cbec4aab4456..ab4d98aecda21926f4e7382bcc55bfc766b733c1 100644 --- a/doc/html/a00079.html +++ b/doc/html/a00079.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType > Class Template Reference +tbb::flow::interface8::graph Class Reference @@ -33,96 +33,325 @@
-
tbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType > Class Template Reference
+
tbb::flow::interface8::graph Class Reference
+ +

The graph class. + More...

+ +

#include <flow_graph.h>

+
+Inheritance diagram for tbb::flow::interface8::graph:
+
+
+ + +tbb::flow::interface8::opencl_graph + +
- - - - - - - - - - - - + + + +

Public Types

-typedef size_t size_type
 
-typedef GraphNodeType value_type
 
-typedef GraphNodeType * pointer
 
-typedef GraphNodeType & reference
 
-typedef const GraphNodeType & const_reference
 
-typedef std::forward_iterator_tag iterator_category
 
+typedef graph_iterator< graph,
+graph_node
iterator
 
+typedef graph_iterator< const
+graph, const graph_node
const_iterator
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

graph_iterator ()
 Default constructor.
 
graph_iterator (const graph_iterator &other)
 Copy constructor.
 
-graph_iteratoroperator= (const graph_iterator &other)
 Assignment.
 
-reference operator* () const
 Dereference.
 
-pointer operator-> () const
 Dereference.
 
-bool operator== (const graph_iterator &other) const
 Equality.
 
-bool operator!= (const graph_iterator &other) const
 Inequality.
 
-graph_iteratoroperator++ ()
 Pre-increment.
 
-graph_iterator operator++ (int)
 Post-increment.
 
graph ()
 Constructs a graph with isolated task_group_context.
 
graph (task_group_context &use_this_context)
 Constructs a graph with use_this_context as context.
 
 ~graph ()
 Destroys the graph. More...
 
+void set_name (const char *name)
 
void increment_wait_count ()
 Used to register that an external entity may still interact with the graph. More...
 
void decrement_wait_count ()
 Deregisters an external entity that may have interacted with the graph. More...
 
template<typename Receiver , typename Body >
void run (Receiver &r, Body body)
 Spawns a task that runs a body and puts its output to a specific receiver. More...
 
template<typename Body >
void run (Body body)
 Spawns a task that runs a function object. More...
 
void wait_for_all ()
 Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. More...
 
+task * root_task ()
 Returns the root task of the graph.
 
+void set_active (bool a=true)
 
+bool is_active ()
 
+void add_task_to_reset_list (task *tp)
 
+iterator begin ()
 start iterator
 
+iterator end ()
 end iterator
 
+const_iterator begin () const
 start const iterator
 
+const_iterator end () const
 end const iterator
 
+const_iterator cbegin () const
 start const iterator
 
+const_iterator cend () const
 end const iterator
 
+bool is_cancelled ()
 return status of graph execution
 
+bool exception_thrown ()
 
+void reset (reset_flags f=rf_reset_protocol)
 
- - + + + + + +

Friends

-class graph
 
class graph_node
 
+template<typename C , typename N >
class graph_iterator
 
+template<typename Input , typename Output , typename Policy , typename Allocator >
class async_node
 
+

Detailed Description

+

The graph class.

+

This class serves as a handle to the graph

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
tbb::flow::interface8::graph::~graph ()
+
+inline
+
+ +

Destroys the graph.

+

Calls wait_for_all, then destroys the root task and context.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void tbb::flow::interface8::graph::decrement_wait_count ()
+
+inline
+
+ +

Deregisters an external entity that may have interacted with the graph.

+

The graph will not return from wait_for_all until all the number of decrement_wait_count calls matches the number of increment_wait_count calls.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void tbb::flow::interface8::graph::increment_wait_count ()
+
+inline
+
+ +

Used to register that an external entity may still interact with the graph.

+

The graph will not return from wait_for_all until a matching number of decrement_wait_count calls is made.

+ +
+
+ +
+
+
+template<typename Receiver , typename Body >
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void tbb::flow::interface8::graph::run (Receiver & r,
Body body 
)
+
+inline
+
+ +

Spawns a task that runs a body and puts its output to a specific receiver.

+

The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.

+ +
+
+ +
+
+
+template<typename Body >
+ + + + + +
+ + + + + + + + +
void tbb::flow::interface8::graph::run (Body body)
+
+inline
+
+ +

Spawns a task that runs a function object.

+

The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void tbb::flow::interface8::graph::wait_for_all ()
+
+inline
+
+ +

Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.

+

The waiting thread will go off and steal work while it is block in the wait_for_all.

+ +
+

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00078.png b/doc/html/a00079.png similarity index 100% rename from doc/html/a00078.png rename to doc/html/a00079.png diff --git a/doc/html/a00080.html b/doc/html/a00080.html index 4fd53a403771baebb4ea04a24e905da6ffc05ecb..2960e13386343a7a5ba14fec44ab80cdac98b784 100644 --- a/doc/html/a00080.html +++ b/doc/html/a00080.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::graph_node Class Reference +tbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType > Class Template Reference @@ -33,98 +33,96 @@
-
tbb::flow::interface8::graph_node Class Referenceabstract
+
tbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType > Class Template Reference
- -

The base of all graph nodes. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::graph_node:
-
-
- - -tbb::flow::interface8::multifunction_node< indexer_node_output_type, kernel_input_tuple > -tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator > -tbb::flow::interface8::multifunction_node< kernel_input_tuple, output_tuple > -tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator > -tbb::flow::interface8::broadcast_node< T > -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > -tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > -tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > -tbb::flow::interface8::continue_node< Output > -tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > -tbb::flow::interface8::limiter_node< T > -tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > -tbb::flow::interface8::overwrite_node< T > -tbb::flow::interface8::source_node< Output > - -
+ + + + + + + + + + + + + +

+Public Types

+typedef size_t size_type
 
+typedef GraphNodeType value_type
 
+typedef GraphNodeType * pointer
 
+typedef GraphNodeType & reference
 
+typedef const GraphNodeType & const_reference
 
+typedef std::forward_iterator_tag iterator_category
 
- - - - - - -

Public Member Functions

graph_node (graph &g)
 
-virtual void set_name (const char *name)=0
 
-virtual void extract ()=0
 
- - - -

-Protected Member Functions

-virtual void reset_node (reset_flags f=rf_reset_protocol)=0
 
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Protected Attributes

-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
graph_iterator ()
 Default constructor.
 
graph_iterator (const graph_iterator &other)
 Copy constructor.
 
+graph_iteratoroperator= (const graph_iterator &other)
 Assignment.
 
+reference operator* () const
 Dereference.
 
+pointer operator-> () const
 Dereference.
 
+bool operator== (const graph_iterator &other) const
 Equality.
 
+bool operator!= (const graph_iterator &other) const
 Inequality.
 
+graph_iteratoroperator++ ()
 Pre-increment.
 
+graph_iterator operator++ (int)
 Post-increment.
 
- - - + +

Friends

class graph
 
-template<typename C , typename N >
class graph_iterator
 
+class graph_node
 
-

Detailed Description

-

The base of all graph nodes.

-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00081.html b/doc/html/a00081.html index 81d303a3d3d47b4a80b72b6b2d5672265074f7a0..5f8dac20a3c7104f2425168f1298cd29f40884bc 100644 --- a/doc/html/a00081.html +++ b/doc/html/a00081.html @@ -4,7 +4,7 @@ -tbb::internal::tbb_thread_v3::id Class Reference +tbb::flow::interface8::graph_node Class Reference @@ -33,64 +33,98 @@
-
tbb::internal::tbb_thread_v3::id Class Reference
+
tbb::flow::interface8::graph_node Class Referenceabstract
+ +

The base of all graph nodes. + More...

+ +

#include <flow_graph.h>

+
+Inheritance diagram for tbb::flow::interface8::graph_node:
+
+
+ + +tbb::flow::interface8::multifunction_node< indexer_node_output_type, kernel_input_tuple > +tbb::flow::interface8::multifunction_node< Input, tuple< Output >, Policy, Allocator > +tbb::flow::interface8::multifunction_node< kernel_input_tuple, output_tuple > +tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator > +tbb::flow::interface8::broadcast_node< T > +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple< OutputTypes...> > +tbb::flow::interface8::composite_node< tbb::flow::tuple< InputTypes...>, tbb::flow::tuple<> > +tbb::flow::interface8::composite_node< tbb::flow::tuple<>, tbb::flow::tuple< OutputTypes...> > +tbb::flow::interface8::continue_node< Output > +tbb::flow::interface8::function_node< Input, Output, Policy, Allocator > +tbb::flow::interface8::limiter_node< T > +tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > +tbb::flow::interface8::overwrite_node< T > +tbb::flow::interface8::source_node< Output > + +
+ + + + + + + +

+Public Member Functions

graph_node (graph &g)
 
+virtual void set_name (const char *name)=0
 
+virtual void extract ()=0
 
+ + + +

+Protected Member Functions

+virtual void reset_node (reset_flags f=rf_reset_protocol)=0
 
+ + + + + + + +

+Protected Attributes

+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 
- - - - - - - - - - - - - - - - - - - - - - - + + + + +

Friends

-class tbb_thread_v3
 
-bool operator== (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-bool operator!= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-bool operator< (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-bool operator<= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-bool operator> (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-bool operator>= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
-template<class charT , class traits >
std::basic_ostream< charT,
-traits > & 
operator<< (std::basic_ostream< charT, traits > &out, tbb_thread_v3::id id)
 
-tbb_thread_v3::id
-__TBB_EXPORTED_FUNC 
thread_get_id_v3 ()
 
-size_t tbb_hasher (const tbb_thread_v3::id &id)
 
-id atomic_compare_and_swap (id &location, const id &value, const id &comparand)
 
+class graph
 
+template<typename C , typename N >
class graph_iterator
 
-
The documentation for this class was generated from the following file:
    -
  • tbb_thread.h
  • +

    Detailed Description

    +

    The base of all graph nodes.

    +

    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00080.png b/doc/html/a00081.png similarity index 100% rename from doc/html/a00080.png rename to doc/html/a00081.png diff --git a/doc/html/a00082.html b/doc/html/a00082.html index 44162f79e92963456e59cb513c914e6e77ab8b41..2a489d9b9588f51d9375d58b4ea80113b407d16d 100644 --- a/doc/html/a00082.html +++ b/doc/html/a00082.html @@ -4,7 +4,7 @@ -tbb::improper_lock Class Reference +tbb::internal::tbb_thread_v3::id Class Reference @@ -33,46 +33,64 @@
-
tbb::improper_lock Class Reference
+
tbb::internal::tbb_thread_v3::id Class Reference
- -

Exception for PPL locks. - More...

- -

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::improper_lock:
-
-
- - - -
- - - + + + + + + + + + + + + + + + + + + + + + + + +

-Public Member Functions

-const char * what () const throw ()
 

+Friends

+class tbb_thread_v3
 
+bool operator== (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+bool operator!= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+bool operator< (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+bool operator<= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+bool operator> (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+bool operator>= (tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true)
 
+template<class charT , class traits >
std::basic_ostream< charT,
+traits > & 
operator<< (std::basic_ostream< charT, traits > &out, tbb_thread_v3::id id)
 
+tbb_thread_v3::id
+__TBB_EXPORTED_FUNC 
thread_get_id_v3 ()
 
+size_t tbb_hasher (const tbb_thread_v3::id &id)
 
+id atomic_compare_and_swap (id &location, const id &value, const id &comparand)
 
-

Detailed Description

-

Exception for PPL locks.

-

The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +
    The documentation for this class was generated from the following file:
      +
    • tbb_thread.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00082.png b/doc/html/a00082.png deleted file mode 100644 index 7f4f5571e678cab77f93f0ecf6ecf96ba1437811..0000000000000000000000000000000000000000 Binary files a/doc/html/a00082.png and /dev/null differ diff --git a/doc/html/a00083.html b/doc/html/a00083.html index 104443dba543d014503fd5d8eb476641a7433c86..a90f072d7508a9b5c558a05b601896c4e028ab2e 100644 --- a/doc/html/a00083.html +++ b/doc/html/a00083.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > Class Template Reference +tbb::improper_lock Class Reference @@ -33,63 +33,46 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > Class Template Reference
+
tbb::improper_lock Class Reference
+ +

Exception for PPL locks. + More...

+ +

#include <tbb_exception.h>

-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >:
+Inheritance diagram for tbb::improper_lock:
- - + +
- - - - - - - -

-Public Types

-typedef tuple< T0, T1, T2, T3,
-T4, T5, T6, T7, T8, T9 > 
InputTuple
 
-typedef internal::tagged_msg
-< size_t, T0, T1, T2, T3, T4,
-T5, T6, T7, T8, T9 > 
output_type
 
-typedef
-internal::unfolded_indexer_node
-< InputTuple > 
unfolded_type
 
- - - - - - + +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
-void set_name (const char *name)
 
+const char * what () const throw ()
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +

    Detailed Description

    +

    Exception for PPL locks.

    +

    The documentation for this class was generated from the following file:
      +
    • tbb_exception.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00083.png b/doc/html/a00083.png index a2a0edf6e81c46e3918ebb5de3cd145afd263d80..7f4f5571e678cab77f93f0ecf6ecf96ba1437811 100644 Binary files a/doc/html/a00083.png and b/doc/html/a00083.png differ diff --git a/doc/html/a00084.html b/doc/html/a00084.html index e1f7b850479897c7cdcebeb6dd10f12c356440c7..b5c92e55709c4daae0118591f65ca766324674b2 100644 --- a/doc/html/a00084.html +++ b/doc/html/a00084.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > Class Template Reference @@ -33,61 +33,63 @@
-
tbb::flow::interface8::indexer_node< T0 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0 > InputTuple
 
+
+typedef tuple< T0, T1, T2, T3,
+T4, T5, T6, T7, T8, T9 > 
InputTuple
 
typedef internal::tagged_msg
-< size_t, T0 > 
output_type
 
+< size_t, T0, T1, T2, T3, T4,
+T5, T6, T7, T8, T9 > 
output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00084.png b/doc/html/a00084.png index fe6adbe59145b674fba68594acf7bc9395766384..a2a0edf6e81c46e3918ebb5de3cd145afd263d80 100644 Binary files a/doc/html/a00084.png and b/doc/html/a00084.png differ diff --git a/doc/html/a00085.html b/doc/html/a00085.html index 2129ac54c7472d10e0f2f2ccafe8001a3980c642..9853d0407651310f2205d71211d882f5e1716ab6 100644 --- a/doc/html/a00085.html +++ b/doc/html/a00085.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1 > Class Template Reference +tbb::flow::interface8::indexer_node< T0 > Class Template Reference @@ -33,61 +33,61 @@
-
tbb::flow::interface8::indexer_node< T0, T1 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0, T1 > InputTuple
 
+
+typedef tuple< T0 > InputTuple
 
typedef internal::tagged_msg
-< size_t, T0, T1 > 
output_type
 
+< size_t, T0 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00085.png b/doc/html/a00085.png index 1e6fd1b95104f945dd6a62486c5896aba465541d..fe6adbe59145b674fba68594acf7bc9395766384 100644 Binary files a/doc/html/a00085.png and b/doc/html/a00085.png differ diff --git a/doc/html/a00086.html b/doc/html/a00086.html index 40880fbad02e4fe15e919a54c21b71c14b7e3915..2ae9fb4026eaefbd66e18052038ecd7d3be97ad7 100644 --- a/doc/html/a00086.html +++ b/doc/html/a00086.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1 > Class Template Reference @@ -33,61 +33,61 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0, T1, T2 > InputTuple
 
+
+typedef tuple< T0, T1 > InputTuple
 
typedef internal::tagged_msg
-< size_t, T0, T1, T2 > 
output_type
 
+< size_t, T0, T1 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00086.png b/doc/html/a00086.png index 7bee1864424f35228b49cd77ed691c4dc9b3267e..1e6fd1b95104f945dd6a62486c5896aba465541d 100644 Binary files a/doc/html/a00086.png and b/doc/html/a00086.png differ diff --git a/doc/html/a00087.html b/doc/html/a00087.html index cda0f8af6a04793bc4db9acbcbf65d1b92815ed2..eb032f46d3279b2a7d454917413f7a7b15f05ec3 100644 --- a/doc/html/a00087.html +++ b/doc/html/a00087.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2 > Class Template Reference @@ -33,61 +33,61 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0, T1, T2, T3 > InputTuple
 
+
+typedef tuple< T0, T1, T2 > InputTuple
 
typedef internal::tagged_msg
-< size_t, T0, T1, T2, T3 > 
output_type
 
+< size_t, T0, T1, T2 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00087.png b/doc/html/a00087.png index bf8a0899389f6be8da78b9f66393bda75f1edd44..7bee1864424f35228b49cd77ed691c4dc9b3267e 100644 Binary files a/doc/html/a00087.png and b/doc/html/a00087.png differ diff --git a/doc/html/a00088.html b/doc/html/a00088.html index 8ad0a3b966d7899e33778f7185836fae79da4f2d..090890fbfa16f335437b16d58b7e222395ad0852 100644 --- a/doc/html/a00088.html +++ b/doc/html/a00088.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3 > Class Template Reference @@ -33,61 +33,61 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0, T1, T2, T3, T4 > InputTuple
 
+
+typedef tuple< T0, T1, T2, T3 > InputTuple
 
typedef internal::tagged_msg
-< size_t, T0, T1, T2, T3, T4 > 
output_type
 
+< size_t, T0, T1, T2, T3 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00088.png b/doc/html/a00088.png index e8c28bfb8705c626663c703b62a74d2877961c3d..bf8a0899389f6be8da78b9f66393bda75f1edd44 100644 Binary files a/doc/html/a00088.png and b/doc/html/a00088.png differ diff --git a/doc/html/a00089.html b/doc/html/a00089.html index 71edc04558e66e68606fc0a2ade5c727e3ae1f1f..bec42aa9b1a070411056f0d6c32c60fe596083c3 100644 --- a/doc/html/a00089.html +++ b/doc/html/a00089.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 > Class Template Reference @@ -33,63 +33,61 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4 >:
- - + +
- - - + + - - + + - +

Public Types

-typedef tuple< T0, T1, T2, T3,
-T4, T5 > 
InputTuple
 
+
+typedef tuple< T0, T1, T2, T3, T4 > InputTuple
 
typedef internal::tagged_msg
-< size_t, T0, T1, T2, T3, T4,
-T5 > 
output_type
 
+< size_t, T0, T1, T2, T3, T4 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00089.png b/doc/html/a00089.png index e3d1565f5b3d6592f5b6b2e58d9455d919b5e21b..e8c28bfb8705c626663c703b62a74d2877961c3d 100644 Binary files a/doc/html/a00089.png and b/doc/html/a00089.png differ diff --git a/doc/html/a00090.html b/doc/html/a00090.html index 90146895ad1597a7bce6c32cfe2141e40fcb3781..7e596b4f09790c5634c994af06ba8308592fe763 100644 --- a/doc/html/a00090.html +++ b/doc/html/a00090.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 > Class Template Reference @@ -33,63 +33,63 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5 >:
- - + +
- - - + + - - + + - +

Public Types

+
typedef tuple< T0, T1, T2, T3,
-T4, T5, T6 > 
InputTuple
 
+T4, T5 > InputTuple
 
typedef internal::tagged_msg
< size_t, T0, T1, T2, T3, T4,
-T5, T6 > 
output_type
 
+T5 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00090.png b/doc/html/a00090.png index a26e6ba87462dfe980238cad51f0b932d581d7e3..e3d1565f5b3d6592f5b6b2e58d9455d919b5e21b 100644 Binary files a/doc/html/a00090.png and b/doc/html/a00090.png differ diff --git a/doc/html/a00091.html b/doc/html/a00091.html index fdce244feacba24b78d0748315abd07f06c19f38..552054bb61ed64f1d4cd2a3b2d588b684c2146fd 100644 --- a/doc/html/a00091.html +++ b/doc/html/a00091.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 > Class Template Reference @@ -33,63 +33,63 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6 >:
- - + +
- - - + + - - + + - +

Public Types

+
typedef tuple< T0, T1, T2, T3,
-T4, T5, T6, T7 > 
InputTuple
 
+T4, T5, T6 > InputTuple
 
typedef internal::tagged_msg
< size_t, T0, T1, T2, T3, T4,
-T5, T6, T7 > 
output_type
 
+T5, T6 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00091.png b/doc/html/a00091.png index ad53103e7be97f926d7a4df7b3c00cba54ef366d..a26e6ba87462dfe980238cad51f0b932d581d7e3 100644 Binary files a/doc/html/a00091.png and b/doc/html/a00091.png differ diff --git a/doc/html/a00092.html b/doc/html/a00092.html index baac509246210b77e6f70b1783c51537c769ac85..8e06272f841761777484c5a3c6725c092f0c92ac 100644 --- a/doc/html/a00092.html +++ b/doc/html/a00092.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 > Class Template Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference @@ -33,63 +33,63 @@
-
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 > Class Template Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 >:
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7 >:
- - + +
- - - + + - - + + - +

Public Types

+
typedef tuple< T0, T1, T2, T3,
-T4, T5, T6, T7, T8 > 
InputTuple
 
+T4, T5, T6, T7 > InputTuple
 
typedef internal::tagged_msg
< size_t, T0, T1, T2, T3, T4,
-T5, T6, T7, T8 > 
output_type
 
+T5, T6, T7 > output_type
 
typedef
internal::unfolded_indexer_node
< InputTuple > 
unfolded_type
 
 
- - - - - + + + + - +

Public Member Functions

indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00092.png b/doc/html/a00092.png index 6c3aba1e4440d9f50ec116d4a078d52969493223..ad53103e7be97f926d7a4df7b3c00cba54ef366d 100644 Binary files a/doc/html/a00092.png and b/doc/html/a00092.png differ diff --git a/doc/html/a00093.html b/doc/html/a00093.html index b5e578f5285afca653bbba13382f27f44c1ab0ca..4f2d3a27f252c485bec928b35f619d4fd1c9e0a3 100644 --- a/doc/html/a00093.html +++ b/doc/html/a00093.html @@ -4,7 +4,7 @@ -tbb::tick_count::interval_t Class Reference +tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 > Class Template Reference @@ -33,74 +33,63 @@
-
tbb::tick_count::interval_t Class Reference
+
tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 > Class Template Reference
- -

Relative time interval. - More...

- -

#include <tick_count.h>

+
+Inheritance diagram for tbb::flow::interface8::indexer_node< T0, T1, T2, T3, T4, T5, T6, T7, T8 >:
+
+
+ + + +
+ + + + + + + +

+Public Types

+typedef tuple< T0, T1, T2, T3,
+T4, T5, T6, T7, T8 > 
InputTuple
 
+typedef internal::tagged_msg
+< size_t, T0, T1, T2, T3, T4,
+T5, T6, T7, T8 > 
output_type
 
+typedef
+internal::unfolded_indexer_node
+< InputTuple > 
unfolded_type
 
- - - - - - - - - - - - - - - -

Public Member Functions

interval_t ()
 Construct a time interval representing zero time duration.
 
interval_t (double sec)
 Construct a time interval representing sec seconds time duration.
 
-double seconds () const
 Return the length of a time interval in seconds.
 
-interval_toperator+= (const interval_t &i)
 Accumulation operator.
 
-interval_toperator-= (const interval_t &i)
 Subtraction operator.
 
- - - - - - - - - - - - + + + + + +

-Friends

-class tbb::tick_count
 
-interval_t operator- (const tick_count &t1, const tick_count &t0)
 Extract the intervals from the tick_counts and subtract them.
 
-interval_t operator+ (const interval_t &i, const interval_t &j)
 Add two intervals.
 
-interval_t operator- (const interval_t &i, const interval_t &j)
 Subtract two intervals.
 
indexer_node (graph &g)
 
indexer_node (const indexer_node &other)
 
+void set_name (const char *name)
 
-

Detailed Description

-

Relative time interval.

-

The documentation for this class was generated from the following file:
    -
  • tick_count.h
  • +
    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00093.png b/doc/html/a00093.png new file mode 100644 index 0000000000000000000000000000000000000000..6c3aba1e4440d9f50ec116d4a078d52969493223 Binary files /dev/null and b/doc/html/a00093.png differ diff --git a/doc/html/a00094.html b/doc/html/a00094.html index bbdcf74fa917db6494f77402a76bef2be2597e06..27aebdf4d11b2f04d7c29289b7bda4eb2d88d240 100644 --- a/doc/html/a00094.html +++ b/doc/html/a00094.html @@ -4,7 +4,7 @@ -tbb::invalid_multiple_scheduling Class Reference +tbb::tick_count::interval_t Class Reference @@ -33,46 +33,74 @@
-
tbb::invalid_multiple_scheduling Class Reference
+
tbb::tick_count::interval_t Class Reference
-

Exception for repeated scheduling of the same task_handle. +

Relative time interval. More...

-

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::invalid_multiple_scheduling:
-
-
- - - -
+

#include <tick_count.h>

- - + + + + + + + + + + + + + + + +

Public Member Functions

-const char * what () const throw ()
 
interval_t ()
 Construct a time interval representing zero time duration.
 
interval_t (double sec)
 Construct a time interval representing sec seconds time duration.
 
+double seconds () const
 Return the length of a time interval in seconds.
 
+interval_toperator+= (const interval_t &i)
 Accumulation operator.
 
+interval_toperator-= (const interval_t &i)
 Subtraction operator.
 
+ + + + + + + + + + + +

+Friends

+class tbb::tick_count
 
+interval_t operator- (const tick_count &t1, const tick_count &t0)
 Extract the intervals from the tick_counts and subtract them.
 
+interval_t operator+ (const interval_t &i, const interval_t &j)
 Add two intervals.
 
+interval_t operator- (const interval_t &i, const interval_t &j)
 Subtract two intervals.
 

Detailed Description

-

Exception for repeated scheduling of the same task_handle.

+

Relative time interval.


The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +
  • tick_count.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00095.html b/doc/html/a00095.html index ee95c61343ff57ee11417b44ac72cd44c035b2ca..067236e992103dd6e3cc14b90eedd6f0f2b3cfb1 100644 --- a/doc/html/a00095.html +++ b/doc/html/a00095.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::join_node< OutputTuple, JP > Class Template Reference +tbb::invalid_multiple_scheduling Class Reference @@ -33,21 +33,46 @@
+
-
tbb::flow::interface8::join_node< OutputTuple, JP > Class Template Reference
+
tbb::invalid_multiple_scheduling Class Reference
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • + +

    Exception for repeated scheduling of the same task_handle. + More...

    + +

    #include <tbb_exception.h>

    +
    +Inheritance diagram for tbb::invalid_multiple_scheduling:
    +
    +
    + + + +
    + + + + +

    +Public Member Functions

    +const char * what () const throw ()
     
    +

    Detailed Description

    +

    Exception for repeated scheduling of the same task_handle.

    +

    The documentation for this class was generated from the following file:
      +
    • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00094.png b/doc/html/a00095.png similarity index 100% rename from doc/html/a00094.png rename to doc/html/a00095.png diff --git a/doc/html/a00096.html b/doc/html/a00096.html index f1729a4574d98d97c9bce7641c111e8b8d9812d3..b252b4c09a0a31b6d78b0a1c4deff6987edf7837 100644 --- a/doc/html/a00096.html +++ b/doc/html/a00096.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > > Class Template Reference +tbb::flow::interface8::join_node< OutputTuple, JP > Class Template Reference @@ -33,92 +33,21 @@
-
-
tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > > Class Template Reference
+
tbb::flow::interface8::join_node< OutputTuple, JP > Class Template Reference
-
-Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > >:
-
-
- - - -
- - - - - - -

-Public Types

-typedef OutputTuple output_type
 
-typedef
-unfolded_type::input_ports_type 
input_ports_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

join_node (graph &g)
 
-template<typename __TBB_B0 , typename __TBB_B1 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 , typename __TBB_B8 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8)
 
-template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 , typename __TBB_B8 , typename __TBB_B9 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9)
 
join_node (const join_node &other)
 
-void set_name (const char *name)
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00096.png b/doc/html/a00096.png deleted file mode 100644 index 04fbb34308e28c32765b6672e2d13357708f2350..0000000000000000000000000000000000000000 Binary files a/doc/html/a00096.png and /dev/null differ diff --git a/doc/html/a00097.html b/doc/html/a00097.html index 639ceddbb5db05aa1d786c20a85f05ad35fdb931..f7db7b55d175104a148ead2e69cfa5f84845b535 100644 --- a/doc/html/a00097.html +++ b/doc/html/a00097.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::join_node< OutputTuple, queueing > Class Template Reference +tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > > Class Template Reference @@ -33,56 +33,92 @@
-
tbb::flow::interface8::join_node< OutputTuple, queueing > Class Template Reference
+
tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, queueing >:
+Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, key_matching< K, KHash > >:
- - + +
- - - + - +

Public Types

+
typedef OutputTuple output_type
 
+
 
typedef
unfolded_type::input_ports_type 
input_ports_type
 
 
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - +

Public Member Functions

join_node (graph &g)
 
join_node (const join_node &other)
 
+
join_node (graph &g)
 
+template<typename __TBB_B0 , typename __TBB_B1 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 , typename __TBB_B8 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8)
 
+template<typename __TBB_B0 , typename __TBB_B1 , typename __TBB_B2 , typename __TBB_B3 , typename __TBB_B4 , typename __TBB_B5 , typename __TBB_B6 , typename __TBB_B7 , typename __TBB_B8 , typename __TBB_B9 >
 join_node (graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9)
 
join_node (const join_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00097.png b/doc/html/a00097.png index 890b2d6bb8371d00ae69db7ae975c2814c5befd2..04fbb34308e28c32765b6672e2d13357708f2350 100644 Binary files a/doc/html/a00097.png and b/doc/html/a00097.png differ diff --git a/doc/html/a00098.html b/doc/html/a00098.html index 96b250d8f691d8b9fcd2f6bf61aedb4e974df49a..c09f3e6c74d30210920d498e7ca8082d09a6ff5a 100644 --- a/doc/html/a00098.html +++ b/doc/html/a00098.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::join_node< OutputTuple, reserving > Class Template Reference +tbb::flow::interface8::join_node< OutputTuple, queueing > Class Template Reference @@ -33,56 +33,56 @@
-
tbb::flow::interface8::join_node< OutputTuple, reserving > Class Template Reference
+
tbb::flow::interface8::join_node< OutputTuple, queueing > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, reserving >:
+Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, queueing >:
- - + +
- - - + - +

Public Types

+
typedef OutputTuple output_type
 
+
 
typedef
unfolded_type::input_ports_type 
input_ports_type
 
 
- - - - - + + + + - +

Public Member Functions

join_node (graph &g)
 
join_node (const join_node &other)
 
+
join_node (graph &g)
 
join_node (const join_node &other)
 
void set_name (const char *name)
 
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00098.png b/doc/html/a00098.png index 0157a3afb3e5de05fcf0632efc7041bf2e7cf1b4..890b2d6bb8371d00ae69db7ae975c2814c5befd2 100644 Binary files a/doc/html/a00098.png and b/doc/html/a00098.png differ diff --git a/doc/html/a00099.html b/doc/html/a00099.html index ae9a11afc1754db55efde73e2f5552c35db40b80..78242358ddd4c8d4f2e170461cc5095b7e4b8286 100644 --- a/doc/html/a00099.html +++ b/doc/html/a00099.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::key_from_policy< JP > Struct Template Reference +tbb::flow::interface8::join_node< OutputTuple, reserving > Class Template Reference @@ -33,34 +33,56 @@
-
tbb::flow::interface8::key_from_policy< JP > Struct Template Reference
+
tbb::flow::interface8::join_node< OutputTuple, reserving > Class Template Reference
+
+Inheritance diagram for tbb::flow::interface8::join_node< OutputTuple, reserving >:
+
+
+ + + +
- - - - + + + + +

Public Types

-typedef size_t type
 
-typedef std::false_type is_key_matching
 
+typedef OutputTuple output_type
 
+typedef
+unfolded_type::input_ports_type 
input_ports_type
 
+ + + + + + +

+Public Member Functions

join_node (graph &g)
 
join_node (const join_node &other)
 
+void set_name (const char *name)
 
-
The documentation for this struct was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +
    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00099.png b/doc/html/a00099.png new file mode 100644 index 0000000000000000000000000000000000000000..0157a3afb3e5de05fcf0632efc7041bf2e7cf1b4 Binary files /dev/null and b/doc/html/a00099.png differ diff --git a/doc/html/a00100.html b/doc/html/a00100.html index 4b6e67570e0b46e4cba3fb86f96d86250247daad..899d405dd15b138f4a2460e44434162c1909e44e 100644 --- a/doc/html/a00100.html +++ b/doc/html/a00100.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::key_from_policy< key_matching< Key & > > Struct Template Reference +tbb::flow::interface8::key_from_policy< JP > Struct Template Reference @@ -33,26 +33,26 @@
-
tbb::flow::interface8::key_from_policy< key_matching< Key & > > Struct Template Reference
+
tbb::flow::interface8::key_from_policy< JP > Struct Template Reference
- - - - + + + +

Public Types

-typedef const Key & type
 
-typedef std::true_type is_key_matching
 
+typedef size_t type
 
+typedef std::false_type is_key_matching
 

The documentation for this struct was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -60,7 +60,7 @@ typedef std::true_type is_

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00101.html b/doc/html/a00101.html index e86af53cd37b2be79fbf4ab0cadc60e1a9101445..c1133d663a9d3718401742c99376de44c52a2090 100644 --- a/doc/html/a00101.html +++ b/doc/html/a00101.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::key_from_policy< key_matching< Key > > Struct Template Reference +tbb::flow::interface8::key_from_policy< key_matching< Key & > > Struct Template Reference @@ -33,26 +33,26 @@
-
tbb::flow::interface8::key_from_policy< key_matching< Key > > Struct Template Reference
+
tbb::flow::interface8::key_from_policy< key_matching< Key & > > Struct Template Reference
- - - + + - +

Public Types

-typedef Key type
 
+
+typedef const Key & type
 
typedef std::true_type is_key_matching
 
 

The documentation for this struct was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -60,7 +60,7 @@ typedef std::true_type is_

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00102.html b/doc/html/a00102.html index b25f5a204c91fc01f7c93deca1683c11671bfadf..931c0d281453d49ecb7e3dd8434648c83784cc68 100644 --- a/doc/html/a00102.html +++ b/doc/html/a00102.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::limiter_node< T > Class Template Reference +tbb::flow::interface8::key_from_policy< key_matching< Key > > Struct Template Reference @@ -33,305 +33,34 @@
-
tbb::flow::interface8::limiter_node< T > Class Template Reference
+
tbb::flow::interface8::key_from_policy< key_matching< Key > > Struct Template Reference
- -

Forwards messages only if the threshold has not been reached. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::limiter_node< T >:
-
-
- - -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef receiver< input_type >
-::built_predecessors_type 
built_predecessors_type
 
-typedef sender< output_type >
-::built_successors_type 
built_successors_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

limiter_node (graph &g, size_t threshold, int num_decrement_predecessors=0)
 Constructor.
 
limiter_node (const limiter_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
-bool register_successor (receiver< output_type > &r)
 Replace the current successor with this new successor.
 
bool remove_successor (receiver< output_type > &r)
 Removes a successor from this node. More...
 
-built_successors_typebuilt_successors ()
 
-built_predecessors_typebuilt_predecessors ()
 
-void internal_add_built_successor (receiver< output_type > &src)
 
-void internal_delete_built_successor (receiver< output_type > &src)
 
-size_t successor_count ()
 
-void copy_successors (successor_list_type &v)
 
-void internal_add_built_predecessor (sender< output_type > &src)
 
-void internal_delete_built_predecessor (sender< output_type > &src)
 
-size_t predecessor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void extract ()
 
-bool register_predecessor (predecessor_type &src)
 Adds src to the list of cached predecessors.
 
-bool remove_predecessor (predecessor_type &src)
 Removes src from the list of cached predecessors.
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
-virtual bool try_get (T &)
 Request an item from the sender.
 
-virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
- - - - -

-Public Attributes

-internal::decrementer
-< limiter_node< T > > 
decrement
 The internal receiver< continue_msg > that decrements the count.
 
- - - - - - - - - - - -

-Protected Member Functions

-task * try_put_task (const T &t)
 Puts an item to this receiver.
 
-void reset_receiver (reset_flags)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - - - - - -

-Friends

-class internal::forward_task_bypass< limiter_node< T > >
 
-class internal::decrementer< limiter_node< T > >
 
-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
- - - - - - - - + + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
+typedef Key type
 
+typedef std::true_type is_key_matching
 
-

Detailed Description

-

template<typename T>
-class tbb::flow::interface8::limiter_node< T >

- -

Forwards messages only if the threshold has not been reached.

-

This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped.

-

Member Function Documentation

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - -
bool tbb::flow::interface8::limiter_node< T >::remove_successor (receiver< output_type > & r)
-
-inlinevirtual
-
- -

Removes a successor from this node.

-

r.remove_predecessor(*this) is also called.

- -

Implements tbb::flow::interface8::sender< T >.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00102.png b/doc/html/a00102.png deleted file mode 100644 index 0a2205abf8bb10721e5ce5bd1a63865d969d817a..0000000000000000000000000000000000000000 Binary files a/doc/html/a00102.png and /dev/null differ diff --git a/doc/html/a00103.html b/doc/html/a00103.html index 18b0acd7c90ea04ed837ccd173e9d8ea7343c25d..5f6e3de31549054f10316a5b67b5ed499d953a02 100644 --- a/doc/html/a00103.html +++ b/doc/html/a00103.html @@ -4,7 +4,7 @@ -tbb::interface6::memory_pool< Alloc > Class Template Reference +tbb::flow::interface8::limiter_node< T > Class Template Reference @@ -33,54 +33,305 @@
-
tbb::interface6::memory_pool< Alloc > Class Template Reference
+
tbb::flow::interface8::limiter_node< T > Class Template Reference
-

Thread-safe growable pool allocator for variable-size requests. +

Forwards messages only if the threshold has not been reached. More...

-

#include <memory_pool.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::interface6::memory_pool< Alloc >:
+Inheritance diagram for tbb::flow::interface8::limiter_node< T >:
- - + + +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Types

+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef receiver< input_type >
+::built_predecessors_type 
built_predecessors_type
 
+typedef sender< output_type >
+::built_successors_type 
built_successors_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

memory_pool (const Alloc &src=Alloc())
 construct pool with underlying allocator
 
~memory_pool ()
 destroy pool
 
limiter_node (graph &g, size_t threshold, int num_decrement_predecessors=0)
 Constructor.
 
limiter_node (const limiter_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
+bool register_successor (receiver< output_type > &r)
 Replace the current successor with this new successor.
 
bool remove_successor (receiver< output_type > &r)
 Removes a successor from this node. More...
 
+built_successors_typebuilt_successors ()
 
+built_predecessors_typebuilt_predecessors ()
 
+void internal_add_built_successor (receiver< output_type > &src)
 
+void internal_delete_built_successor (receiver< output_type > &src)
 
+size_t successor_count ()
 
+void copy_successors (successor_list_type &v)
 
+void internal_add_built_predecessor (sender< output_type > &src)
 
+void internal_delete_built_predecessor (sender< output_type > &src)
 
+size_t predecessor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void extract ()
 
+bool register_predecessor (predecessor_type &src)
 Adds src to the list of cached predecessors.
 
+bool remove_predecessor (predecessor_type &src)
 Removes src from the list of cached predecessors.
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
+virtual bool try_get (T &)
 Request an item from the sender.
 
+virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+ + + + +

+Public Attributes

+internal::decrementer
+< limiter_node< T > > 
decrement
 The internal receiver< continue_msg > that decrements the count.
 
+ + + + + + + + + + + +

+Protected Member Functions

+task * try_put_task (const T &t)
 Puts an item to this receiver.
 
+void reset_receiver (reset_flags)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + + + + + + +

+Friends

+class internal::forward_task_bypass< limiter_node< T > >
 
+class internal::decrementer< limiter_node< T > >
 
+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+ + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

Detailed Description

-

template<typename Alloc>
-class tbb::interface6::memory_pool< Alloc >

+

template<typename T>
+class tbb::flow::interface8::limiter_node< T >

-

Thread-safe growable pool allocator for variable-size requests.

-

The documentation for this class was generated from the following file:
    -
  • memory_pool.h
  • +

    Forwards messages only if the threshold has not been reached.

    +

    This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped.

    +

Member Function Documentation

+ +
+
+
+template<typename T >
+ + + + + +
+ + + + + + + + +
bool tbb::flow::interface8::limiter_node< T >::remove_successor (receiver< output_type > & r)
+
+inlinevirtual
+
+ +

Removes a successor from this node.

+

r.remove_predecessor(*this) is also called.

+ +

Implements tbb::flow::interface8::sender< T >.

+ +
+
+
The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00103.png b/doc/html/a00103.png index 040c525da839e5eac853d6e1a5792784458e9f56..0a2205abf8bb10721e5ce5bd1a63865d969d817a 100644 Binary files a/doc/html/a00103.png and b/doc/html/a00103.png differ diff --git a/doc/html/a00104.html b/doc/html/a00104.html index 2177a5ab35eacfe6ea3bbdfcb2ca8401a455d6c9..d5d6ed47a0726460807f431f78671ef9ac3ee9e5 100644 --- a/doc/html/a00104.html +++ b/doc/html/a00104.html @@ -4,7 +4,7 @@ -tbb::interface6::memory_pool_allocator< T, P > Class Template Reference +tbb::interface6::memory_pool< Alloc > Class Template Reference @@ -33,144 +33,54 @@
-
tbb::interface6::memory_pool_allocator< T, P > Class Template Reference
+
tbb::interface6::memory_pool< Alloc > Class Template Reference
-

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. +

Thread-safe growable pool allocator for variable-size requests. More...

#include <memory_pool.h>

+
+Inheritance diagram for tbb::interface6::memory_pool< Alloc >:
+
+
+ + + +
- - - -

-Classes

struct  rebind
 
- - - - - - - - - - - - - - - -

-Public Types

-typedef
-tbb::internal::allocator_type
-< T >::value_type 
value_type
 
-typedef value_type * pointer
 
-typedef const value_type * const_pointer
 
-typedef value_type & reference
 
-typedef const value_type & const_reference
 
-typedef size_t size_type
 
-typedef ptrdiff_t difference_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

memory_pool_allocator (pool_type &pool) throw ()
 
memory_pool_allocator (const memory_pool_allocator &src) throw ()
 
-template<typename U >
 memory_pool_allocator (const memory_pool_allocator< U, P > &src) throw ()
 
-pointer address (reference x) const
 
-const_pointer address (const_reference x) const
 
-pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
-void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
-size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
-template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
-void construct (pointer p, value_type &&value)
 
-void construct (pointer p, const value_type &value)
 
-void destroy (pointer p)
 Destroy value at location pointed to by p.
 
- - - -

-Protected Types

-typedef P pool_type
 
- - - -

-Protected Attributes

-pool_type * my_pool
 
- - - - - - - - - - + + + + + +

-Friends

-template<typename U , typename R >
class memory_pool_allocator
 
-template<typename V , typename U , typename R >
bool operator== (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 
-template<typename V , typename U , typename R >
bool operator!= (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 
memory_pool (const Alloc &src=Alloc())
 construct pool with underlying allocator
 
~memory_pool ()
 destroy pool
 

Detailed Description

-

template<typename T, typename P = internal::pool_base>
-class tbb::interface6::memory_pool_allocator< T, P >

+

template<typename Alloc>
+class tbb::interface6::memory_pool< Alloc >

-

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

+

Thread-safe growable pool allocator for variable-size requests.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00104.png b/doc/html/a00104.png new file mode 100644 index 0000000000000000000000000000000000000000..040c525da839e5eac853d6e1a5792784458e9f56 Binary files /dev/null and b/doc/html/a00104.png differ diff --git a/doc/html/a00105.html b/doc/html/a00105.html index de12a4bcfddae790ad2328690ce14628b4af2764..ae314882b6e39d80af7dd336ffe759d4fec7370a 100644 --- a/doc/html/a00105.html +++ b/doc/html/a00105.html @@ -4,7 +4,7 @@ -tbb::interface6::memory_pool_allocator< void, P > Class Template Reference +tbb::interface6::memory_pool_allocator< T, P > Class Template Reference @@ -33,7 +33,7 @@
+List of all members
-
tbb::interface6::memory_pool_allocator< void, P > Class Template Reference
+
tbb::interface6::memory_pool_allocator< T, P > Class Template Reference
-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. +

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...

#include <memory_pool.h>

- +

Classes

struct  rebind
struct  rebind
 
- - - - - - - - + + + + + + + + + + + + + +

Public Types

-typedef P pool_type
 
-typedef void * pointer
 
-typedef const void * const_pointer
 
-typedef void value_type
 
+typedef
+tbb::internal::allocator_type
+< T >::value_type 
value_type
 
+typedef value_type * pointer
 
+typedef const value_type * const_pointer
 
+typedef value_type & reference
 
+typedef const value_type & const_reference
 
+typedef size_t size_type
 
+typedef ptrdiff_t difference_type
 
- - - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

+
 memory_pool_allocator (pool_type &pool) throw ()
 
memory_pool_allocator (const memory_pool_allocator &src) throw ()
 
+
 
memory_pool_allocator (const memory_pool_allocator &src) throw ()
 
template<typename U >
 memory_pool_allocator (const memory_pool_allocator< U, P > &src) throw ()
 
 memory_pool_allocator (const memory_pool_allocator< U, P > &src) throw ()
 
+pointer address (reference x) const
 
+const_pointer address (const_reference x) const
 
+pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
+void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
+size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
+template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
+void construct (pointer p, value_type &&value)
 
+void construct (pointer p, const value_type &value)
 
+void destroy (pointer p)
 Destroy value at location pointed to by p.
 
+ + +

+Protected Types

+typedef P pool_type
 
- - +

Protected Attributes

+
pool_type * my_pool
 
 
@@ -101,25 +152,25 @@ template<typename U , typename R > - + - +

Friends

 
template<typename V , typename U , typename R >
bool operator== (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
bool operator== (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 
template<typename V , typename U , typename R >
bool operator!= (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
bool operator!= (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 

Detailed Description

-

template<typename P>
-class tbb::interface6::memory_pool_allocator< void, P >

+

template<typename T, typename P = internal::pool_base>
+class tbb::interface6::memory_pool_allocator< T, P >

-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

+

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00106.html b/doc/html/a00106.html index ac5281e7f20744d1555b5294da27fe0daca51ae8..6a977d48a256a74171b10674edc502a718774bcf 100644 --- a/doc/html/a00106.html +++ b/doc/html/a00106.html @@ -4,7 +4,7 @@ -rml::MemPoolPolicy Struct Reference +tbb::interface6::memory_pool_allocator< void, P > Class Template Reference @@ -33,63 +33,93 @@
-
rml::MemPoolPolicy Struct Reference
+
tbb::interface6::memory_pool_allocator< void, P > Class Template Reference
+ +

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. + More...

+ +

#include <memory_pool.h>

+ + + +

+Classes

struct  rebind
 
- - + + + + + + + +

Public Types

enum  { TBBMALLOC_POOL_VERSION = 1 - }
 
+typedef P pool_type
 
+typedef void * pointer
 
+typedef const void * const_pointer
 
+typedef void value_type
 
- - + + + + + + + +

Public Member Functions

MemPoolPolicy (rawAllocType pAlloc_, rawFreeType pFree_, size_t granularity_=0, bool fixedPool_=false, bool keepAllMemory_=false)
 
memory_pool_allocator (pool_type &pool) throw ()
 
memory_pool_allocator (const memory_pool_allocator &src) throw ()
 
+template<typename U >
 memory_pool_allocator (const memory_pool_allocator< U, P > &src) throw ()
 
+ + +

+Protected Attributes

+pool_type * my_pool
 
- - - - - - - - - - - - - - - + + + + + + + + + +

-Public Attributes

-rawAllocType pAlloc
 
-rawFreeType pFree
 
-size_t granularity
 
-int version
 
-unsigned fixedPool: 1
 
-unsigned keepAllMemory: 1
 
-unsigned reserved: 30
 

+Friends

+template<typename U , typename R >
class memory_pool_allocator
 
+template<typename V , typename U , typename R >
bool operator== (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 
+template<typename V , typename U , typename R >
bool operator!= (const memory_pool_allocator< V, R > &a, const memory_pool_allocator< U, R > &b)
 
-
The documentation for this struct was generated from the following file:
    -
  • scalable_allocator.h
  • +

    Detailed Description

    +

    template<typename P>
    +class tbb::interface6::memory_pool_allocator< void, P >

    + +

    Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

    +

    The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00107.html b/doc/html/a00107.html index 0dcd68aeff415d5500093f19cb70b713cc902c46..23bd7c5c1c498ea9142d0311e6a8f1890b151701 100644 --- a/doc/html/a00107.html +++ b/doc/html/a00107.html @@ -4,7 +4,7 @@ -tbb::missing_wait Class Reference +rml::MemPoolPolicy Struct Reference @@ -33,46 +33,63 @@
-
tbb::missing_wait Class Reference
+
rml::MemPoolPolicy Struct Reference
- -

Exception for missing wait on structured_task_group. - More...

- -

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::missing_wait:
-
-
- - - -
+ + + +

+Public Types

enum  { TBBMALLOC_POOL_VERSION = 1 + }
 
- - + + +

Public Member Functions

-const char * what () const throw ()
 
MemPoolPolicy (rawAllocType pAlloc_, rawFreeType pFree_, size_t granularity_=0, bool fixedPool_=false, bool keepAllMemory_=false)
 
+ + + + + + + + + + + + + + +

+Public Attributes

+rawAllocType pAlloc
 
+rawFreeType pFree
 
+size_t granularity
 
+int version
 
+unsigned fixedPool: 1
 
+unsigned keepAllMemory: 1
 
+unsigned reserved: 30
 
-

Detailed Description

-

Exception for missing wait on structured_task_group.

-

The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +
    The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00107.png b/doc/html/a00107.png deleted file mode 100644 index 7f9c4b31407dc4891a59c510c5a999ce0f36acf8..0000000000000000000000000000000000000000 Binary files a/doc/html/a00107.png and /dev/null differ diff --git a/doc/html/a00108.html b/doc/html/a00108.html index 038fdbfb4f8759010f3a4ea532ac3cdaa118c623..5f02bbb4cf8affea05c4d83572840ce7c305de35 100644 --- a/doc/html/a00108.html +++ b/doc/html/a00108.html @@ -4,7 +4,7 @@ -tbb::movable_exception< ExceptionData > Class Template Reference +tbb::missing_wait Class Reference @@ -33,195 +33,46 @@
-
tbb::movable_exception< ExceptionData > Class Template Reference
+
tbb::missing_wait Class Reference
-

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread. +

Exception for missing wait on structured_task_group. More...

#include <tbb_exception.h>

-Inheritance diagram for tbb::movable_exception< ExceptionData >:
+Inheritance diagram for tbb::missing_wait:
- - -tbb::tbb_exception + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

movable_exception (const ExceptionData &data_)
 
movable_exception (const movable_exception &src) throw ()
 
-const movable_exceptionoperator= (const movable_exception &src)
 
-ExceptionData & data () throw ()
 
-const ExceptionData & data () const throw ()
 
-const char * name () const throw ()
 Returns RTTI name of the originally intercepted exception.
 
-const char * what () const throw ()
 Returns the result of originally intercepted exception's what() method.
 
movable_exceptionmove () throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
void destroy () throw ()
 Destroys objects created by the move() method. More...
 
void throw_self ()
 Throws this exception object. More...
 
- Public Member Functions inherited from tbb::tbb_exception
void operator delete (void *p)
 
- - - - + +

-Protected Attributes

-ExceptionData my_exception_data
 User data.
 
+const char * what () const throw ()
 

Detailed Description

-

template<typename ExceptionData>
-class tbb::movable_exception< ExceptionData >

- -

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.

-

Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread ().

-
See Also
tbb::tbb_exception
-

Member Function Documentation

- -
-
-
-template<typename ExceptionData >
- - - - - -
- - - - - - - - - - - - - -
void tbb::movable_exception< ExceptionData >::destroy ()
throw (
)
-
-inlinevirtual
-
- -

Destroys objects created by the move() method.

-

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

- -

Implements tbb::tbb_exception.

- -
-
- -
-
-
-template<typename ExceptionData >
- - - - - -
- - - - - - - - - - - - - -
movable_exception* tbb::movable_exception< ExceptionData >::move ()
throw (
)
-
-inlinevirtual
-
- -

Creates and returns pointer to the deep copy of this exception object.

-

Move semantics is allowed.

- -

Implements tbb::tbb_exception.

- -
-
- -
-
-
-template<typename ExceptionData >
- - - - - -
- - - - - - - -
void tbb::movable_exception< ExceptionData >::throw_self ()
-
-inlinevirtual
-
- -

Throws this exception object.

-

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

- -

Implements tbb::tbb_exception.

- -
-
-
The documentation for this class was generated from the following file:
    +

    Exception for missing wait on structured_task_group.

    +

    The documentation for this class was generated from the following file:
    • tbb_exception.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00108.png b/doc/html/a00108.png index 2c2e3fe83eab54ed65eb8ecc80475c8fdaf8016c..7f9c4b31407dc4891a59c510c5a999ce0f36acf8 100644 Binary files a/doc/html/a00108.png and b/doc/html/a00108.png differ diff --git a/doc/html/a00109.html b/doc/html/a00109.html index f808e4852c48f7232d9d43ba5cced5b2c14ecad4..b58e364862b84fbb4ab3da9ede0b0cf8540c26fc 100644 --- a/doc/html/a00109.html +++ b/doc/html/a00109.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > Class Template Reference +tbb::movable_exception< ExceptionData > Class Template Reference @@ -33,119 +33,195 @@
-
tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > Class Template Reference
+
tbb::movable_exception< ExceptionData > Class Template Reference
-

implements a function node that supports Input -> (set of outputs) +

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread. More...

-

#include <flow_graph.h>

+

#include <tbb_exception.h>

-Inheritance diagram for tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator >:
+Inheritance diagram for tbb::movable_exception< ExceptionData >:
- - -tbb::flow::interface8::graph_node + + +tbb::tbb_exception
- - - - - - - - - - - -

-Public Types

-typedef Input input_type
 
-typedef null_type output_type
 
-typedef
-internal::wrap_tuple_elements
-< N,
-internal::multifunction_output,
-Output >::type 
output_ports_type
 
-typedef
-internal::multifunction_input
-< input_type,
-output_ports_type, Allocator > 
fInput_type
 
-typedef
-internal::function_input_queue
-< input_type, Allocator > 
input_queue_type
 
- - - - - - - - - - - - -

Public Member Functions

-template<typename Body >
 multifunction_node (graph &g, size_t concurrency, Body body)
 
multifunction_node (const multifunction_node &other)
 
-void set_name (const char *name)
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - -

-Protected Member Functions

-void reset_node (reset_flags f)
 
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Static Protected Attributes

-static const int N = tbb::flow::tuple_size<Output>::value
 
movable_exception (const ExceptionData &data_)
 
movable_exception (const movable_exception &src) throw ()
 
+const movable_exceptionoperator= (const movable_exception &src)
 
+ExceptionData & data () throw ()
 
+const ExceptionData & data () const throw ()
 
+const char * name () const throw ()
 Returns RTTI name of the originally intercepted exception.
 
+const char * what () const throw ()
 Returns the result of originally intercepted exception's what() method.
 
movable_exceptionmove () throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
void destroy () throw ()
 Destroys objects created by the move() method. More...
 
void throw_self ()
 Throws this exception object. More...
 
- Public Member Functions inherited from tbb::tbb_exception
void operator delete (void *p)
 
- - - - - - - - + + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 

+Protected Attributes

+ExceptionData my_exception_data
 User data.
 

Detailed Description

-

template<typename Input, typename Output, typename Policy = queueing, typename Allocator = cache_aligned_allocator<Input>>
-class tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator >

+

template<typename ExceptionData>
+class tbb::movable_exception< ExceptionData >

+ +

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.

+

Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread ().

+
See Also
tbb::tbb_exception
+

Member Function Documentation

+ +
+
+
+template<typename ExceptionData >
+ + + + + +
+ + + + + + + + + + + + + +
void tbb::movable_exception< ExceptionData >::destroy ()
throw (
)
+
+inlinevirtual
+
+ +

Destroys objects created by the move() method.

+

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

+ +

Implements tbb::tbb_exception.

+ +
+
+ +
+
+
+template<typename ExceptionData >
+ + + + + +
+ + + + + + + + + + + + + +
movable_exception* tbb::movable_exception< ExceptionData >::move ()
throw (
)
+
+inlinevirtual
+
-

implements a function node that supports Input -> (set of outputs)

-

The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +

    Creates and returns pointer to the deep copy of this exception object.

    +

    Move semantics is allowed.

    + +

    Implements tbb::tbb_exception.

    + +
+
+ +
+
+
+template<typename ExceptionData >
+ + + + + +
+ + + + + + + +
void tbb::movable_exception< ExceptionData >::throw_self ()
+
+inlinevirtual
+
+ +

Throws this exception object.

+

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

+ +

Implements tbb::tbb_exception.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00109.png b/doc/html/a00109.png index e1645b517a3bbc18b8e22a253ae60bf1a4a29802..2c2e3fe83eab54ed65eb8ecc80475c8fdaf8016c 100644 Binary files a/doc/html/a00109.png and b/doc/html/a00109.png differ diff --git a/doc/html/a00110.html b/doc/html/a00110.html index 5f2cb193cf378f612101a558b199c073bdf93da5..9a608f7437ddc6950021e5dbaa08975c614c5e4d 100644 --- a/doc/html/a00110.html +++ b/doc/html/a00110.html @@ -4,7 +4,7 @@ -tbb::mutex Class Reference +tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > Class Template Reference @@ -33,140 +33,119 @@
-
tbb::mutex Class Reference
+
tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator > Class Template Reference
-

Wrapper around the platform's native reader-writer lock. +

implements a function node that supports Input -> (set of outputs) More...

-

#include <mutex.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::mutex:
+Inheritance diagram for tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator >:
- - + + +tbb::flow::interface8::graph_node
- - - - -

-Classes

class  scoped_lock
 The scoped locking pattern. More...
 
- - - - - - - + + + + + + + + + +

Public Types

enum  state_t { INITIALIZED =0x1234, -DESTROYED =0x789A, -HELD =0x56CD - }
 
-typedef LPCRITICAL_SECTION native_handle_type
 Return native_handle.
 
-typedef pthread_mutex_t * native_handle_type
 
+typedef Input input_type
 
+typedef null_type output_type
 
+typedef
+internal::wrap_tuple_elements
+< N,
+internal::multifunction_output,
+Output >::type 
output_ports_type
 
+typedef
+internal::multifunction_input
+< input_type,
+output_ports_type, Allocator > 
fInput_type
 
+typedef
+internal::function_input_queue
+< input_type, Allocator > 
input_queue_type
 
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + +

Public Member Functions

mutex ()
 Construct unacquired mutex.
 
-void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
-void unlock ()
 Release lock.
 
-native_handle_type native_handle ()
 
-void set_state (state_t to)
 Set the internal state.
 
+template<typename Body >
 multifunction_node (graph &g, size_t concurrency, Body body)
 
multifunction_node (const multifunction_node &other)
 
+void set_name (const char *name)
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
+ + +

+Protected Member Functions

+void reset_node (reset_flags f)
 
- - - - - - - + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = false
 

+Static Protected Attributes

+static const int N = tbb::flow::tuple_size<Output>::value
 
- - - + + + + + + + +

-Friends

-class scoped_lock
 

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

Detailed Description

-

Wrapper around the platform's native reader-writer lock.

-

For testing purposes only.

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
bool tbb::mutex::try_lock ()
-
-inline
-
- -

Try acquiring lock (non-blocking)

-

Return true if lock acquired; false otherwise.

+

template<typename Input, typename Output, typename Policy = queueing, typename Allocator = cache_aligned_allocator<Input>>
+class tbb::flow::interface8::multifunction_node< Input, Output, Policy, Allocator >

-

References tbb::aligned_space< T, N >::begin().

- -

Referenced by tbb::mutex::scoped_lock::try_acquire().

- -
-
-
The documentation for this class was generated from the following file:
    -
  • mutex.h
  • +

    implements a function node that supports Input -> (set of outputs)

    +

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00110.png b/doc/html/a00110.png index 5fdf55b651bc5c164a1cb34b69cc3c780cc1b9ec..e1645b517a3bbc18b8e22a253ae60bf1a4a29802 100644 Binary files a/doc/html/a00110.png and b/doc/html/a00110.png differ diff --git a/doc/html/a00111.html b/doc/html/a00111.html index 1192db24b6f4e974432fb4ca5b06fb9651777ea2..a30bcaaddde7caefe2a7505bff1c307ef7f7a97d 100644 --- a/doc/html/a00111.html +++ b/doc/html/a00111.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node Struct Reference +tbb::mutex Class Reference @@ -33,71 +33,140 @@
-
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node Struct Reference
+
tbb::mutex Class Reference
+ +

Wrapper around the platform's native reader-writer lock. + More...

+ +

#include <mutex.h>

-Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node:
+Inheritance diagram for tbb::mutex:
- - + +
+ + + + +

+Classes

class  scoped_lock
 The scoped locking pattern. More...
 
+ + + + + + + + +

+Public Types

enum  state_t { INITIALIZED =0x1234, +DESTROYED =0x789A, +HELD =0x56CD + }
 
+typedef LPCRITICAL_SECTION native_handle_type
 Return native_handle.
 
+typedef pthread_mutex_t * native_handle_type
 
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

node (const Key &key)
 
node (const Key &key, const T &t)
 
node (const Key &key, T &&t)
 
node (value_type &&i)
 
-template<typename... Args>
 node (Args &&...args)
 
node (value_type &i)
 
node (const value_type &i)
 
-void * operator new (size_t, node_allocator_type &a)
 
-void operator delete (void *ptr, node_allocator_type &a)
 
mutex ()
 Construct unacquired mutex.
 
+void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
+void unlock ()
 Release lock.
 
+native_handle_type native_handle ()
 
+void set_state (state_t to)
 Set the internal state.
 
+ + + + + + +

+Static Public Attributes

+static const bool is_rw_mutex = false
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = false
 
- - - + + +

-Public Attributes

-value_type item
 

+Friends

+class scoped_lock
 
-
The documentation for this struct was generated from the following file:
    -
  • concurrent_hash_map.h
  • +

    Detailed Description

    +

    Wrapper around the platform's native reader-writer lock.

    +

    For testing purposes only.

    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    bool tbb::mutex::try_lock ()
    +
    +inline
    +
    + +

    Try acquiring lock (non-blocking)

    +

    Return true if lock acquired; false otherwise.

    + +

    References tbb::aligned_space< T, N >::begin().

    + +

    Referenced by tbb::mutex::scoped_lock::try_acquire().

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00111.png b/doc/html/a00111.png index b91437953953383d1bdd13d2f918fcb240b393eb..5fdf55b651bc5c164a1cb34b69cc3c780cc1b9ec 100644 Binary files a/doc/html/a00111.png and b/doc/html/a00111.png differ diff --git a/doc/html/a00112.html b/doc/html/a00112.html index 2f1df279108b52795b3b3bfb5028bb5a3bfd738c..42191270d8a5e59fb12d6a68b33414a126d366e3 100644 --- a/doc/html/a00112.html +++ b/doc/html/a00112.html @@ -4,7 +4,7 @@ -tbb::null_mutex Class Reference +tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node Struct Reference @@ -33,60 +33,71 @@
-
tbb::null_mutex Class Reference
+
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node Struct Reference
- -

A mutex which does nothing. - More...

- -

#include <null_mutex.h>

-Inheritance diagram for tbb::null_mutex:
+Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::node:
- - + +
- - - - + + + + + + + + + + + + + + + + + + + +

-Classes

class  scoped_lock
 Represents acquisition of a mutex. More...
 

+Public Member Functions

node (const Key &key)
 
node (const Key &key, const T &t)
 
node (const Key &key, T &&t)
 
node (value_type &&i)
 
+template<typename... Args>
 node (Args &&...args)
 
node (value_type &i)
 
node (const value_type &i)
 
+void * operator new (size_t, node_allocator_type &a)
 
+void operator delete (void *ptr, node_allocator_type &a)
 
- - - - - - - + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = true
 
-static const bool is_fair_mutex = true
 

+Public Attributes

+value_type item
 
-

Detailed Description

-

A mutex which does nothing.

-

A null_mutex does no operation and simulates success.

-

The documentation for this class was generated from the following file:
    -
  • null_mutex.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • concurrent_hash_map.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00112.png b/doc/html/a00112.png index b72b3103da6961e7e331dd83e54bf97960852cd0..b91437953953383d1bdd13d2f918fcb240b393eb 100644 Binary files a/doc/html/a00112.png and b/doc/html/a00112.png differ diff --git a/doc/html/a00113.html b/doc/html/a00113.html index 4ca607efadb4b806eca88f59fe2c0805f6f313aa..c5ba70e0d577f5721a3ee0a8cdf4a7a7e62f502e 100644 --- a/doc/html/a00113.html +++ b/doc/html/a00113.html @@ -4,7 +4,7 @@ -tbb::null_rw_mutex Class Reference +tbb::null_mutex Class Reference @@ -33,7 +33,7 @@
-
tbb::null_rw_mutex Class Reference
+
tbb::null_mutex Class Reference
-

A rw mutex which does nothing. +

A mutex which does nothing. More...

-

#include <null_rw_mutex.h>

+

#include <null_mutex.h>

-Inheritance diagram for tbb::null_rw_mutex:
+Inheritance diagram for tbb::null_mutex:
- - + +
- - + +

Classes

class  scoped_lock
 Represents acquisition of a mutex. More...
class  scoped_lock
 Represents acquisition of a mutex. More...
 
- - - + + - - + - +

Static Public Attributes

-static const bool is_rw_mutex = true
 
+
+static const bool is_rw_mutex = false
 
static const bool is_recursive_mutex = true
 
+
 
static const bool is_fair_mutex = true
 
 

Detailed Description

-

A rw mutex which does nothing.

-

A null_rw_mutex is a rw mutex that does nothing and simulates successful operation.

+

A mutex which does nothing.

+

A null_mutex does no operation and simulates success.


The documentation for this class was generated from the following file:
    -
  • null_rw_mutex.h
  • +
  • null_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00113.png b/doc/html/a00113.png index 1ddf07110ee986746c8aac255d38381a067a83e9..b72b3103da6961e7e331dd83e54bf97960852cd0 100644 Binary files a/doc/html/a00113.png and b/doc/html/a00113.png differ diff --git a/doc/html/a00114.html b/doc/html/a00114.html index 50cc9d159a8243e9253f6854e1894a43b9cb61e5..ddc149d177cfe83af163c00c301e76f4c1b996f2 100644 --- a/doc/html/a00114.html +++ b/doc/html/a00114.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::null_type Struct Reference +tbb::null_rw_mutex Class Reference @@ -33,21 +33,60 @@
+
-
tbb::flow::interface8::null_type Struct Reference
+
tbb::null_rw_mutex Class Reference
-
The documentation for this struct was generated from the following file:
    -
  • flow_graph.h
  • + +

    A rw mutex which does nothing. + More...

    + +

    #include <null_rw_mutex.h>

    +
    +Inheritance diagram for tbb::null_rw_mutex:
    +
    +
    + + + +
    + + + + + +

    +Classes

    class  scoped_lock
     Represents acquisition of a mutex. More...
     
    + + + + + + + +

    +Static Public Attributes

    +static const bool is_rw_mutex = true
     
    +static const bool is_recursive_mutex = true
     
    +static const bool is_fair_mutex = true
     
    +

    Detailed Description

    +

    A rw mutex which does nothing.

    +

    A null_rw_mutex is a rw mutex that does nothing and simulates successful operation.

    +

    The documentation for this class was generated from the following file:
      +
    • null_rw_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00114.png b/doc/html/a00114.png new file mode 100644 index 0000000000000000000000000000000000000000..1ddf07110ee986746c8aac255d38381a067a83e9 Binary files /dev/null and b/doc/html/a00114.png differ diff --git a/doc/html/a00115.html b/doc/html/a00115.html index f9abe8ba05574d9c9aae06b74978dbcdea707c1d..25b3567694ba219807beba6c4cd915705880c86d 100644 --- a/doc/html/a00115.html +++ b/doc/html/a00115.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::num_arguments< T > Struct Template Reference +tbb::flow::interface8::null_type Struct Reference @@ -33,31 +33,21 @@
-
-
tbb::flow::interface8::num_arguments< T > Struct Template Reference
+
tbb::flow::interface8::null_type Struct Reference
- - - - -

-Static Public Attributes

-static const int value = 1
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00116.html b/doc/html/a00116.html index ca255cc7c2af691755343be9607f074181b0c9a4..4e4bdcc5e9fd9c3d7a1b3883a7d6ed9b12cae53a 100644 --- a/doc/html/a00116.html +++ b/doc/html/a00116.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > > Struct Template Reference +tbb::flow::interface8::num_arguments< T > Struct Template Reference @@ -33,23 +33,23 @@
-
tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > > Struct Template Reference
+
tbb::flow::interface8::num_arguments< T > Struct Template Reference
- - + +

Static Public Attributes

-static const int value = port_ref_impl<N1,N2>::size
 
+static const int value = 1
 

The documentation for this struct was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -57,7 +57,7 @@ static const int value

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00117.html b/doc/html/a00117.html index 98c4bf18ad667f6e86dc790ded776c7967fd0767..68b3a088baaa9f26f19e9bb8adea9686457830c0 100644 --- a/doc/html/a00117.html +++ b/doc/html/a00117.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()> Struct Template Reference +tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > > Struct Template Reference @@ -33,23 +33,23 @@
-
tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()> Struct Template Reference
+
tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > > Struct Template Reference
- - + +

Static Public Attributes

-static const int value = port_ref_impl<N1,N2>::size
 
+static const int value = port_ref_impl<N1,N2>::size
 

The documentation for this struct was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -57,7 +57,7 @@ static const int value

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00118.html b/doc/html/a00118.html index 01f37eea62cc4edaeae969c0fb4ced58b9a4e671..be64edb84cb1c0a3ec74c540205d383b675f8835 100644 --- a/doc/html/a00118.html +++ b/doc/html/a00118.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_buffer< T, Factory > Class Template Reference +tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()> Struct Template Reference @@ -33,95 +33,31 @@
-
tbb::flow::interface8::opencl_buffer< T, Factory > Class Template Reference
+
tbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()> Struct Template Reference
- - - - - - - - - - -

-Public Types

-typedef cl_mem native_object_type
 
-typedef opencl_buffer memory_object_type
 
-typedef Factory opencl_factory_type
 
-template<access_type a>
using iterator = T *
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-template<access_type a>
iterator< a > access () const
 
-T * data () const
 
-template<access_type a = read_write>
iterator< a > begin () const
 
-template<access_type a = read_write>
iterator< a > end () const
 
-size_t size () const
 
-T & operator[] (ptrdiff_t k)
 
opencl_buffer (opencl_graph &g, size_t size)
 
opencl_buffer (Factory &f, size_t size)
 
-cl_mem native_object () const
 
-const opencl_buffermemory_object () const
 
-void send (opencl_device device, dependency_msg< opencl_buffer, Factory > &dependency) const
 
-void receive (const dependency_msg< opencl_buffer, Factory > &dependency) const
 
- - - - - - + + +

-Friends

-template<typename >
class opencl_factory
 
-bool operator== (const opencl_buffer< T, Factory > &lhs, const opencl_buffer< T, Factory > &rhs)
 

+Static Public Attributes

+static const int value = port_ref_impl<N1,N2>::size
 
-
The documentation for this class was generated from the following file:
    +
    The documentation for this struct was generated from the following file:
    • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00119.html b/doc/html/a00119.html index 293b877b86efd90ee64617272706f894344fb9ac..431d81ff39c8935d10974b30cb0ecd577fe6d5dc 100644 --- a/doc/html/a00119.html +++ b/doc/html/a00119.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_buffer_impl< Factory > Class Template Reference +tbb::flow::interface8::opencl_buffer< T, Factory > Class Template Reference @@ -33,88 +33,103 @@
-
tbb::flow::interface8::opencl_buffer_impl< Factory > Class Template Reference
+
tbb::flow::interface8::opencl_buffer< T, Factory > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::opencl_buffer_impl< Factory >:
+Inheritance diagram for tbb::flow::interface8::opencl_buffer< T, Factory >:
- - -tbb::flow::interface8::opencl_memory< Factory > + + +tbb::flow::interface8::opencl_subbuffer< T, Factory >
+ + + + + + + + + + +

+Public Types

+typedef cl_mem native_object_type
 
+typedef opencl_buffer memory_object_type
 
+typedef Factory opencl_factory_type
 
+template<access_type a>
using iterator = T *
 
- - - + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +

Public Member Functions

opencl_buffer_impl (size_t size, Factory &f)
 
+
+template<access_type a>
iterator< a > access () const
 
+T * data () const
 
+template<access_type a = read_write>
iterator< a > begin () const
 
+template<access_type a = read_write>
iterator< a > end () const
 
size_t size () const
 
-void map_memory (opencl_device device, dependency_msg< void *, Factory > &dmsg)
 
- Public Member Functions inherited from tbb::flow::interface8::opencl_memory< Factory >
opencl_memory (Factory &f)
 
-cl_mem get_cl_mem () const
 
-void * get_host_ptr ()
 
-dependency_msg< void *, Factory > send (opencl_device d, const cl_event *e)
 
-dependency_msg< void *, Factory > receive (const cl_event *e)
 
 
+T & operator[] (ptrdiff_t k)
 
opencl_buffer (opencl_graph &g, size_t size)
 
opencl_buffer (Factory &f, size_t size)
 
+cl_mem native_object () const
 
+const opencl_buffermemory_object () const
 
+void send (opencl_device device, dependency_msg< opencl_buffer, Factory > &dependency) const
 
+void receive (const dependency_msg< opencl_buffer, Factory > &dependency) const
 
+opencl_subbuffer< T, Factory > subbuffer (size_t index, size_t size) const
 
- + + + - - -

Friends

+
+template<typename >
class opencl_factory
 
template<typename , typename >
class opencl_buffer
 
- - - - - - - - - - - - - - - - + + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::opencl_memory< Factory >
-cl_mem my_cl_mem
 
-tbb::atomic
-< opencl_device::device_id_type > 
my_curr_device_id
 
-void * my_host_ptr
 
-Factory * my_factory
 
-tbb::spin_mutex my_sending_lock
 
-bool my_sending_event_present
 
-cl_event my_sending_event
 
class opencl_subbuffer
 
+bool operator== (const opencl_buffer< T, Factory > &lhs, const opencl_buffer< T, Factory > &rhs)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -122,7 +137,7 @@ cl_event my_sending_event<

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00119.png b/doc/html/a00119.png index 1aeec1a09162791a3622ed848edeab770034d768..404ed8a75045dc23cdcb00f2fdd9763930d10d63 100644 Binary files a/doc/html/a00119.png and b/doc/html/a00119.png differ diff --git a/doc/html/a00120.html b/doc/html/a00120.html index 75965547cbaae8c1d1260b01ff6af82cd1f4be08..04ccfc4b69df74111e2f9732d028c95bf857f381 100644 --- a/doc/html/a00120.html +++ b/doc/html/a00120.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_device Class Reference +tbb::flow::interface8::opencl_buffer_impl< Factory > Class Template Reference @@ -33,119 +33,94 @@
-
tbb::flow::interface8::opencl_device Class Reference
+
tbb::flow::interface8::opencl_buffer_impl< Factory > Class Template Reference
+
+Inheritance diagram for tbb::flow::interface8::opencl_buffer_impl< Factory >:
+
+
+ + +tbb::flow::interface8::opencl_memory< Factory > + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-std::string platform_profile () const
 
-std::string platform_version () const
 
-std::string platform_name () const
 
-std::string platform_vendor () const
 
-std::string platform_extensions () const
 
-template<typename T >
void info (cl_device_info i, T &t) const
 
-std::string version () const
 
-int major_version () const
 
-int minor_version () const
 
-bool out_of_order_exec_mode_on_host_present () const
 
-bool out_of_order_exec_mode_on_device_present () const
 
-std::array< size_t, 3 > max_work_item_sizes () const
 
-size_t max_work_group_size () const
 
-bool built_in_kernel_available (const std::string &k) const
 
-std::string built_in_kernels () const
 
-std::string name () const
 
-cl_bool available () const
 
-cl_bool compiler_available () const
 
-cl_bool linker_available () const
 
-bool extension_available (const std::string &ext) const
 
-std::string extensions () const
 
-cl_device_type type () const
 
-std::string vendor () const
 
-cl_uint address_bits () const
 
opencl_buffer_impl (size_t size, Factory &f)
 
opencl_buffer_impl (cl_mem m, size_t index, size_t size, Factory &f)
 
+size_t size () const
 
+void map_memory (opencl_device device, dependency_msg< void *, Factory > &dmsg)
 
- Public Member Functions inherited from tbb::flow::interface8::opencl_memory< Factory >
opencl_memory (Factory &f)
 
+cl_mem get_cl_mem () const
 
+void * get_host_ptr ()
 
+Factory * factory () const
 
+dependency_msg< void *, Factory > send (opencl_device d, const cl_event *e)
 
+dependency_msg< void *, Factory > receive (const cl_event *e)
 
- - - - - - - - - - - +template<typename , typename > - - +

Friends

-template<typename DeviceFilter >
class opencl_factory
 
-template<typename Factory >
class opencl_memory
 
-template<typename Factory >
class opencl_program
 
-class opencl_foundation
 
-template<typename T , typename Factory >
class opencl_buffer
 
-bool operator== (opencl_device d1, opencl_device d2)
 
+ + + + + + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::opencl_memory< Factory >
+cl_mem my_cl_mem
 
+tbb::atomic
+< opencl_device::device_id_type > 
my_curr_device_id
 
+void * my_host_ptr
 
+Factory * my_factory
 
+tbb::spin_mutex my_sending_lock
 
+bool my_sending_event_present
 
+cl_event my_sending_event
 

The documentation for this class was generated from the following file:
-
tbb::flow::interface8::opencl_device_list Class Reference
+
tbb::flow::interface8::opencl_device Class Reference
- - - - - - + + + +

Public Types

-typedef container_type::iterator iterator
 
-typedef
-container_type::const_iterator 
const_iterator
 
-typedef container_type::size_type size_type
 
enum  : device_id_type { unknown = device_id_type( -2 ), +host = device_id_type( -1 ) + }
 
+typedef size_t device_id_type
 
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

opencl_device_list (std::initializer_list< opencl_device > il)
 
-void add (opencl_device d)
 
-size_type size () const
 
-iterator begin ()
 
-iterator end ()
 
-const_iterator begin () const
 
-const_iterator end () const
 
-const_iterator cbegin () const
 
-const_iterator cend () const
 
opencl_device (cl_device_id cl_d_id, device_id_type device_id)
 
+std::string platform_profile () const
 
+std::string platform_version () const
 
+std::string platform_name () const
 
+std::string platform_vendor () const
 
+std::string platform_extensions () const
 
+template<typename T >
void info (cl_device_info i, T &t) const
 
+std::string version () const
 
+int major_version () const
 
+int minor_version () const
 
+bool out_of_order_exec_mode_on_host_present () const
 
+bool out_of_order_exec_mode_on_device_present () const
 
+std::array< size_t, 3 > max_work_item_sizes () const
 
+size_t max_work_group_size () const
 
+bool built_in_kernel_available (const std::string &k) const
 
+std::string built_in_kernels () const
 
+std::string name () const
 
+cl_bool available () const
 
+cl_bool compiler_available () const
 
+cl_bool linker_available () const
 
+bool extension_available (const std::string &ext) const
 
+std::string extensions () const
 
+cl_device_type type () const
 
+std::string vendor () const
 
+cl_uint address_bits () const
 
+cl_device_id device_id () const
 
+cl_command_queue command_queue () const
 
+void set_command_queue (cl_command_queue cmd_queue)
 
+ + + + + + + + + + + + + + + + +

+Friends

+template<typename DeviceFilter >
class opencl_factory
 
+template<typename Factory >
class opencl_memory
 
+template<typename Factory >
class opencl_program
 
+class opencl_foundation
 
+template<typename T , typename Factory >
class opencl_buffer
 
+bool operator== (opencl_device d1, opencl_device d2)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -95,7 +176,7 @@ const_iterator cend ()

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00122.html b/doc/html/a00122.html index 0fd4e5902bb57cc4e53cd7be7695c191d7f3a382..e8f8543129c5778309d949750141241e44b09860 100644 --- a/doc/html/a00122.html +++ b/doc/html/a00122.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_device_with_key< Key > Class Template Reference +tbb::flow::interface8::opencl_device_list Class Reference @@ -33,29 +33,61 @@
-
tbb::flow::interface8::opencl_device_with_key< Key > Class Template Reference
+
tbb::flow::interface8::opencl_device_list Class Reference
+ + + + + + + +

+Public Types

+typedef container_type::iterator iterator
 
+typedef
+container_type::const_iterator 
const_iterator
 
+typedef container_type::size_type size_type
 
- - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

opencl_device_with_key (opencl_device d, Key k)
 
-Key key () const
 
-opencl_device device () const
 
opencl_device_list (std::initializer_list< opencl_device > il)
 
+void add (opencl_device d)
 
+size_type size () const
 
+iterator begin ()
 
+iterator end ()
 
+const_iterator begin () const
 
+const_iterator end () const
 
+const_iterator cbegin () const
 
+const_iterator cend () const
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -63,7 +95,7 @@ Key key () const

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00123.html b/doc/html/a00123.html index 6399926773f33ef56ba4a2b72e9bddde21294194..f32364c917a1630ecae1dc8714d8fc4590f3f781 100644 --- a/doc/html/a00123.html +++ b/doc/html/a00123.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_factory< DeviceFilter > Class Template Reference +tbb::flow::interface8::opencl_device_with_key< Key > Class Template Reference @@ -33,46 +33,29 @@
-
tbb::flow::interface8::opencl_factory< DeviceFilter > Class Template Reference
+
tbb::flow::interface8::opencl_device_with_key< Key > Class Template Reference
- - - - -

Public Member Functions

opencl_factory (opencl_graph &g)
 
-bool init (const opencl_device_list &device_list)
 
- - - - - - - - - - - - - + + + + + +

-Friends

-template<typename Factory >
class opencl_program
 
-template<typename Factory >
class opencl_buffer_impl
 
-template<typename Factory >
class opencl_memory
 
-template<typename... Args>
class opencl_node
 
opencl_device_with_key (opencl_device d, Key k)
 
+Key key () const
 
+opencl_device device () const
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -80,7 +63,7 @@ template<typename... Args>

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00124.html b/doc/html/a00124.html index 7e58567c7d6c2adae1c4acdbc7422bd6f461a007..85618158cb95143a031595fc7ca0bbc8cdf67825 100644 --- a/doc/html/a00124.html +++ b/doc/html/a00124.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_foundation Class Reference +tbb::flow::interface8::opencl_factory< DeviceFilter > Class Template Reference @@ -33,41 +33,46 @@
-
tbb::flow::interface8::opencl_foundation Class Reference
+
tbb::flow::interface8::opencl_factory< DeviceFilter > Class Template Reference
-
-Inheritance diagram for tbb::flow::interface8::opencl_foundation:
-
-
- - - -
- - - - - - - - + + + + +

Public Member Functions

opencl_foundation (opencl_graph &g)
 
-default_opencl_factoryget_default_opencl_factory ()
 
-const opencl_device_listget_all_devices ()
 
-default_device_selector_type get_default_device_selector ()
 
opencl_factory (opencl_graph &g)
 
+bool init (const opencl_device_list &device_list)
 
+ + + + + + + + + + + + +

+Friends

+template<typename Factory >
class opencl_program
 
+template<typename Factory >
class opencl_buffer_impl
 
+template<typename Factory >
class opencl_memory
 
+template<typename... Args>
class opencl_node
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -75,7 +80,7 @@ default_device_selector_type 

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00124.png b/doc/html/a00124.png deleted file mode 100644 index 947fbde9e6a5786ccb69c7f170ba36ac2f8e6b84..0000000000000000000000000000000000000000 Binary files a/doc/html/a00124.png and /dev/null differ diff --git a/doc/html/a00125.html b/doc/html/a00125.html index 7cd7380cb0d88d4fae9e2ae6717438bb1c887c04..bc7626cfa6c1c2f022d4378da69ef2a0ac47cfe2 100644 --- a/doc/html/a00125.html +++ b/doc/html/a00125.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_graph Class Reference +tbb::flow::interface8::opencl_foundation Class Reference @@ -33,173 +33,41 @@
-
tbb::flow::interface8::opencl_graph Class Reference
+
tbb::flow::interface8::opencl_foundation Class Reference
-Inheritance diagram for tbb::flow::interface8::opencl_graph:
+Inheritance diagram for tbb::flow::interface8::opencl_foundation:
- - -tbb::flow::interface8::graph + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

opencl_graph ()
 Constructs a graph with isolated task_group_context.
 
opencl_graph (task_group_context &context)
 Constructs a graph with an user context.
 
~opencl_graph ()
 Destroys a graph.
 
-const opencl_device_listavailable_devices ()
 Available devices.
 
-default_opencl_factoryopencl_factory ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph
graph ()
 Constructs a graph with isolated task_group_context.
 
graph (task_group_context &use_this_context)
 Constructs a graph with use_this_context as context.
 
 ~graph ()
 Destroys the graph. More...
 
-void set_name (const char *name)
 
void increment_wait_count ()
 Used to register that an external entity may still interact with the graph. More...
 
void decrement_wait_count ()
 Deregisters an external entity that may have interacted with the graph. More...
 
template<typename Receiver , typename Body >
void run (Receiver &r, Body body)
 Spawns a task that runs a body and puts its output to a specific receiver. More...
 
template<typename Body >
void run (Body body)
 Spawns a task that runs a function object. More...
 
void wait_for_all ()
 Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. More...
 
-task * root_task ()
 Returns the root task of the graph.
 
-void set_active (bool a=true)
 
-bool is_active ()
 
-void add_task_to_reset_list (task *tp)
 
-iterator begin ()
 start iterator
 
-iterator end ()
 end iterator
 
-const_iterator begin () const
 start const iterator
 
-const_iterator end () const
 end const iterator
 
-const_iterator cbegin () const
 start const iterator
 
-const_iterator cend () const
 end const iterator
 
-bool is_cancelled ()
 return status of graph execution
 
-bool exception_thrown ()
 
-void reset (reset_flags f=rf_reset_protocol)
 
- - - -

-Protected Member Functions

-opencl_foundationget_opencl_foundation ()
 
- - - -

-Protected Attributes

-opencl_foundationmy_opencl_foundation
 
- - - - - - - - - - - - - -

-Friends

-template<typename T , typename Factory >
class opencl_buffer
 
-template<cl_channel_order channel_order, cl_channel_type channel_type, typename Factory >
class opencl_image2d
 
-template<typename... Args>
class opencl_node
 
-template<typename DeviceFilter >
class opencl_factory
 
- - - - - - + + + + + + + +

-Additional Inherited Members

- Public Types inherited from tbb::flow::interface8::graph
-typedef graph_iterator< graph,
-graph_node
iterator
 
-typedef graph_iterator< const
-graph, const graph_node
const_iterator
 
opencl_foundation (opencl_graph &g)
 
+default_opencl_factoryget_default_opencl_factory ()
 
+const opencl_device_listget_all_devices ()
 
+default_device_selector_type get_default_device_selector ()
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -207,7 +75,7 @@ typedef graph_iterator< const

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00125.png b/doc/html/a00125.png index c20726344086f10d15ad0479d581b98205a4f047..947fbde9e6a5786ccb69c7f170ba36ac2f8e6b84 100644 Binary files a/doc/html/a00125.png and b/doc/html/a00125.png differ diff --git a/doc/html/a00126.html b/doc/html/a00126.html index 041efa71ea7f5f347eeee25e718193879b4a617b..b45cff87674bd1f913681a442d1ced8dbfebd3c8 100644 --- a/doc/html/a00126.html +++ b/doc/html/a00126.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_memory< Factory > Class Template Reference +tbb::flow::interface8::opencl_graph Class Reference @@ -33,73 +33,173 @@
-
tbb::flow::interface8::opencl_memory< Factory > Class Template Referenceabstract
+
tbb::flow::interface8::opencl_graph Class Reference
-Inheritance diagram for tbb::flow::interface8::opencl_memory< Factory >:
+Inheritance diagram for tbb::flow::interface8::opencl_graph:
- - -tbb::flow::interface8::opencl_buffer_impl< Factory > + + +tbb::flow::interface8::graph
- - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

opencl_memory (Factory &f)
 
-cl_mem get_cl_mem () const
 
-void * get_host_ptr ()
 
-dependency_msg< void *, Factory > send (opencl_device d, const cl_event *e)
 
-dependency_msg< void *, Factory > receive (const cl_event *e)
 
-virtual void map_memory (opencl_device, dependency_msg< void *, Factory > &)=0
 
opencl_graph ()
 Constructs a graph with isolated task_group_context.
 
opencl_graph (task_group_context &context)
 Constructs a graph with an user context.
 
~opencl_graph ()
 Destroys a graph.
 
+const opencl_device_listavailable_devices ()
 Available devices.
 
+default_opencl_factoryopencl_factory ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph
graph ()
 Constructs a graph with isolated task_group_context.
 
graph (task_group_context &use_this_context)
 Constructs a graph with use_this_context as context.
 
 ~graph ()
 Destroys the graph. More...
 
+void set_name (const char *name)
 
void increment_wait_count ()
 Used to register that an external entity may still interact with the graph. More...
 
void decrement_wait_count ()
 Deregisters an external entity that may have interacted with the graph. More...
 
template<typename Receiver , typename Body >
void run (Receiver &r, Body body)
 Spawns a task that runs a body and puts its output to a specific receiver. More...
 
template<typename Body >
void run (Body body)
 Spawns a task that runs a function object. More...
 
void wait_for_all ()
 Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. More...
 
+task * root_task ()
 Returns the root task of the graph.
 
+void set_active (bool a=true)
 
+bool is_active ()
 
+void add_task_to_reset_list (task *tp)
 
+iterator begin ()
 start iterator
 
+iterator end ()
 end iterator
 
+const_iterator begin () const
 start const iterator
 
+const_iterator end () const
 end const iterator
 
+const_iterator cbegin () const
 start const iterator
 
+const_iterator cend () const
 end const iterator
 
+bool is_cancelled ()
 return status of graph execution
 
+bool exception_thrown ()
 
+void reset (reset_flags f=rf_reset_protocol)
 
+ + +

+Protected Member Functions

+opencl_foundationget_opencl_foundation ()
 
- - - - - - - - - - - - - - + + +

Protected Attributes

-cl_mem my_cl_mem
 
-tbb::atomic
-< opencl_device::device_id_type > 
my_curr_device_id
 
-void * my_host_ptr
 
-Factory * my_factory
 
-tbb::spin_mutex my_sending_lock
 
-bool my_sending_event_present
 
-cl_event my_sending_event
 
+opencl_foundationmy_opencl_foundation
 
+ + + + + + + + + + + + + +

+Friends

+template<typename T , typename Factory >
class opencl_buffer
 
+template<cl_channel_order channel_order, cl_channel_type channel_type, typename Factory >
class opencl_image2d
 
+template<typename... Args>
class opencl_node
 
+template<typename DeviceFilter >
class opencl_factory
 
+ + + + + +

+Additional Inherited Members

- Public Types inherited from tbb::flow::interface8::graph
+typedef graph_iterator< graph,
+graph_node
iterator
 
+typedef graph_iterator< const
+graph, const graph_node
const_iterator
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -107,7 +207,7 @@ cl_event my_sending_event<

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00126.png b/doc/html/a00126.png index d90f28a575f42779aa61fe29c305fe1fc55dba1c..c20726344086f10d15ad0479d581b98205a4f047 100644 Binary files a/doc/html/a00126.png and b/doc/html/a00126.png differ diff --git a/doc/html/a00127.html b/doc/html/a00127.html index 2f6a64f468a161aa13ee03584310e650a5415dec..999e8a6a8158eee210be8e4b6d8c60f324164941 100644 --- a/doc/html/a00127.html +++ b/doc/html/a00127.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_node< Args > Class Template Reference +tbb::flow::interface8::opencl_memory< Factory > Class Template Reference @@ -33,21 +33,84 @@
+
-
tbb::flow::interface8::opencl_node< Args > Class Template Reference
+
tbb::flow::interface8::opencl_memory< Factory > Class Template Referenceabstract
+
+Inheritance diagram for tbb::flow::interface8::opencl_memory< Factory >:
+
+
+ + +tbb::flow::interface8::opencl_buffer_impl< Factory > + +
+ + + + + + + + + + + + + + + + +

+Public Member Functions

opencl_memory (Factory &f)
 
+cl_mem get_cl_mem () const
 
+void * get_host_ptr ()
 
+Factory * factory () const
 
+dependency_msg< void *, Factory > send (opencl_device d, const cl_event *e)
 
+dependency_msg< void *, Factory > receive (const cl_event *e)
 
+virtual void map_memory (opencl_device, dependency_msg< void *, Factory > &)=0
 
+ + + + + + + + + + + + + + + +

+Protected Attributes

+cl_mem my_cl_mem
 
+tbb::atomic
+< opencl_device::device_id_type > 
my_curr_device_id
 
+void * my_host_ptr
 
+Factory * my_factory
 
+tbb::spin_mutex my_sending_lock
 
+bool my_sending_event_present
 
+cl_event my_sending_event
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00127.png b/doc/html/a00127.png new file mode 100644 index 0000000000000000000000000000000000000000..d90f28a575f42779aa61fe29c305fe1fc55dba1c Binary files /dev/null and b/doc/html/a00127.png differ diff --git a/doc/html/a00128.html b/doc/html/a00128.html index e8dbb45b6a0a70bfe3c1a4cd3668633b264ee6f0..4c223684bf0d0e94ac44cec00cc33102aaf81913 100644 --- a/doc/html/a00128.html +++ b/doc/html/a00128.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_node< tuple< Ports...> > Class Template Reference +tbb::flow::interface8::opencl_node< Args > Class Template Reference @@ -33,47 +33,21 @@
-
-
tbb::flow::interface8::opencl_node< tuple< Ports...> > Class Template Reference
+
tbb::flow::interface8::opencl_node< Args > Class Template Reference
-
-Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...> >:
-
-
- - -tbb::flow::interface8::opencl_node< tuple< Ports...>, queueing, default_opencl_factory > - -
- - - - - - - - - -

-Public Member Functions

opencl_node (opencl_graph &g, const std::string &kernel)
 
opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel)
 
-template<typename DeviceSelector >
 opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel, DeviceSelector d)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00128.png b/doc/html/a00128.png deleted file mode 100644 index 8a1801fad08c31bb970565697485fc2d866b4299..0000000000000000000000000000000000000000 Binary files a/doc/html/a00128.png and /dev/null differ diff --git a/doc/html/a00129.html b/doc/html/a00129.html index 6ef4967028cd30648e0a27fa1d9892898290af82..85d04aadc2bdc4807a632baefd47e0b805e49522 100644 --- a/doc/html/a00129.html +++ b/doc/html/a00129.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_node< tuple< Ports...>, JP > Class Template Reference +tbb::flow::interface8::opencl_node< tuple< Ports...> > Class Template Reference @@ -33,39 +33,39 @@
-
tbb::flow::interface8::opencl_node< tuple< Ports...>, JP > Class Template Reference
+
tbb::flow::interface8::opencl_node< tuple< Ports...> > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...>, JP >:
+Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...> >:
- - -tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, default_opencl_factory > + + +tbb::flow::interface8::opencl_node< tuple< Ports...>, queueing, default_opencl_factory >
- - - - - + + + + - - + +

Public Member Functions

opencl_node (opencl_graph &g, const std::string &kernel)
 
opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel)
 
+
opencl_node (opencl_graph &g, const std::string &kernel)
 
opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel)
 
template<typename DeviceSelector >
 opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel, DeviceSelector d)
 
 opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel, DeviceSelector d)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -73,7 +73,7 @@ template<typename DeviceSelector >

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00129.png b/doc/html/a00129.png index 14dcd5dbe1e4fdcaab0b1829c36911047e7ee7ce..8a1801fad08c31bb970565697485fc2d866b4299 100644 Binary files a/doc/html/a00129.png and b/doc/html/a00129.png differ diff --git a/doc/html/a00130.html b/doc/html/a00130.html index b1add1dcaa76bd843ac92b1162c57829bd0ceed0..a7147265339f51cc0ccdc5689fb31e8eea352337 100644 --- a/doc/html/a00130.html +++ b/doc/html/a00130.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory > Class Template Reference +tbb::flow::interface8::opencl_node< tuple< Ports...>, JP > Class Template Reference @@ -33,78 +33,39 @@
-
tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory > Class Template Reference
+
tbb::flow::interface8::opencl_node< tuple< Ports...>, JP > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory >:
+Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...>, JP >:
- - -tbb::flow::interface8::composite_node< tuple< dependency_msg< Ports, Factory >...>, tuple< dependency_msg< Ports, Factory >...> > + + +tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, default_opencl_factory >
- + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

+
opencl_node (opencl_graph &g, const std::string &kernel)
 
opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel)
 
template<typename DeviceSelector >
 opencl_node (opencl_graph &g, const opencl_program< Factory > &p, const std::string &kernel_name, DeviceSelector d, Factory &f)
 
opencl_node (opencl_graph &g, const opencl_program< Factory > &p, const std::string &kernel_name, Factory &f)
 
opencl_node (const opencl_node &node)
 
opencl_node (opencl_node &&node)
 
-template<typename T >
void set_ndranges (std::initializer_list< T > global_work_size)
 
-template<typename GlobalNDRange >
void set_ndranges (GlobalNDRange &&global_work_size)
 
-template<typename T , typename LocalNDRange >
void set_ndranges (std::initializer_list< T > global_work_size, LocalNDRange &&local_work_size)
 
-template<typename T1 , typename T2 = T1>
void set_ndranges (std::initializer_list< T1 > global_work_size, std::initializer_list< T2 > local_work_size)
 
-template<typename GlobalNDRange , typename LocalNDRange >
void set_ndranges (GlobalNDRange &&global_work_size, LocalNDRange &&local_work_size)
 
-template<typename GlobalNDRange , typename T >
void set_ndranges (GlobalNDRange &&global_work_size, std::initializer_list< T > local_work_size)
 
-template<typename... Args>
void set_args (Args &&...args)
 
- - - + +

-Protected Member Functions

-void reset_node (reset_flags=rf_reset_protocol)
 
 opencl_node (opencl_graph &g, const opencl_program< default_opencl_factory > &p, const std::string &kernel, DeviceSelector d)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -112,7 +73,7 @@ void reset_node (reset

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00130.png b/doc/html/a00130.png index 36dff1d29d9364b93d73fc3e0b7d37a6db3d9041..14dcd5dbe1e4fdcaab0b1829c36911047e7ee7ce 100644 Binary files a/doc/html/a00130.png and b/doc/html/a00130.png differ diff --git a/doc/html/a00131.html b/doc/html/a00131.html index 36f4d8ae8bdd66d02e55e4d7ad3e4a497ea6f71d..f17301ef8138ab0baaf0aeee6a145c284249ee67 100644 --- a/doc/html/a00131.html +++ b/doc/html/a00131.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::opencl_program< Factory > Class Template Reference +tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory > Class Template Reference @@ -33,49 +33,78 @@
-
tbb::flow::interface8::opencl_program< Factory > Class Template Reference
+
tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::opencl_program< Factory >:
+Inheritance diagram for tbb::flow::interface8::opencl_node< tuple< Ports...>, JP, Factory >:
- - + + +tbb::flow::interface8::composite_node< tuple< dependency_msg< Ports, Factory >...>, tuple< dependency_msg< Ports, Factory >...> >
- - - - - - - - -

Public Member Functions

opencl_program (opencl_program_type type, const std::string &program_name)
 
opencl_program (const char *program_name)
 
opencl_program (const std::string &program_name)
 
opencl_program (const opencl_program &src)
 
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + +

-Friends

+
+template<typename DeviceSelector >
 opencl_node (opencl_graph &g, const opencl_program< Factory > &p, const std::string &kernel_name, DeviceSelector d, Factory &f)
 
opencl_node (opencl_graph &g, const opencl_program< Factory > &p, const std::string &kernel_name, Factory &f)
 
opencl_node (const opencl_node &node)
 
opencl_node (opencl_node &&node)
 
+template<typename T >
void set_ndranges (std::initializer_list< T > global_work_size)
 
+template<typename GlobalNDRange >
void set_ndranges (GlobalNDRange &&global_work_size)
 
+template<typename T , typename LocalNDRange >
void set_ndranges (std::initializer_list< T > global_work_size, LocalNDRange &&local_work_size)
 
+template<typename T1 , typename T2 = T1>
void set_ndranges (std::initializer_list< T1 > global_work_size, std::initializer_list< T2 > local_work_size)
 
+template<typename GlobalNDRange , typename LocalNDRange >
void set_ndranges (GlobalNDRange &&global_work_size, LocalNDRange &&local_work_size)
 
+template<typename GlobalNDRange , typename T >
void set_ndranges (GlobalNDRange &&global_work_size, std::initializer_list< T > local_work_size)
 
template<typename... Args>
class opencl_node
 
void set_args (Args &&...args)
 
+ + +

+Protected Member Functions

+void reset_node (reset_flags=rf_reset_protocol)
 

The documentation for this class was generated from the following file:
  • flow_graph_opencl_node.h
  • @@ -83,7 +112,7 @@ template<typename... Args>

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00131.png b/doc/html/a00131.png index 1e59d8d4142575ad7b12c98366e1f3581c5b7db7..36dff1d29d9364b93d73fc3e0b7d37a6db3d9041 100644 Binary files a/doc/html/a00131.png and b/doc/html/a00131.png differ diff --git a/doc/html/a00132.html b/doc/html/a00132.html index 647f954cf255e96327ab63ff76a2ef38c58afdfd..b3a059623d8751e123ce5f5ce64dca0ebb852a77 100644 --- a/doc/html/a00132.html +++ b/doc/html/a00132.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::overwrite_node< T > Class Template Reference +tbb::flow::interface8::opencl_program< Factory > Class Template Reference @@ -33,270 +33,57 @@
-
tbb::flow::interface8::overwrite_node< T > Class Template Reference
+
tbb::flow::interface8::opencl_program< Factory > Class Template Reference
-Inheritance diagram for tbb::flow::interface8::overwrite_node< T >:
+Inheritance diagram for tbb::flow::interface8::opencl_program< Factory >:
- - -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > -tbb::flow::interface8::write_once_node< T > + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef receiver< input_type >
-::built_predecessors_type 
built_predecessors_type
 
-typedef sender< output_type >
-::built_successors_type 
built_successors_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

overwrite_node (graph &g)
 
overwrite_node (const overwrite_node &src)
 
-void set_name (const char *name)
 
-bool register_successor (successor_type &s)
 Add a new successor to this node.
 
-bool remove_successor (successor_type &s)
 Removes a successor from this node.
 
-built_predecessors_typebuilt_predecessors ()
 
-built_successors_typebuilt_successors ()
 
-void internal_add_built_successor (successor_type &s)
 
-void internal_delete_built_successor (successor_type &s)
 
-size_t successor_count ()
 
-void copy_successors (successor_list_type &v)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void extract ()
 
-bool try_get (input_type &v)
 Request an item from the sender.
 
-bool is_valid ()
 
-void clear ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
-virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
- - - - - - - - - - -

-Protected Member Functions

-task * try_put_task (const input_type &v)
 
-void reset_receiver (reset_flags)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - - - - - - - - - + + + + + + + +

-Protected Attributes

-spin_mutex my_mutex
 
-internal::broadcast_cache
-< input_type, null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-input_type my_buffer
 
-bool my_buffer_is_valid
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
opencl_program (opencl_program_type type, const std::string &program_name)
 
opencl_program (const char *program_name)
 
opencl_program (const std::string &program_name)
 
opencl_program (const opencl_program &src)
 
- - - - - - - - - + + +

Friends

-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
+template<typename... Args>
class opencl_node
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00132.png b/doc/html/a00132.png index 4954ba93a5c477b66f580082a8788a157eef45b9..1e59d8d4142575ad7b12c98366e1f3581c5b7db7 100644 Binary files a/doc/html/a00132.png and b/doc/html/a00132.png differ diff --git a/doc/html/a00133.html b/doc/html/a00133.html index a243a5801163605589b530b5150b632abc899f85..5ad6cd22d4a12b168b6c83dcfdec807045ac8161 100644 --- a/doc/html/a00133.html +++ b/doc/html/a00133.html @@ -4,7 +4,7 @@ -tbb::parallel_do_feeder< Item > Class Template Reference +tbb::flow::interface8::opencl_subbuffer< T, Factory > Class Template Reference @@ -33,64 +33,100 @@
-
tbb::parallel_do_feeder< Item > Class Template Referenceabstract
+
tbb::flow::interface8::opencl_subbuffer< T, Factory > Class Template Reference
- -

Class the user supplied algorithm body uses to add new tasks. - More...

- -

#include <parallel_do.h>

-Inheritance diagram for tbb::parallel_do_feeder< Item >:
+Inheritance diagram for tbb::flow::interface8::opencl_subbuffer< T, Factory >:
- - + + +tbb::flow::interface8::opencl_buffer< T, Factory >
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-void add (const Item &item)
 Add a work item to a running parallel_do.
 
opencl_subbuffer (const opencl_buffer< T, Factory > &owner, size_t index, size_t size)
 
- Public Member Functions inherited from tbb::flow::interface8::opencl_buffer< T, Factory >
+template<access_type a>
iterator< a > access () const
 
+T * data () const
 
+template<access_type a = read_write>
iterator< a > begin () const
 
+template<access_type a = read_write>
iterator< a > end () const
 
+size_t size () const
 
+T & operator[] (ptrdiff_t k)
 
opencl_buffer (opencl_graph &g, size_t size)
 
opencl_buffer (Factory &f, size_t size)
 
+cl_mem native_object () const
 
+const opencl_buffermemory_object () const
 
+void send (opencl_device device, dependency_msg< opencl_buffer, Factory > &dependency) const
 
+void receive (const dependency_msg< opencl_buffer, Factory > &dependency) const
 
+opencl_subbuffer< T, Factory > subbuffer (size_t index, size_t size) const
 
- - - - + + + + + + + + + + +

-Friends

-template<typename Body_ , typename Item_ >
class internal::parallel_do_feeder_impl
 

+Additional Inherited Members

- Public Types inherited from tbb::flow::interface8::opencl_buffer< T, Factory >
+typedef cl_mem native_object_type
 
+typedef opencl_buffer memory_object_type
 
+typedef Factory opencl_factory_type
 
+template<access_type a>
using iterator = T *
 
-

Detailed Description

-

template<typename Item>
-class tbb::parallel_do_feeder< Item >

- -

Class the user supplied algorithm body uses to add new tasks.

-
Parameters
- - -
ItemWork item type
-
-
-

The documentation for this class was generated from the following file:
    -
  • parallel_do.h
  • +
    The documentation for this class was generated from the following file:
      +
    • flow_graph_opencl_node.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00133.png b/doc/html/a00133.png index 742cad9d022194b018303bb7554cb51173cd3a64..397bb716305b2f8e113cf24a8cfbd7fe3048d794 100644 Binary files a/doc/html/a00133.png and b/doc/html/a00133.png differ diff --git a/doc/html/a00134.html b/doc/html/a00134.html index 7628cf9b90b1cca855e1302097bcf3de2acd55ae..fffa28cda9daaf776be528f79d0ce1e7ef4ca498 100644 --- a/doc/html/a00134.html +++ b/doc/html/a00134.html @@ -4,7 +4,7 @@ -tbb::parallel_while< Body > Class Template Reference +tbb::flow::interface8::overwrite_node< T > Class Template Reference @@ -33,130 +33,270 @@
-
tbb::parallel_while< Body > Class Template Reference
+
tbb::flow::interface8::overwrite_node< T > Class Template Reference
- -

Parallel iteration over a stream, with optional addition of more work. - More...

- -

#include <parallel_while.h>

-Inheritance diagram for tbb::parallel_while< Body >:
+Inheritance diagram for tbb::flow::interface8::overwrite_node< T >:
- - + + +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T > +tbb::flow::interface8::write_once_node< T >
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

-typedef Body::argument_type value_type
 Type of items.
 
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef receiver< input_type >
+::built_predecessors_type 
built_predecessors_type
 
+typedef sender< output_type >
+::built_successors_type 
built_successors_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

parallel_while ()
 Construct empty non-running parallel while.
 
~parallel_while ()
 Destructor cleans up data members before returning.
 
template<typename Stream >
void run (Stream &stream, const Body &body)
 Apply body.apply to each item in the stream. More...
 
void add (const value_type &item)
 Add a work item while running. More...
 
overwrite_node (graph &g)
 
overwrite_node (const overwrite_node &src)
 
+void set_name (const char *name)
 
+bool register_successor (successor_type &s)
 Add a new successor to this node.
 
+bool remove_successor (successor_type &s)
 Removes a successor from this node.
 
+built_predecessors_typebuilt_predecessors ()
 
+built_successors_typebuilt_successors ()
 
+void internal_add_built_successor (successor_type &s)
 
+void internal_delete_built_successor (successor_type &s)
 
+size_t successor_count ()
 
+void copy_successors (successor_list_type &v)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void extract ()
 
+bool try_get (input_type &v)
 Request an item from the sender.
 
+bool is_valid ()
 
+void clear ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
+virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+ + + + + + + + + + +

+Protected Member Functions

+task * try_put_task (const input_type &v)
 
+void reset_receiver (reset_flags)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + + + + + + + + + + +

+Protected Attributes

+spin_mutex my_mutex
 
+internal::broadcast_cache
+< input_type, null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+input_type my_buffer
 
+bool my_buffer_is_valid
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 
+ + + + + + + + + +

+Friends

+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
-

Detailed Description

-

template<typename Body>
-class tbb::parallel_while< Body >

- -

Parallel iteration over a stream, with optional addition of more work.

-

The Body b has the requirement:
- "b(v)"
- "b.argument_type"
- where v is an argument_type

-

Member Function Documentation

- -
-
-
-template<typename Body >
- - - - - - - - -
void tbb::parallel_while< Body >::add (const value_typeitem)
-
- -

Add a work item while running.

-

Should be executed only by body.apply or a thread spawned therefrom.

- -
-
- -
-
-
-template<typename Body >
-
-template<typename Stream >
- - - - - - - - - - - - - - - - - - -
void tbb::parallel_while< Body >::run (Stream & stream,
const Body & body 
)
-
- -

Apply body.apply to each item in the stream.

-

A Stream s has the requirements
- "S::value_type"
- "s.pop_if_present(value) is convertible to bool

- -
-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00134.png b/doc/html/a00134.png index fc86480fb6f62f64fddf8d2c87db84e764fa7982..4954ba93a5c477b66f580082a8788a157eef45b9 100644 Binary files a/doc/html/a00134.png and b/doc/html/a00134.png differ diff --git a/doc/html/a00135.html b/doc/html/a00135.html index 26fe190e1880f6d9ed9e6047a8f855735b2aca64..bb5e121e6aad51aa3755aaaac991e6961d6d92cd 100644 --- a/doc/html/a00135.html +++ b/doc/html/a00135.html @@ -4,7 +4,7 @@ -tbb::pipeline Class Reference +tbb::parallel_do_feeder< Item > Class Template Reference @@ -33,104 +33,64 @@
-
tbb::pipeline Class Reference
+
tbb::parallel_do_feeder< Item > Class Template Referenceabstract
-

A processing pipeline that applies filters to items. +

Class the user supplied algorithm body uses to add new tasks. More...

-

#include <pipeline.h>

+

#include <parallel_do.h>

+
+Inheritance diagram for tbb::parallel_do_feeder< Item >:
+
+
+ + + +
- - - - - - - - - - - - - - - - - + + +

Public Member Functions

-__TBB_EXPORTED_METHOD pipeline ()
 Construct empty pipeline.
 
virtual __TBB_EXPORTED_METHOD ~pipeline ()
 
-void __TBB_EXPORTED_METHOD add_filter (filter &filter_)
 Add filter to end of pipeline.
 
-void __TBB_EXPORTED_METHOD run (size_t max_number_of_live_tokens)
 Run the pipeline to completion.
 
-void __TBB_EXPORTED_METHOD run (size_t max_number_of_live_tokens, tbb::task_group_context &context)
 Run the pipeline to completion with user-supplied context.
 
-void __TBB_EXPORTED_METHOD clear ()
 Remove all filters from the pipeline.
 
+void add (const Item &item)
 Add a work item to a running parallel_do.
 
- - - - - - - - - - - - + + +

Friends

-class internal::stage_task
 
-class internal::pipeline_root_task
 
-class filter
 
-class thread_bound_filter
 
-class internal::pipeline_cleaner
 
-class tbb::interface6::internal::pipeline_proxy
 
+template<typename Body_ , typename Item_ >
class internal::parallel_do_feeder_impl
 

Detailed Description

-

A processing pipeline that applies filters to items.

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - -
virtual __TBB_EXPORTED_METHOD tbb::pipeline::~pipeline ()
-
-virtual
-
-

Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB.

+

template<typename Item>
+class tbb::parallel_do_feeder< Item >

-
-
-
The documentation for this class was generated from the following file:
    -
  • pipeline.h
  • +

    Class the user supplied algorithm body uses to add new tasks.

    +
    Parameters
    + + +
    ItemWork item type
    +
    +
    +

The documentation for this class was generated from the following file:
    +
  • parallel_do.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00135.png b/doc/html/a00135.png new file mode 100644 index 0000000000000000000000000000000000000000..742cad9d022194b018303bb7554cb51173cd3a64 Binary files /dev/null and b/doc/html/a00135.png differ diff --git a/doc/html/a00136.html b/doc/html/a00136.html index f0fc4cf58474a0d0670463cbeaa9979f61a93d50..f2fb79c9e6fac9d079b168f27896cfbfa767eed7 100644 --- a/doc/html/a00136.html +++ b/doc/html/a00136.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::port_ref_impl< N1, N2 > Struct Template Reference +tbb::parallel_while< Body > Class Template Reference @@ -33,31 +33,130 @@
-
tbb::flow::interface8::port_ref_impl< N1, N2 > Struct Template Reference
+
tbb::parallel_while< Body > Class Template Reference
+ +

Parallel iteration over a stream, with optional addition of more work. + More...

+ +

#include <parallel_while.h>

+
+Inheritance diagram for tbb::parallel_while< Body >:
+
+
+ + + +
- - - + + + + +

-Static Public Attributes

-static const int size = N2-N1+1
 

+Public Types

+typedef Body::argument_type value_type
 Type of items.
 
+ + + + + + + + + + + + + +

+Public Member Functions

parallel_while ()
 Construct empty non-running parallel while.
 
~parallel_while ()
 Destructor cleans up data members before returning.
 
template<typename Stream >
void run (Stream &stream, const Body &body)
 Apply body.apply to each item in the stream. More...
 
void add (const value_type &item)
 Add a work item while running. More...
 
-
The documentation for this struct was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +

    Detailed Description

    +

    template<typename Body>
    +class tbb::parallel_while< Body >

    + +

    Parallel iteration over a stream, with optional addition of more work.

    +

    The Body b has the requirement:
    + "b(v)"
    + "b.argument_type"
    + where v is an argument_type

    +

    Member Function Documentation

    + +
    +
    +
    +template<typename Body >
    + + + + + + + + +
    void tbb::parallel_while< Body >::add (const value_typeitem)
    +
    + +

    Add a work item while running.

    +

    Should be executed only by body.apply or a thread spawned therefrom.

    + +
    +
    + +
    +
    +
    +template<typename Body >
    +
    +template<typename Stream >
    + + + + + + + + + + + + + + + + + + +
    void tbb::parallel_while< Body >::run (Stream & stream,
    const Body & body 
    )
    +
    + +

    Apply body.apply to each item in the stream.

    +

    A Stream s has the requirements
    + "S::value_type"
    + "s.pop_if_present(value) is convertible to bool

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • parallel_while.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00136.png b/doc/html/a00136.png new file mode 100644 index 0000000000000000000000000000000000000000..fc86480fb6f62f64fddf8d2c87db84e764fa7982 Binary files /dev/null and b/doc/html/a00136.png differ diff --git a/doc/html/a00137.html b/doc/html/a00137.html index 5279c139184a7a09cca425600a03619f145a5ae2..029c0f4bbb1543b35340dc906dcc9e6ab02edfba 100644 --- a/doc/html/a00137.html +++ b/doc/html/a00137.html @@ -4,7 +4,7 @@ -tbb::pre_scan_tag Struct Reference +tbb::pipeline Class Reference @@ -33,38 +33,104 @@
-
tbb::pre_scan_tag Struct Reference
+
tbb::pipeline Class Reference
-

Used to indicate that the initial scan is being performed. +

A processing pipeline that applies filters to items. More...

-

#include <parallel_scan.h>

+

#include <pipeline.h>

- - - + + + + + + + + + + + + + + + + + + +

-Static Public Member Functions

-static bool is_final_scan ()
 

+Public Member Functions

+__TBB_EXPORTED_METHOD pipeline ()
 Construct empty pipeline.
 
virtual __TBB_EXPORTED_METHOD ~pipeline ()
 
+void __TBB_EXPORTED_METHOD add_filter (filter &filter_)
 Add filter to end of pipeline.
 
+void __TBB_EXPORTED_METHOD run (size_t max_number_of_live_tokens)
 Run the pipeline to completion.
 
+void __TBB_EXPORTED_METHOD run (size_t max_number_of_live_tokens, tbb::task_group_context &context)
 Run the pipeline to completion with user-supplied context.
 
+void __TBB_EXPORTED_METHOD clear ()
 Remove all filters from the pipeline.
 
+ + + + + + + + + + + + +

+Friends

+class internal::stage_task
 
+class internal::pipeline_root_task
 
+class filter
 
+class thread_bound_filter
 
+class internal::pipeline_cleaner
 
+class tbb::interface6::internal::pipeline_proxy
 

Detailed Description

-

Used to indicate that the initial scan is being performed.

-

The documentation for this struct was generated from the following file:
    -
  • parallel_scan.h
  • +

    A processing pipeline that applies filters to items.

    +

    Constructor & Destructor Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    virtual __TBB_EXPORTED_METHOD tbb::pipeline::~pipeline ()
    +
    +virtual
    +
    +

    Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB.

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • pipeline.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00138.html b/doc/html/a00138.html index e5ec7edac17998bb2cb0baddeaa4d8be1766b332..b7774fcbd731d206327f9769b4d9ff5bd5bd379d 100644 --- a/doc/html/a00138.html +++ b/doc/html/a00138.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::priority_queue_node< T, Compare, A > Class Template Reference +tbb::flow::interface8::port_ref_impl< N1, N2 > Struct Template Reference @@ -33,394 +33,31 @@
-
tbb::flow::interface8::priority_queue_node< T, Compare, A > Class Template Reference
+
tbb::flow::interface8::port_ref_impl< N1, N2 > Struct Template Reference
- -

Forwards messages in priority order. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::priority_queue_node< T, Compare, A >:
-
-
- - -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef buffer_node< T, A > base_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef buffer_node< T, A > class_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

priority_queue_node (graph &g)
 Constructor.
 
priority_queue_node (const priority_queue_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-size_t successor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - - - - - - - - - - - - - - - - -

-Protected Types

enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef buffer_node< T, A >
-::size_type 
size_type
 
-typedef buffer_node< T, A >
-::item_type 
item_type
 
-typedef buffer_node< T, A >
-::buffer_operation 
prio_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
-  reg_succ, -rem_succ, -req_item, -res_item, -
-  rel_res, -con_res, -put_item, -try_fwd_task, -
-  add_blt_succ, -del_blt_succ, -add_blt_pred, -del_blt_pred, -
-  blt_succ_cnt, -blt_pred_cnt, -blt_succ_cpy, -blt_pred_cpy -
- }
 
enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef size_t size_type
 
-typedef
-internal::aggregating_functor
-< class_type, buffer_operation
handler_type
 
-typedef sender< T >
-::built_successors_type 
built_successors_type
 
-typedef receiver< T >
-::built_predecessors_type 
built_predecessors_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

-void reset_node (reset_flags f)
 
-void handle_operations (prio_operation *op_list)
 
-void internal_forward_task (prio_operation *op)
 Tries to forward valid items to successors.
 
-void internal_push (prio_operation *op)
 
-void internal_pop (prio_operation *op)
 
-void internal_reserve (prio_operation *op)
 
-void internal_consume (prio_operation *op)
 
-void internal_release (prio_operation *op)
 
- Protected Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
-task * grab_forwarding_task (buffer_operation &op_data)
 
-bool enqueue_forwarding_task (buffer_operation &op_data)
 
-virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
-virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
-virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
-built_successors_typebuilt_successors ()
 
-virtual void internal_add_built_succ (buffer_operation *op)
 
-virtual void internal_del_built_succ (buffer_operation *op)
 
-built_predecessors_typebuilt_predecessors ()
 
-virtual void internal_add_built_pred (buffer_operation *op)
 
-virtual void internal_del_built_pred (buffer_operation *op)
 
-virtual void internal_succ_cnt (buffer_operation *op)
 
-virtual void internal_pred_cnt (buffer_operation *op)
 
-virtual void internal_copy_succs (buffer_operation *op)
 
-virtual void internal_copy_preds (buffer_operation *op)
 
-task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
-void reset_receiver (reset_flags)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
-internal::round_robin_cache< T,
-null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-bool forwarder_busy
 
-internal::aggregator
-< handler_type,
-buffer_operation
my_aggregator
 

+Static Public Attributes

+static const int size = N2-N1+1
 
-

Detailed Description

-

template<typename T, typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
-class tbb::flow::interface8::priority_queue_node< T, Compare, A >

- -

Forwards messages in priority order.

-

The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • flow_graph_opencl_node.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00138.png b/doc/html/a00138.png deleted file mode 100644 index d3e88b55a66281817e107ea4b0d49b49953838a0..0000000000000000000000000000000000000000 Binary files a/doc/html/a00138.png and /dev/null differ diff --git a/doc/html/a00139.html b/doc/html/a00139.html index f3a686c7f142b9bcc0ce55bdf9eee7ca33dcbff4..7c06ae5936b3c4245cdfbd96348f22ca45922bec 100644 --- a/doc/html/a00139.html +++ b/doc/html/a00139.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::proxy_dependency_receiver< T, Factory > Class Template Reference +tbb::pre_scan_tag Struct Reference @@ -33,90 +33,38 @@
-
tbb::flow::interface8::proxy_dependency_receiver< T, Factory > Class Template Reference
+
tbb::pre_scan_tag Struct Reference
-
-Inheritance diagram for tbb::flow::interface8::proxy_dependency_receiver< T, Factory >:
-
-
- - -tbb::flow::interface8::receiver< dependency_msg< T, Factory > > - -
+ +

Used to indicate that the initial scan is being performed. + More...

+ +

#include <parallel_scan.h>

- - - - - - - - - -

-Public Types

-typedef sender< dependency_msg
-< T, Factory > > 
dependency_predecessor_type
 
- Public Types inherited from tbb::flow::interface8::receiver< dependency_msg< T, Factory > >
-typedef sender< dependency_msg
-< T, Factory > > 
dependency_predecessor_type
 The predecessor type for this node.
 
-typedef
-proxy_dependency_receiver< T,
-Factory > 
proxy
 
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

proxy_dependency_receiver (receiver< T > &r)
 
-task * try_put_task (const dependency_msg< T, Factory > &d)
 Put an item to the receiver.
 
-bool register_predecessor (dependency_predecessor_type &s)
 Add a predecessor to the node.
 
-bool remove_predecessor (dependency_predecessor_type &s)
 Remove a predecessor from the node.
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< dependency_msg< T, Factory > >
-bool try_put (const T &t)
 Put an item to the receiver.
 
-ordinary_receiver & ordinary_receiver ()
 
- - - - - - + + +

-Protected Member Functions

-void reset_receiver (reset_flags f=rf_reset_protocol)
 put receiver back in initial state
 
-bool is_continue_receiver ()
 

+Static Public Member Functions

+static bool is_final_scan ()
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +

    Detailed Description

    +

    Used to indicate that the initial scan is being performed.

    +

    The documentation for this struct was generated from the following file:
      +
    • parallel_scan.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00139.png b/doc/html/a00139.png deleted file mode 100644 index 68da7369fe513f1442b69ee29845a0787b0f22c0..0000000000000000000000000000000000000000 Binary files a/doc/html/a00139.png and /dev/null differ diff --git a/doc/html/a00140.html b/doc/html/a00140.html index 464b9f3188566670a801603c96f96bc2431f774a..c2befe74c77de345b34610e24b587410f1cfe837 100644 --- a/doc/html/a00140.html +++ b/doc/html/a00140.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::proxy_dependency_sender< T, Factory > Class Template Reference +tbb::flow::interface8::priority_queue_node< T, Compare, A > Class Template Reference @@ -33,90 +33,394 @@
-
tbb::flow::interface8::proxy_dependency_sender< T, Factory > Class Template Reference
+
tbb::flow::interface8::priority_queue_node< T, Compare, A > Class Template Reference
+ +

Forwards messages in priority order. + More...

+ +

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::proxy_dependency_sender< T, Factory >:
+Inheritance diagram for tbb::flow::interface8::priority_queue_node< T, Compare, A >:
- - -tbb::flow::interface8::sender< dependency_msg< T, Factory > > + + +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T >
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - +internal::edge_container
+< predecessor_type >  + + + + + + + + + + + + + + +

Public Types

-typedef receiver
-< dependency_msg< T, Factory > > 
dependency_successor_type
 
- Public Types inherited from tbb::flow::interface8::sender< dependency_msg< T, Factory > >
-typedef receiver
-< dependency_msg< T, Factory > > 
dependency_successor_type
 The successor type for this sender.
 
+
+typedef T input_type
 
+typedef T output_type
 
+typedef buffer_node< T, A > base_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef buffer_node< T, A > class_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
typedef
-proxy_dependency_sender< T,
-Factory > 
proxy
 
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

proxy_dependency_sender (sender< T > &s)
 
-bool register_successor (dependency_successor_type &r)
 Add a new successor to this node.
 
-bool remove_successor (dependency_successor_type &r)
 Removes a successor from this node.
 
-bool try_get (dependency_msg< T, Factory > &d)
 Request an item from the sender.
 
-bool try_reserve (dependency_msg< T, Factory > &d)
 Reserves an item in the sender.
 
-bool try_release ()
 Releases the reserved item.
 
-bool try_consume ()
 Consumes the reserved item.
 
- Public Member Functions inherited from tbb::flow::interface8::sender< dependency_msg< T, Factory > >
-ordinary_sender & ordinary_sender ()
 
-bool has_host_successors ()
 
priority_queue_node (graph &g)
 Constructor.
 
priority_queue_node (const priority_queue_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+size_t successor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Protected Types

enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef buffer_node< T, A >
+::size_type 
size_type
 
+typedef buffer_node< T, A >
+::item_type 
item_type
 
+typedef buffer_node< T, A >
+::buffer_operation 
prio_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
+  reg_succ, +rem_succ, +req_item, +res_item, +
+  rel_res, +con_res, +put_item, +try_fwd_task, +
+  add_blt_succ, +del_blt_succ, +add_blt_pred, +del_blt_pred, +
+  blt_succ_cnt, +blt_pred_cnt, +blt_succ_cpy, +blt_pred_cpy +
+ }
 
enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef size_t size_type
 
+typedef
+internal::aggregating_functor
+< class_type, buffer_operation
handler_type
 
+typedef sender< T >
+::built_successors_type 
built_successors_type
 
+typedef receiver< T >
+::built_predecessors_type 
built_predecessors_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

+void reset_node (reset_flags f)
 
+void handle_operations (prio_operation *op_list)
 
+void internal_forward_task (prio_operation *op)
 Tries to forward valid items to successors.
 
+void internal_push (prio_operation *op)
 
+void internal_pop (prio_operation *op)
 
+void internal_reserve (prio_operation *op)
 
+void internal_consume (prio_operation *op)
 
+void internal_release (prio_operation *op)
 
- Protected Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
+task * grab_forwarding_task (buffer_operation &op_data)
 
+bool enqueue_forwarding_task (buffer_operation &op_data)
 
+virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
+virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
+virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
+built_successors_typebuilt_successors ()
 
+virtual void internal_add_built_succ (buffer_operation *op)
 
+virtual void internal_del_built_succ (buffer_operation *op)
 
+built_predecessors_typebuilt_predecessors ()
 
+virtual void internal_add_built_pred (buffer_operation *op)
 
+virtual void internal_del_built_pred (buffer_operation *op)
 
+virtual void internal_succ_cnt (buffer_operation *op)
 
+virtual void internal_pred_cnt (buffer_operation *op)
 
+virtual void internal_copy_succs (buffer_operation *op)
 
+virtual void internal_copy_preds (buffer_operation *op)
 
+task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
+void reset_receiver (reset_flags)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
+internal::round_robin_cache< T,
+null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+bool forwarder_busy
 
+internal::aggregator
+< handler_type,
+buffer_operation
my_aggregator
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +

    Detailed Description

    +

    template<typename T, typename Compare = std::less<T>, typename A = cache_aligned_allocator<T>>
    +class tbb::flow::interface8::priority_queue_node< T, Compare, A >

    + +

    Forwards messages in priority order.

    +

    The documentation for this class was generated from the following file:

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00140.png b/doc/html/a00140.png index 3aea1666dc3f0c190cc9647a24caa0c801a26f21..d3e88b55a66281817e107ea4b0d49b49953838a0 100644 Binary files a/doc/html/a00140.png and b/doc/html/a00140.png differ diff --git a/doc/html/a00141.html b/doc/html/a00141.html index c7ef2042bf0c139b5b35b7fb1ab45b6bee757edc..4ec279e9fbd1ceaad76f48305f6907cedd9af045 100644 --- a/doc/html/a00141.html +++ b/doc/html/a00141.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::queue_node< T, A > Class Template Reference +tbb::flow::interface8::proxy_dependency_receiver< T, Factory > Class Template Reference @@ -33,389 +33,90 @@
-
tbb::flow::interface8::queue_node< T, A > Class Template Reference
+
tbb::flow::interface8::proxy_dependency_receiver< T, Factory > Class Template Reference
- -

Forwards messages in FIFO order. - More...

- -

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::queue_node< T, A >:
+Inheritance diagram for tbb::flow::interface8::proxy_dependency_receiver< T, Factory >:
- - -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > -tbb::flow::interface8::sequencer_node< T, A > + + +tbb::flow::interface8::receiver< dependency_msg< T, Factory > >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - +proxy_dependency_receiver< T,
+Factory >  +

Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef buffer_node< T, A > class_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+
+typedef sender< dependency_msg
+< T, Factory > > 
predecessor_type
 
- Public Types inherited from tbb::flow::interface8::receiver< dependency_msg< T, Factory > >
+typedef sender< dependency_msg
+< T, Factory > > 
predecessor_type
 The predecessor type for this node.
 
typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
proxy
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

queue_node (graph &g)
 Constructor.
 
queue_node (const queue_node &src)
 Copy constructor.
 
-void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-size_t successor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +

-Protected Types

enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef buffer_node< T, A > base_type
 
-typedef base_type::size_type size_type
 
-typedef base_type::buffer_operation queue_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
-  reg_succ, -rem_succ, -req_item, -res_item, -
-  rel_res, -con_res, -put_item, -try_fwd_task, -
-  add_blt_succ, -del_blt_succ, -add_blt_pred, -del_blt_pred, -
-  blt_succ_cnt, -blt_pred_cnt, -blt_succ_cpy, -blt_pred_cpy -
- }
 
enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef size_t size_type
 
-typedef
-internal::aggregating_functor
-< class_type, buffer_operation
handler_type
 
-typedef sender< T >
-::built_successors_type 
built_successors_type
 
-typedef receiver< T >
-::built_predecessors_type 
built_predecessors_type
 
proxy_dependency_receiver (receiver< T > &r)
 
+task * try_put_task (const dependency_msg< T, Factory > &d)
 Put an item to the receiver.
 
+bool register_predecessor (predecessor_type &s)
 Add a predecessor to the node.
 
+bool remove_predecessor (predecessor_type &s)
 Remove a predecessor from the node.
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< dependency_msg< T, Factory > >
+bool try_put (const T &t)
 Put an item to the receiver.
 
+ordinary_receiver & ordinary_receiver ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Member Functions

-void internal_forward_task (queue_operation *op)
 Tries to forward valid items to successors.
 
-void internal_pop (queue_operation *op)
 
-void internal_reserve (queue_operation *op)
 
-void internal_consume (queue_operation *op)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
-virtual void handle_operations (buffer_operation *op_list)
 
-task * grab_forwarding_task (buffer_operation &op_data)
 
-bool enqueue_forwarding_task (buffer_operation &op_data)
 
-virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
-virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
-virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
-built_successors_typebuilt_successors ()
 
-virtual void internal_add_built_succ (buffer_operation *op)
 
-virtual void internal_del_built_succ (buffer_operation *op)
 
-built_predecessors_typebuilt_predecessors ()
 
-virtual void internal_add_built_pred (buffer_operation *op)
 
-virtual void internal_del_built_pred (buffer_operation *op)
 
-virtual void internal_succ_cnt (buffer_operation *op)
 
-virtual void internal_pred_cnt (buffer_operation *op)
 
-virtual void internal_copy_succs (buffer_operation *op)
 
-virtual void internal_copy_preds (buffer_operation *op)
 
-virtual void internal_push (buffer_operation *op)
 
-virtual void internal_release (buffer_operation *op)
 
-task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
-void reset_receiver (reset_flags)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - + + + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
-internal::round_robin_cache< T,
-null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-bool forwarder_busy
 
-internal::aggregator
-< handler_type,
-buffer_operation
my_aggregator
 
+void reset_receiver (reset_flags f=rf_reset_protocol)
 put receiver back in initial state
 
+bool is_continue_receiver ()
 
-

Detailed Description

-

template<typename T, typename A = cache_aligned_allocator<T>>
-class tbb::flow::interface8::queue_node< T, A >

- -

Forwards messages in FIFO order.

-

The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +
    The documentation for this class was generated from the following file:
      +
    • flow_graph_opencl_node.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00141.png b/doc/html/a00141.png index 8ad3fc135807da0aed721edaa92e7b59dacc58b2..68da7369fe513f1442b69ee29845a0787b0f22c0 100644 Binary files a/doc/html/a00141.png and b/doc/html/a00141.png differ diff --git a/doc/html/a00142.html b/doc/html/a00142.html index fe92dfad4ab608e37d17fb7e05f739ebc612d82b..f9db92162ba988208b7b94651b2f29b3173978c3 100644 --- a/doc/html/a00142.html +++ b/doc/html/a00142.html @@ -4,7 +4,7 @@ -tbb::queuing_mutex Class Reference +tbb::flow::interface8::proxy_dependency_sender< T, Factory > Class Template Reference @@ -33,70 +33,90 @@
-
tbb::queuing_mutex Class Reference
+
tbb::flow::interface8::proxy_dependency_sender< T, Factory > Class Template Reference
- -

Queuing mutex with local-only spinning. - More...

- -

#include <queuing_mutex.h>

-Inheritance diagram for tbb::queuing_mutex:
+Inheritance diagram for tbb::flow::interface8::proxy_dependency_sender< T, Factory >:
- - + + +tbb::flow::interface8::sender< dependency_msg< T, Factory > >
- - - - + + + + + + + + +

-Classes

class  scoped_lock
 The scoped locking pattern. More...
 

+Public Types

+typedef receiver
+< dependency_msg< T, Factory > > 
successor_type
 
- Public Types inherited from tbb::flow::interface8::sender< dependency_msg< T, Factory > >
+typedef receiver
+< dependency_msg< T, Factory > > 
successor_type
 The successor type for this sender.
 
+typedef
+proxy_dependency_sender< T,
+Factory > 
proxy
 
- - - - - -

Public Member Functions

queuing_mutex ()
 Construct unacquired mutex.
 
-void __TBB_EXPORTED_METHOD internal_construct ()
 
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = true
 
proxy_dependency_sender (sender< T > &s)
 
+bool register_successor (successor_type &r)
 Add a new successor to this node.
 
+bool remove_successor (successor_type &r)
 Removes a successor from this node.
 
+bool try_get (dependency_msg< T, Factory > &d)
 Request an item from the sender.
 
+bool try_reserve (dependency_msg< T, Factory > &d)
 Reserves an item in the sender.
 
+bool try_release ()
 Releases the reserved item.
 
+bool try_consume ()
 Consumes the reserved item.
 
- Public Member Functions inherited from tbb::flow::interface8::sender< dependency_msg< T, Factory > >
+ordinary_sender & ordinary_sender ()
 
+bool has_host_successors ()
 
-

Detailed Description

-

Queuing mutex with local-only spinning.

-

The documentation for this class was generated from the following file:
    -
  • queuing_mutex.h
  • +
    The documentation for this class was generated from the following file:
      +
    • flow_graph_opencl_node.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00142.png b/doc/html/a00142.png index 97f8b53bdb2fc94c669545ed9d635338907e3f57..3aea1666dc3f0c190cc9647a24caa0c801a26f21 100644 Binary files a/doc/html/a00142.png and b/doc/html/a00142.png differ diff --git a/doc/html/a00143.html b/doc/html/a00143.html index 25834f36ad93a4c5aee4ec758a87964503a3d414..4fa5156c550bd8b97edd7fac7841163ffa2ca5b8 100644 --- a/doc/html/a00143.html +++ b/doc/html/a00143.html @@ -4,7 +4,7 @@ -tbb::queuing_rw_mutex Class Reference +tbb::flow::interface8::queue_node< T, A > Class Template Reference @@ -33,75 +33,389 @@
-
tbb::queuing_rw_mutex Class Reference
+
tbb::flow::interface8::queue_node< T, A > Class Template Reference
-

Queuing reader-writer mutex with local-only spinning. +

Forwards messages in FIFO order. More...

-

#include <queuing_rw_mutex.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::queuing_rw_mutex:
+Inheritance diagram for tbb::flow::interface8::queue_node< T, A >:
- - + + +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T > +tbb::flow::interface8::sequencer_node< T, A >
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Classes

class  scoped_lock
 The scoped locking pattern. More...
 

+Public Types

+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef buffer_node< T, A > class_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

queuing_rw_mutex ()
 Construct unacquired mutex.
 
~queuing_rw_mutex ()
 Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL.
 
-void __TBB_EXPORTED_METHOD internal_construct ()
 
queue_node (graph &g)
 Constructor.
 
queue_node (const queue_node &src)
 Copy constructor.
 
+void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+size_t successor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + +

-Static Public Attributes

-static const bool is_rw_mutex = true
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = true
 

+Protected Types

enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef buffer_node< T, A > base_type
 
+typedef base_type::size_type size_type
 
+typedef base_type::buffer_operation queue_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
+  reg_succ, +rem_succ, +req_item, +res_item, +
+  rel_res, +con_res, +put_item, +try_fwd_task, +
+  add_blt_succ, +del_blt_succ, +add_blt_pred, +del_blt_pred, +
+  blt_succ_cnt, +blt_pred_cnt, +blt_succ_cpy, +blt_pred_cpy +
+ }
 
enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef size_t size_type
 
+typedef
+internal::aggregating_functor
+< class_type, buffer_operation
handler_type
 
+typedef sender< T >
+::built_successors_type 
built_successors_type
 
+typedef receiver< T >
+::built_predecessors_type 
built_predecessors_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Member Functions

+void internal_forward_task (queue_operation *op)
 Tries to forward valid items to successors.
 
+void internal_pop (queue_operation *op)
 
+void internal_reserve (queue_operation *op)
 
+void internal_consume (queue_operation *op)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
+virtual void handle_operations (buffer_operation *op_list)
 
+task * grab_forwarding_task (buffer_operation &op_data)
 
+bool enqueue_forwarding_task (buffer_operation &op_data)
 
+virtual task * forward_task ()
 This is executed by an enqueued task, the "forwarder".
 
+virtual void internal_reg_succ (buffer_operation *op)
 Register successor.
 
+virtual void internal_rem_succ (buffer_operation *op)
 Remove successor.
 
+built_successors_typebuilt_successors ()
 
+virtual void internal_add_built_succ (buffer_operation *op)
 
+virtual void internal_del_built_succ (buffer_operation *op)
 
+built_predecessors_typebuilt_predecessors ()
 
+virtual void internal_add_built_pred (buffer_operation *op)
 
+virtual void internal_del_built_pred (buffer_operation *op)
 
+virtual void internal_succ_cnt (buffer_operation *op)
 
+virtual void internal_pred_cnt (buffer_operation *op)
 
+virtual void internal_copy_succs (buffer_operation *op)
 
+virtual void internal_copy_preds (buffer_operation *op)
 
+virtual void internal_push (buffer_operation *op)
 
+virtual void internal_release (buffer_operation *op)
 
+task * try_put_task (const T &t)
 receive an item, return a task *if possible
 
+void reset_receiver (reset_flags)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
+internal::round_robin_cache< T,
+null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+bool forwarder_busy
 
+internal::aggregator
+< handler_type,
+buffer_operation
my_aggregator
 

Detailed Description

-

Queuing reader-writer mutex with local-only spinning.

-

Adapted from Krieger, Stumm, et al. pseudocode at http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93

+

template<typename T, typename A = cache_aligned_allocator<T>>
+class tbb::flow::interface8::queue_node< T, A >

+ +

Forwards messages in FIFO order.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00143.png b/doc/html/a00143.png index aeda94ccfed1540cd9f7d5b4689bd271e13ebcdf..8ad3fc135807da0aed721edaa92e7b59dacc58b2 100644 Binary files a/doc/html/a00143.png and b/doc/html/a00143.png differ diff --git a/doc/html/a00144.html b/doc/html/a00144.html index 39e882528b14aa8d0d8f6df1cb110ebefd96c227..00b5e642cf54bb537eaa755fa7acae1de18f068a 100644 --- a/doc/html/a00144.html +++ b/doc/html/a00144.html @@ -4,7 +4,7 @@ -tbb::interface5::reader_writer_lock Class Reference +tbb::queuing_mutex Class Reference @@ -33,196 +33,70 @@
-
tbb::interface5::reader_writer_lock Class Reference
+
tbb::queuing_mutex Class Reference
-

Writer-preference reader-writer lock with local-only spinning on readers. +

Queuing mutex with local-only spinning. More...

-

#include <reader_writer_lock.h>

+

#include <queuing_mutex.h>

-Inheritance diagram for tbb::interface5::reader_writer_lock:
+Inheritance diagram for tbb::queuing_mutex:
- - + +
- - + + - - - -

Classes

class  scoped_lock
 The scoped lock pattern for write locks. More...
class  scoped_lock
 The scoped locking pattern. More...
 
class  scoped_lock_read
 The scoped lock pattern for read locks. More...
 
- - - -

-Public Types

enum  status_t { waiting_nonblocking, -waiting, -active, -invalid - }
 Status type for nodes associated with lock instances. More...
 
- - - - - - - - - - - - - - - - - - - - - + + + + +

Public Member Functions

reader_writer_lock ()
 Constructs a new reader_writer_lock.
 
~reader_writer_lock ()
 Destructs a reader_writer_lock object.
 
void __TBB_EXPORTED_METHOD lock ()
 Acquires the reader_writer_lock for write. More...
 
bool __TBB_EXPORTED_METHOD try_lock ()
 Tries to acquire the reader_writer_lock for write. More...
 
void __TBB_EXPORTED_METHOD lock_read ()
 Acquires the reader_writer_lock for read. More...
 
bool __TBB_EXPORTED_METHOD try_lock_read ()
 Tries to acquire the reader_writer_lock for read. More...
 
-void __TBB_EXPORTED_METHOD unlock ()
 Releases the reader_writer_lock.
 
queuing_mutex ()
 Construct unacquired mutex.
 
+void __TBB_EXPORTED_METHOD internal_construct ()
 
- - - - - + + + + + + +

-Friends

-class scoped_lock
 
-class scoped_lock_read
 

+Static Public Attributes

+static const bool is_rw_mutex = false
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = true
 

Detailed Description

-

Writer-preference reader-writer lock with local-only spinning on readers.

-

Loosely adapted from Mellor-Crummey and Scott pseudocode at http://www.cs.rochester.edu/research/synchronization/pseudocode/rw.html#s_wp

-

Member Enumeration Documentation

- -
-
- -

Status type for nodes associated with lock instances.

-

waiting_nonblocking: the wait state for nonblocking lock instances; for writes, these transition straight to active states; for reads, these are unused.

-

waiting: the start and spin state for all lock instances; these will transition to active state when appropriate. Non-blocking write locks transition from this state to waiting_nonblocking immediately.

-

active: the active state means that the lock instance holds the lock; it will transition to invalid state during node deletion

-

invalid: the end state for all nodes; this is set in the destructor so if we encounter this state, we are looking at memory that has already been freed

-

The state diagrams below describe the status transitions. Single arrows indicate that the thread that owns the node is responsible for the transition; double arrows indicate that any thread could make the transition.

-

State diagram for scoped_lock status:

-

waiting -------—> waiting_nonblocking | _____________/ | V V V active --------------—> invalid

-

State diagram for scoped_lock_read status:

-

waiting | V active --------------—>invalid

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
void __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::lock ()
-
- -

Acquires the reader_writer_lock for write.

-

If the lock is currently held in write mode by another context, the writer will block by spinning on a local variable. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of.

- -
-
- -
-
- - - - - - - -
void __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::lock_read ()
-
- -

Acquires the reader_writer_lock for read.

-

If the lock is currently held by a writer, this reader will block and wait until the writers are done. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of.

- -
-
- -
-
- - - - - - - -
bool __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::try_lock ()
-
- -

Tries to acquire the reader_writer_lock for write.

-

This function does not block. Return Value: True or false, depending on whether the lock is acquired or not. If the lock is already held by this acquiring context, try_lock() returns false.

- -
-
- -
-
- - - - - - - -
bool __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::try_lock_read ()
-
- -

Tries to acquire the reader_writer_lock for read.

-

This function does not block. Return Value: True or false, depending on whether the lock is acquired or not.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • reader_writer_lock.h
  • +

    Queuing mutex with local-only spinning.

    +

    The documentation for this class was generated from the following file:
      +
    • queuing_mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00144.png b/doc/html/a00144.png index 12ea5c61822a9cff028a841febee251e03da1868..97f8b53bdb2fc94c669545ed9d635338907e3f57 100644 Binary files a/doc/html/a00144.png and b/doc/html/a00144.png differ diff --git a/doc/html/a00145.html b/doc/html/a00145.html index f0c171d8da6720e2fcb97eee9ad8ae1e43726570..2d6133f569cd4a3cace16d09e2837a074247a14a 100644 --- a/doc/html/a00145.html +++ b/doc/html/a00145.html @@ -4,7 +4,7 @@ -tbb::zero_allocator< void, Allocator >::rebind< U > Struct Template Reference +tbb::queuing_rw_mutex Class Reference @@ -33,32 +33,75 @@
-
tbb::zero_allocator< void, Allocator >::rebind< U > Struct Template Reference
+
tbb::queuing_rw_mutex Class Reference
+ +

Queuing reader-writer mutex with local-only spinning. + More...

+ +

#include <queuing_rw_mutex.h>

+
+Inheritance diagram for tbb::queuing_rw_mutex:
+
+
+ + + +
- - - + + + + +

-Public Types

-typedef zero_allocator< U,
-Allocator > 
other
 

+Classes

class  scoped_lock
 The scoped locking pattern. More...
 
+ + + + + + + + + +

+Public Member Functions

queuing_rw_mutex ()
 Construct unacquired mutex.
 
~queuing_rw_mutex ()
 Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL.
 
+void __TBB_EXPORTED_METHOD internal_construct ()
 
+ + + + + + +

+Static Public Attributes

+static const bool is_rw_mutex = true
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = true
 
-
The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00145.png b/doc/html/a00145.png new file mode 100644 index 0000000000000000000000000000000000000000..aeda94ccfed1540cd9f7d5b4689bd271e13ebcdf Binary files /dev/null and b/doc/html/a00145.png differ diff --git a/doc/html/a00146.html b/doc/html/a00146.html index 2e021d4b2541a7bf99a8993fee13f2bb824fbe14..83a88ba11c244bae19145b71761812d6884e52f2 100644 --- a/doc/html/a00146.html +++ b/doc/html/a00146.html @@ -4,7 +4,7 @@ -tbb::interface6::memory_pool_allocator< void, P >::rebind< U > Struct Template Reference +tbb::interface5::reader_writer_lock Class Reference @@ -33,32 +33,196 @@
-
tbb::interface6::memory_pool_allocator< void, P >::rebind< U > Struct Template Reference
+
tbb::interface5::reader_writer_lock Class Reference
+ +

Writer-preference reader-writer lock with local-only spinning on readers. + More...

+ +

#include <reader_writer_lock.h>

+
+Inheritance diagram for tbb::interface5::reader_writer_lock:
+
+
+ + + +
+ + + + + + + +

+Classes

class  scoped_lock
 The scoped lock pattern for write locks. More...
 
class  scoped_lock_read
 The scoped lock pattern for read locks. More...
 
- - + + + +

Public Types

-typedef memory_pool_allocator
-< U, P > 
other
 
enum  status_t { waiting_nonblocking, +waiting, +active, +invalid + }
 Status type for nodes associated with lock instances. More...
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

reader_writer_lock ()
 Constructs a new reader_writer_lock.
 
~reader_writer_lock ()
 Destructs a reader_writer_lock object.
 
void __TBB_EXPORTED_METHOD lock ()
 Acquires the reader_writer_lock for write. More...
 
bool __TBB_EXPORTED_METHOD try_lock ()
 Tries to acquire the reader_writer_lock for write. More...
 
void __TBB_EXPORTED_METHOD lock_read ()
 Acquires the reader_writer_lock for read. More...
 
bool __TBB_EXPORTED_METHOD try_lock_read ()
 Tries to acquire the reader_writer_lock for read. More...
 
+void __TBB_EXPORTED_METHOD unlock ()
 Releases the reader_writer_lock.
 
+ + + + +

+Friends

+class scoped_lock
 
+class scoped_lock_read
 
-
The documentation for this struct was generated from the following file:
    -
  • memory_pool.h
  • +

    Detailed Description

    +

    Writer-preference reader-writer lock with local-only spinning on readers.

    +

    Loosely adapted from Mellor-Crummey and Scott pseudocode at http://www.cs.rochester.edu/research/synchronization/pseudocode/rw.html#s_wp

    +

    Member Enumeration Documentation

    + +
    +
    + +

    Status type for nodes associated with lock instances.

    +

    waiting_nonblocking: the wait state for nonblocking lock instances; for writes, these transition straight to active states; for reads, these are unused.

    +

    waiting: the start and spin state for all lock instances; these will transition to active state when appropriate. Non-blocking write locks transition from this state to waiting_nonblocking immediately.

    +

    active: the active state means that the lock instance holds the lock; it will transition to invalid state during node deletion

    +

    invalid: the end state for all nodes; this is set in the destructor so if we encounter this state, we are looking at memory that has already been freed

    +

    The state diagrams below describe the status transitions. Single arrows indicate that the thread that owns the node is responsible for the transition; double arrows indicate that any thread could make the transition.

    +

    State diagram for scoped_lock status:

    +

    waiting -------—> waiting_nonblocking | _____________/ | V V V active --------------—> invalid

    +

    State diagram for scoped_lock_read status:

    +

    waiting | V active --------------—>invalid

    + +
    +
    +

    Member Function Documentation

    + +
    +
    + + + + + + + +
    void __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::lock ()
    +
    + +

    Acquires the reader_writer_lock for write.

    +

    If the lock is currently held in write mode by another context, the writer will block by spinning on a local variable. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of.

    + +
    +
    + +
    +
    + + + + + + + +
    void __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::lock_read ()
    +
    + +

    Acquires the reader_writer_lock for read.

    +

    If the lock is currently held by a writer, this reader will block and wait until the writers are done. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of.

    + +
    +
    + +
    +
    + + + + + + + +
    bool __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::try_lock ()
    +
    + +

    Tries to acquire the reader_writer_lock for write.

    +

    This function does not block. Return Value: True or false, depending on whether the lock is acquired or not. If the lock is already held by this acquiring context, try_lock() returns false.

    + +
    +
    + +
    +
    + + + + + + + +
    bool __TBB_EXPORTED_METHOD tbb::interface5::reader_writer_lock::try_lock_read ()
    +
    + +

    Tries to acquire the reader_writer_lock for read.

    +

    This function does not block. Return Value: True or false, depending on whether the lock is acquired or not.

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • reader_writer_lock.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00146.png b/doc/html/a00146.png new file mode 100644 index 0000000000000000000000000000000000000000..12ea5c61822a9cff028a841febee251e03da1868 Binary files /dev/null and b/doc/html/a00146.png differ diff --git a/doc/html/a00147.html b/doc/html/a00147.html index f2490a07c9fc569a781aa0ee30450a8815913299..e2203a1ef4e737f7d1c5170d7e0ca918c2045f5b 100644 --- a/doc/html/a00147.html +++ b/doc/html/a00147.html @@ -4,7 +4,7 @@ -tbb::interface6::memory_pool_allocator< T, P >::rebind< U > Struct Template Reference +tbb::cache_aligned_allocator< void >::rebind< U > Struct Template Reference @@ -33,32 +33,32 @@
-
tbb::interface6::memory_pool_allocator< T, P >::rebind< U > Struct Template Reference
+
tbb::cache_aligned_allocator< void >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef memory_pool_allocator
-< U, P > 
other
 
+typedef
+cache_aligned_allocator< U > 
other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00148.html b/doc/html/a00148.html index 5fbf747e353fce588ba11b804dbd63acb4196be8..888cca6fc5e8c3b661c7d68dbcb38f503ba24844 100644 --- a/doc/html/a00148.html +++ b/doc/html/a00148.html @@ -4,7 +4,7 @@ -tbb::cache_aligned_allocator< T >::rebind< U > Struct Template Reference +tbb::zero_allocator< void, Allocator >::rebind< U > Struct Template Reference @@ -33,32 +33,32 @@
-
tbb::cache_aligned_allocator< T >::rebind< U > Struct Template Reference
+
tbb::zero_allocator< void, Allocator >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef
-cache_aligned_allocator< U > 
other
 
+typedef zero_allocator< U,
+Allocator > 
other
 

The documentation for this struct was generated from the following file:
    -
  • cache_aligned_allocator.h
  • +
  • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00149.html b/doc/html/a00149.html index 22b228dc882a07dd2fd6ba5ea3ccc284e4278250..150aafd080ed438e3331be53dd2fe4070d96f5d4 100644 --- a/doc/html/a00149.html +++ b/doc/html/a00149.html @@ -4,7 +4,7 @@ -tbb::cache_aligned_allocator< void >::rebind< U > Struct Template Reference +tbb::zero_allocator< T, Allocator >::rebind< U > Struct Template Reference @@ -33,32 +33,32 @@
-
tbb::cache_aligned_allocator< void >::rebind< U > Struct Template Reference
+
tbb::zero_allocator< T, Allocator >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef
-cache_aligned_allocator< U > 
other
 
+typedef zero_allocator< U,
+Allocator > 
other
 

The documentation for this struct was generated from the following file:
    -
  • cache_aligned_allocator.h
  • +
  • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00150.html b/doc/html/a00150.html index ebe79c127003fd721bb8a6073b56e1b7ed9b2d11..ee765ed37d197c7da6877a9389fc6ae86d59d740 100644 --- a/doc/html/a00150.html +++ b/doc/html/a00150.html @@ -4,7 +4,7 @@ -tbb::scalable_allocator< T >::rebind< U > Struct Template Reference +tbb::cache_aligned_allocator< T >::rebind< U > Struct Template Reference @@ -33,31 +33,32 @@
-
tbb::scalable_allocator< T >::rebind< U > Struct Template Reference
+
tbb::cache_aligned_allocator< T >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef scalable_allocator< U > other
 
+typedef
+cache_aligned_allocator< U > 
other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00151.html b/doc/html/a00151.html index 82f9a8777a1a404eaa9cfa220c745bfe504509a1..ebe6a2b4c360f13aa875fcc6dd80f2627443cf3a 100644 --- a/doc/html/a00151.html +++ b/doc/html/a00151.html @@ -4,7 +4,7 @@ -tbb::scalable_allocator< void >::rebind< U > Struct Template Reference +tbb::scalable_allocator< T >::rebind< U > Struct Template Reference @@ -33,7 +33,7 @@
@@ -41,23 +41,23 @@ Public Types | List of all members
-
tbb::scalable_allocator< void >::rebind< U > Struct Template Reference
+
tbb::scalable_allocator< T >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef scalable_allocator< U > other
 
+typedef scalable_allocator< U > other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00152.html b/doc/html/a00152.html index 1684ed634dce0486a7f299187380613e15e48367..3b4dd432168c5373d5cac65ddff394466c907d8b 100644 --- a/doc/html/a00152.html +++ b/doc/html/a00152.html @@ -4,7 +4,7 @@ -tbb::tbb_allocator< T >::rebind< U > Struct Template Reference +tbb::interface6::memory_pool_allocator< T, P >::rebind< U > Struct Template Reference @@ -33,31 +33,32 @@
-
tbb::tbb_allocator< T >::rebind< U > Struct Template Reference
+
tbb::interface6::memory_pool_allocator< T, P >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef tbb_allocator< U > other
 
+typedef memory_pool_allocator
+< U, P > 
other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00153.html b/doc/html/a00153.html index a58a8b7223b509e3ee391f99283622cb29ed076e..eaab0d2b8b297cfd9f1cf823576aa8b406d968c1 100644 --- a/doc/html/a00153.html +++ b/doc/html/a00153.html @@ -4,7 +4,7 @@ -tbb::tbb_allocator< void >::rebind< U > Struct Template Reference +tbb::interface6::memory_pool_allocator< void, P >::rebind< U > Struct Template Reference @@ -33,31 +33,32 @@
-
tbb::tbb_allocator< void >::rebind< U > Struct Template Reference
+
tbb::interface6::memory_pool_allocator< void, P >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef tbb_allocator< U > other
 
+typedef memory_pool_allocator
+< U, P > 
other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00154.html b/doc/html/a00154.html index 23d2e7eb5f6a707bced978cd4719284939d7143b..fe5dd602aab6affbdeb4c86ba4d94af2e196a729 100644 --- a/doc/html/a00154.html +++ b/doc/html/a00154.html @@ -4,7 +4,7 @@ -tbb::zero_allocator< T, Allocator >::rebind< U > Struct Template Reference +tbb::scalable_allocator< void >::rebind< U > Struct Template Reference @@ -33,32 +33,31 @@
-
tbb::zero_allocator< T, Allocator >::rebind< U > Struct Template Reference
+
tbb::scalable_allocator< void >::rebind< U > Struct Template Reference
- - + +

Public Types

-typedef zero_allocator< U,
-Allocator > 
other
 
+typedef scalable_allocator< U > other
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00155.html b/doc/html/a00155.html index 7620e524c9c5d1fb7fb2ae14c678b6675e8baa2e..3b8be5cce1a17bd7ff8688196d391892d7d17508 100644 --- a/doc/html/a00155.html +++ b/doc/html/a00155.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::receiver< T > Class Template Reference +tbb::tbb_allocator< T >::rebind< U > Struct Template Reference @@ -33,149 +33,31 @@
-
tbb::flow::interface8::receiver< T > Class Template Referenceabstract
+
tbb::tbb_allocator< T >::rebind< U > Struct Template Reference
- -

Pure virtual template class that defines a receiver of messages of type T. - More...

- -

#include <flow_graph.h>

-
-Inheritance diagram for tbb::flow::interface8::receiver< T >:
-
-
- - -tbb::flow::interface8::broadcast_node< T > -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::limiter_node< T > -tbb::flow::interface8::overwrite_node< T > -tbb::flow::interface8::priority_queue_node< T, Compare, A > -tbb::flow::interface8::queue_node< T, A > -tbb::flow::interface8::write_once_node< T > -tbb::flow::interface8::sequencer_node< T, A > - -
- - - - - - - - - - -

Public Types

-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual built_predecessors_typebuilt_predecessors ()=0
 
-virtual void internal_add_built_predecessor (predecessor_type &)=0
 
-virtual void internal_delete_built_predecessor (predecessor_type &)=0
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
-virtual size_t predecessor_count ()=0
 
- - - - - - - -

-Protected Member Functions

-virtual task * try_put_task (const T &t)=0
 
-virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 
-virtual bool is_continue_receiver ()
 
- - - - - - - - - - - - - - - - - - - - - + +

-Friends

-template<typename R , typename B >
class run_and_put_task
 put item to successor; return task to run the successor if possible.
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
-template<typename U >
class limiter_node
 put receiver back in initial state
 
-template<typename TT , typename M >
class internal::successor_cache
 
-template<typename , typename >
class proxy_dependency_receiver
 
+typedef tbb_allocator< U > other
 
-

Detailed Description

-

template<typename T>
-class tbb::flow::interface8::receiver< T >

- -

Pure virtual template class that defines a receiver of messages of type T.

-

The documentation for this class was generated from the following file:
    -
  • flow_graph.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00155.png b/doc/html/a00155.png deleted file mode 100644 index f765e3ebb5ebb0e3f2ed23359f95a6fea80c51f1..0000000000000000000000000000000000000000 Binary files a/doc/html/a00155.png and /dev/null differ diff --git a/doc/html/a00156.html b/doc/html/a00156.html index d277bfcab12e72fcee35ce9616dae28c8c63d8cb..ea764a982d3a51f22f2f3e65968e641a8b8d251d 100644 --- a/doc/html/a00156.html +++ b/doc/html/a00156.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::receiver< dependency_msg< T, Factory > > Class Template Reference +tbb::tbb_allocator< void >::rebind< U > Struct Template Reference @@ -33,82 +33,31 @@
-
tbb::flow::interface8::receiver< dependency_msg< T, Factory > > Class Template Referenceabstract
+
tbb::tbb_allocator< void >::rebind< U > Struct Template Reference
-
-Inheritance diagram for tbb::flow::interface8::receiver< dependency_msg< T, Factory > >:
-
-
- - -tbb::flow::interface8::proxy_dependency_receiver< T, Factory > - -
- - - - - -

Public Types

-typedef sender< dependency_msg
-< T, Factory > > 
dependency_predecessor_type
 The predecessor type for this node.
 
-typedef
-proxy_dependency_receiver< T,
-Factory > 
proxy
 
- - - - - - - - - - - - - - - -

-Public Member Functions

-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual task * try_put_task (const dependency_msg< T, Factory > &)=0
 Put an item to the receiver.
 
-virtual bool register_predecessor (dependency_predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (dependency_predecessor_type &)
 Remove a predecessor from the node.
 
-ordinary_receiver & ordinary_receiver ()
 
- - - - - - + +

-Protected Member Functions

-virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 put receiver back in initial state
 
-virtual bool is_continue_receiver ()
 
+typedef tbb_allocator< U > other
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00157.html b/doc/html/a00157.html index 2947993ae05cb020068eaaf09e831489f52afece..e8a69421a85d8cc9c5aa434373a231df49a80986 100644 --- a/doc/html/a00157.html +++ b/doc/html/a00157.html @@ -4,7 +4,7 @@ -tbb::recursive_mutex Class Reference +tbb::flow::interface8::receiver< T > Class Template Reference @@ -33,127 +33,149 @@
-
tbb::recursive_mutex Class Reference
+
tbb::flow::interface8::receiver< T > Class Template Referenceabstract
-

#include <recursive_mutex.h>

+

Pure virtual template class that defines a receiver of messages of type T. + More...

+ +

#include <flow_graph.h>

-Inheritance diagram for tbb::recursive_mutex:
+Inheritance diagram for tbb::flow::interface8::receiver< T >:
- - + + +tbb::flow::interface8::broadcast_node< T > +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::limiter_node< T > +tbb::flow::interface8::overwrite_node< T > +tbb::flow::interface8::priority_queue_node< T, Compare, A > +tbb::flow::interface8::queue_node< T, A > +tbb::flow::interface8::write_once_node< T > +tbb::flow::interface8::sequencer_node< T, A >
- - - - -

-Classes

class  scoped_lock
 The scoped locking pattern. More...
 
- - - - - + + + + + + + + + +

Public Types

-typedef LPCRITICAL_SECTION native_handle_type
 Return native_handle.
 
-typedef pthread_mutex_t * native_handle_type
 
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

recursive_mutex ()
 Construct unacquired recursive_mutex.
 
-void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
-void unlock ()
 Release lock.
 
-native_handle_type native_handle ()
 
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual built_predecessors_typebuilt_predecessors ()=0
 
+virtual void internal_add_built_predecessor (predecessor_type &)=0
 
+virtual void internal_delete_built_predecessor (predecessor_type &)=0
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
+virtual size_t predecessor_count ()=0
 
- - - - - - - + + + + + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = true
 
-static const bool is_fair_mutex = false
 

+Protected Member Functions

+virtual task * try_put_task (const T &t)=0
 
+virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 
+virtual bool is_continue_receiver ()
 
- - + + + + + + + + + + + + + + + + + + + +

Friends

-class scoped_lock
 
+template<typename R , typename B >
class run_and_put_task
 put item to successor; return task to run the successor if possible.
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+template<typename U >
class limiter_node
 put receiver back in initial state
 
+template<typename TT , typename M >
class internal::successor_cache
 
+template<typename , typename >
class proxy_dependency_receiver
 

Detailed Description

-

Mutex that allows recursive mutex acquisition.

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
bool tbb::recursive_mutex::try_lock ()
-
-inline
-
- -

Try acquiring lock (non-blocking)

-

Return true if lock acquired; false otherwise.

+

template<typename T>
+class tbb::flow::interface8::receiver< T >

-

References tbb::aligned_space< T, N >::begin().

- -

Referenced by tbb::recursive_mutex::scoped_lock::try_acquire().

- -
-
-
The documentation for this class was generated from the following file:
    -
  • recursive_mutex.h
  • +

    Pure virtual template class that defines a receiver of messages of type T.

    +

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00157.png b/doc/html/a00157.png index 3157a913de76891db2928ba797af89eeb5eb82f1..f765e3ebb5ebb0e3f2ed23359f95a6fea80c51f1 100644 Binary files a/doc/html/a00157.png and b/doc/html/a00157.png differ diff --git a/doc/html/a00158.html b/doc/html/a00158.html index a8d0a75bceb1155e03ef04f5f637571ee34cd77e..b26185604e6b9c376b7c40a32bbd528b73198f6d 100644 --- a/doc/html/a00158.html +++ b/doc/html/a00158.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::internal::round_robin_cache< T, M > Class Template Reference +tbb::flow::interface8::receiver< dependency_msg< T, Factory > > Class Template Reference @@ -33,21 +33,82 @@
+
-
tbb::flow::interface8::internal::round_robin_cache< T, M > Class Template Reference
+
tbb::flow::interface8::receiver< dependency_msg< T, Factory > > Class Template Referenceabstract
+
+Inheritance diagram for tbb::flow::interface8::receiver< dependency_msg< T, Factory > >:
+
+
+ + +tbb::flow::interface8::proxy_dependency_receiver< T, Factory > + +
+ + + + + + + +

+Public Types

+typedef sender< dependency_msg
+< T, Factory > > 
predecessor_type
 The predecessor type for this node.
 
+typedef
+proxy_dependency_receiver< T,
+Factory > 
proxy
 
+ + + + + + + + + + + + + + + +

+Public Member Functions

+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual task * try_put_task (const dependency_msg< T, Factory > &)=0
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+ordinary_receiver & ordinary_receiver ()
 
+ + + + + + +

+Protected Member Functions

+virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 put receiver back in initial state
 
+virtual bool is_continue_receiver ()
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00156.png b/doc/html/a00158.png similarity index 100% rename from doc/html/a00156.png rename to doc/html/a00158.png diff --git a/doc/html/a00159.html b/doc/html/a00159.html index 967213b8bba4116bbade970261d13ee94b652b91..b61656e20f48d7418cd8ee99618bffa2dfa6e171 100644 --- a/doc/html/a00159.html +++ b/doc/html/a00159.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::run_and_put_task< R, B > Class Template Reference +tbb::recursive_mutex Class Reference @@ -33,21 +33,127 @@
+
-
tbb::flow::interface8::run_and_put_task< R, B > Class Template Reference
+
tbb::recursive_mutex Class Reference
+ +

#include <recursive_mutex.h>

+
+Inheritance diagram for tbb::recursive_mutex:
+
+
+ + + +
+ + + + + +

+Classes

class  scoped_lock
 The scoped locking pattern. More...
 
+ + + + + + +

+Public Types

+typedef LPCRITICAL_SECTION native_handle_type
 Return native_handle.
 
+typedef pthread_mutex_t * native_handle_type
 
+ + + + + + + + + + + + + + + +

+Public Member Functions

recursive_mutex ()
 Construct unacquired recursive_mutex.
 
+void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
+void unlock ()
 Release lock.
 
+native_handle_type native_handle ()
 
+ + + + + + + +

+Static Public Attributes

+static const bool is_rw_mutex = false
 
+static const bool is_recursive_mutex = true
 
+static const bool is_fair_mutex = false
 
+ + + +

+Friends

+class scoped_lock
 
+

Detailed Description

+

Mutex that allows recursive mutex acquisition.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool tbb::recursive_mutex::try_lock ()
+
+inline
+
+ +

Try acquiring lock (non-blocking)

+

Return true if lock acquired; false otherwise.

+ +

References tbb::aligned_space< T, N >::begin().

+ +

Referenced by tbb::recursive_mutex::scoped_lock::try_acquire().

+ +
+

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00159.png b/doc/html/a00159.png new file mode 100644 index 0000000000000000000000000000000000000000..3157a913de76891db2928ba797af89eeb5eb82f1 Binary files /dev/null and b/doc/html/a00159.png differ diff --git a/doc/html/a00160.html b/doc/html/a00160.html index e99a28a9081cd0e65384b9b105192609c920e629..4273db8cef272e0227162238b95eb03301087657 100644 --- a/doc/html/a00160.html +++ b/doc/html/a00160.html @@ -4,7 +4,7 @@ -tbb::interface6::runtime_loader Class Reference +tbb::flow::interface8::internal::round_robin_cache< T, M > Class Template Reference @@ -33,286 +33,21 @@
-
-
tbb::interface6::runtime_loader Class Reference
+
tbb::flow::interface8::internal::round_robin_cache< T, M > Class Template Reference
- -

Load TBB at runtime. - More...

- -

#include <runtime_loader.h>

-
-Inheritance diagram for tbb::interface6::runtime_loader:
-
-
- - - -
- - - - - - - - -

-Public Types

enum  error_mode { em_status, -em_throw, -em_abort - }
 Error mode constants. More...
 
enum  error_code {
-  ec_ok, -ec_bad_call, -ec_bad_arg, -ec_bad_lib, -
-  ec_bad_ver, -ec_no_lib -
- }
 Error codes. More...
 
- - - - - - - - - - - - - - - - -

-Public Member Functions

runtime_loader (error_mode mode=em_abort)
 Initialize object but do not load TBB.
 
 runtime_loader (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX, error_mode mode=em_abort)
 Initialize object and load TBB. More...
 
~runtime_loader ()
 Destroy object.
 
error_code load (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX)
 Load TBB. More...
 
error_code status ()
 Report status. More...
 
-

Detailed Description

-

Load TBB at runtime.

-

Usage:

-

In source code:

-
#include "tbb/runtime_loader.h"
-
-
char const * path[] = { "<install dir>/lib/ia32", NULL };
-
tbb::runtime_loader loader( path );
-
-
// Now use TBB.
-

Link with tbbproxy.lib (or libtbbproxy.a) instead of tbb.lib (libtbb.dylib, libtbb.so).

-

TBB library will be loaded at runtime from <install dir>="">/lib/ia32 directory.

-

Attention:

-

All runtime_loader objects (in the same module, i.e. exe or dll) share some global state. The most noticeable piece of global state is loaded TBB library. There are some implications:

-
-   Only one TBB library can be loaded per module.
-
--   If one object has already loaded TBB library, another object will not load TBB.
-    If the loaded TBB library is suitable for the second object, both will use TBB
-    cooperatively, otherwise the second object will report an error.
-
--   \c runtime_loader objects will not work (correctly) in parallel due to absence of
-    synchronization.

Member Enumeration Documentation

- -
-
- -

Error codes.

- - - - - - - -
Enumerator
ec_ok  -

No errors.

-
ec_bad_call  -

Invalid function call (e. g. load() called when TBB is already loaded).

-
ec_bad_arg  -

Invalid argument passed.

-
ec_bad_lib  -

Invalid library found (e. g. TBB_runtime_version symbol not found).

-
ec_bad_ver  -

TBB found but version is not suitable.

-
ec_no_lib  -

No suitable TBB library found.

-
- -
-
- -
-
- -

Error mode constants.

- - - - -
Enumerator
em_status  -

Save status of operation and continue.

-
em_throw  -

Throw an exception of tbb::runtime_loader::error_code type.

-
em_abort  -

Print message to stderr and call abort().

-
- -
-
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
tbb::interface6::runtime_loader::runtime_loader (char const * path[],
int min_ver = TBB_INTERFACE_VERSION,
int max_ver = INT_MAX,
error_mode mode = em_abort 
)
-
- -

Initialize object and load TBB.

-

See load() for details.

-

If error mode is em_status, call status() to check whether TBB was loaded or not.

-
Parameters
- - - - - -
pathList of directories to search TBB in.
min_verMinimal suitable version of TBB.
max_verMaximal suitable version of TBB.
modeError mode for this object.
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
error_code tbb::interface6::runtime_loader::load (char const * path[],
int min_ver = TBB_INTERFACE_VERSION,
int max_ver = INT_MAX 
)
-
- -

Load TBB.

-

The method searches the directories specified in path[] array for the TBB library. When the library is found, it is loaded and its version is checked. If the version is not suitable, the library is unloaded, and the search continues.

-

Note:

-

For security reasons, avoid using relative directory names. For example, never load TBB from current ("."), parent ("..") or any other relative directory (like "lib" ). Use only absolute directory names (e. g. "/usr/local/lib").

-

For the same security reasons, avoid using system default directories ("") on Windows. (See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details.)

-

Neglecting these rules may cause your program to execute 3-rd party malicious code.

-

Errors:

-
    -
  • ec_bad_call - TBB already loaded by this object.
  • -
  • ec_bad_arg - min_ver and/or max_ver negative or zero, or min_ver > max_ver.
  • -
  • ec_bad_ver - TBB of unsuitable version already loaded by another object.
  • -
  • ec_no_lib - No suitable library found.
  • -
-
Parameters
- - - - -
pathList of directories to search TBB in.
min_verMinimal suitable version of TBB.
max_verMaximal suitable version of TBB.
-
-
- -
-
- -
-
- - - - - - - -
error_code tbb::interface6::runtime_loader::status ()
-
- -

Report status.

-

If error mode is em_status, the function returns status of the last operation.

- -
-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00161.html b/doc/html/a00161.html index f53776d4d7e2c76334a4f5d4592abd751800950b..99264afd98a40f5d7638442d54858ca90b3512b1 100644 --- a/doc/html/a00161.html +++ b/doc/html/a00161.html @@ -4,7 +4,7 @@ -tbb::scalable_allocator< T > Class Template Reference +tbb::flow::interface8::run_and_put_task< R, B > Class Template Reference @@ -33,110 +33,21 @@
-
-
tbb::scalable_allocator< T > Class Template Reference
+
tbb::flow::interface8::run_and_put_task< R, B > Class Template Reference
- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. - More...

- -

#include <scalable_allocator.h>

- - - - -

-Classes

struct  rebind
 
- - - - - - - - - - - - - - - -

-Public Types

-typedef
-internal::allocator_type< T >
-::value_type 
value_type
 
-typedef value_type * pointer
 
-typedef const value_type * const_pointer
 
-typedef value_type & reference
 
-typedef const value_type & const_reference
 
-typedef size_t size_type
 
-typedef ptrdiff_t difference_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

scalable_allocator (const scalable_allocator &) throw ()
 
-template<typename U >
 scalable_allocator (const scalable_allocator< U > &) throw ()
 
-pointer address (reference x) const
 
-const_pointer address (const_reference x) const
 
-pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
-void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
-size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
-template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 
-void construct (pointer p, value_type &&value)
 
-void construct (pointer p, const value_type &value)
 
-void destroy (pointer p)
 
-

Detailed Description

-

template<typename T>
-class tbb::scalable_allocator< T >

- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

-

The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00162.html b/doc/html/a00162.html index a2e5315f28cd4681af9daa66fb163ee497afd508..0cf654890f5b75360175ef89e47e7f5cfae3c674 100644 --- a/doc/html/a00162.html +++ b/doc/html/a00162.html @@ -4,7 +4,7 @@ -tbb::scalable_allocator< void > Class Template Reference +tbb::interface6::runtime_loader Class Reference @@ -33,53 +33,286 @@
-
tbb::scalable_allocator< void > Class Template Reference
+
tbb::interface6::runtime_loader Class Reference
-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. +

Load TBB at runtime. More...

-

#include <scalable_allocator.h>

+

#include <runtime_loader.h>

+
+Inheritance diagram for tbb::interface6::runtime_loader:
+
+
+ + + +
- - - -

-Classes

struct  rebind
 
- - - - - - + + + + + + +

Public Types

-typedef void * pointer
 
-typedef const void * const_pointer
 
-typedef void value_type
 
enum  error_mode { em_status, +em_throw, +em_abort + }
 Error mode constants. More...
 
enum  error_code {
+  ec_ok, +ec_bad_call, +ec_bad_arg, +ec_bad_lib, +
+  ec_bad_ver, +ec_no_lib +
+ }
 Error codes. More...
 
+ + + + + + + + + + + + + + + +

+Public Member Functions

runtime_loader (error_mode mode=em_abort)
 Initialize object but do not load TBB.
 
 runtime_loader (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX, error_mode mode=em_abort)
 Initialize object and load TBB. More...
 
~runtime_loader ()
 Destroy object.
 
error_code load (char const *path[], int min_ver=TBB_INTERFACE_VERSION, int max_ver=INT_MAX)
 Load TBB. More...
 
error_code status ()
 Report status. More...
 

Detailed Description

-

template<>
-class tbb::scalable_allocator< void >

+

Load TBB at runtime.

+

Usage:

+

In source code:

+
#include "tbb/runtime_loader.h"
+
+
char const * path[] = { "<install dir>/lib/ia32", NULL };
+
tbb::runtime_loader loader( path );
+
+
// Now use TBB.
+

Link with tbbproxy.lib (or libtbbproxy.a) instead of tbb.lib (libtbb.dylib, libtbb.so).

+

TBB library will be loaded at runtime from <install dir>="">/lib/ia32 directory.

+

Attention:

+

All runtime_loader objects (in the same module, i.e. exe or dll) share some global state. The most noticeable piece of global state is loaded TBB library. There are some implications:

+
-   Only one TBB library can be loaded per module.
+
+-   If one object has already loaded TBB library, another object will not load TBB.
+    If the loaded TBB library is suitable for the second object, both will use TBB
+    cooperatively, otherwise the second object will report an error.
+
+-   \c runtime_loader objects will not work (correctly) in parallel due to absence of
+    synchronization.

Member Enumeration Documentation

+ +
+
+ +

Error codes.

+ + + + + + + +
Enumerator
ec_ok  +

No errors.

+
ec_bad_call  +

Invalid function call (e. g. load() called when TBB is already loaded).

+
ec_bad_arg  +

Invalid argument passed.

+
ec_bad_lib  +

Invalid library found (e. g. TBB_runtime_version symbol not found).

+
ec_bad_ver  +

TBB found but version is not suitable.

+
ec_no_lib  +

No suitable TBB library found.

+
+ +
+
+ +
+
+ +

Error mode constants.

+ + + + +
Enumerator
em_status  +

Save status of operation and continue.

+
em_throw  +

Throw an exception of tbb::runtime_loader::error_code type.

+
em_abort  +

Print message to stderr and call abort().

+
+ +
+
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tbb::interface6::runtime_loader::runtime_loader (char const * path[],
int min_ver = TBB_INTERFACE_VERSION,
int max_ver = INT_MAX,
error_mode mode = em_abort 
)
+
+ +

Initialize object and load TBB.

+

See load() for details.

+

If error mode is em_status, call status() to check whether TBB was loaded or not.

+
Parameters
+ + + + + +
pathList of directories to search TBB in.
min_verMinimal suitable version of TBB.
max_verMaximal suitable version of TBB.
modeError mode for this object.
+
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
error_code tbb::interface6::runtime_loader::load (char const * path[],
int min_ver = TBB_INTERFACE_VERSION,
int max_ver = INT_MAX 
)
+
+ +

Load TBB.

+

The method searches the directories specified in path[] array for the TBB library. When the library is found, it is loaded and its version is checked. If the version is not suitable, the library is unloaded, and the search continues.

+

Note:

+

For security reasons, avoid using relative directory names. For example, never load TBB from current ("."), parent ("..") or any other relative directory (like "lib" ). Use only absolute directory names (e. g. "/usr/local/lib").

+

For the same security reasons, avoid using system default directories ("") on Windows. (See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details.)

+

Neglecting these rules may cause your program to execute 3-rd party malicious code.

+

Errors:

+
    +
  • ec_bad_call - TBB already loaded by this object.
  • +
  • ec_bad_arg - min_ver and/or max_ver negative or zero, or min_ver > max_ver.
  • +
  • ec_bad_ver - TBB of unsuitable version already loaded by another object.
  • +
  • ec_no_lib - No suitable library found.
  • +
+
Parameters
+ + + + +
pathList of directories to search TBB in.
min_verMinimal suitable version of TBB.
max_verMaximal suitable version of TBB.
+
+
-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

-

The documentation for this class was generated from the following file:
+
+ +
+
+ + + + + + + +
error_code tbb::interface6::runtime_loader::status ()
+
+ +

Report status.

+

If error mode is em_status, the function returns status of the last operation.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • runtime_loader.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00160.png b/doc/html/a00162.png similarity index 100% rename from doc/html/a00160.png rename to doc/html/a00162.png diff --git a/doc/html/a00163.html b/doc/html/a00163.html index a85019c31520024995b8a87e1064b6b01f625751..3fddc94d5a62a2e259053fadc7e10aeafa4287cd 100644 --- a/doc/html/a00163.html +++ b/doc/html/a00163.html @@ -4,7 +4,7 @@ -tbb::spin_mutex::scoped_lock Class Reference +tbb::scalable_allocator< T > Class Template Reference @@ -33,101 +33,110 @@
-
tbb::spin_mutex::scoped_lock Class Reference
+
tbb::scalable_allocator< T > Class Template Reference
-

Represents acquisition of a mutex. +

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...

-

#include <spin_mutex.h>

-
-Inheritance diagram for tbb::spin_mutex::scoped_lock:
-
-
- - - -
+

#include <scalable_allocator.h>

+ + + +

+Classes

struct  rebind
 
+ + + + + + + + + + + + + + + +

+Public Types

+typedef
+internal::allocator_type< T >
+::value_type 
value_type
 
+typedef value_type * pointer
 
+typedef const value_type * const_pointer
 
+typedef value_type & reference
 
+typedef const value_type & const_reference
 
+typedef size_t size_type
 
+typedef ptrdiff_t difference_type
 
- - - - - - - - - - - - - - - - - - -

Public Member Functions

scoped_lock ()
 Construct without acquiring a mutex.
 
scoped_lock (spin_mutex &m)
 Construct and acquire lock on a mutex.
 
-void acquire (spin_mutex &m)
 Acquire lock.
 
bool try_acquire (spin_mutex &m)
 Try acquiring lock (non-blocking) More...
 
-void release ()
 Release lock.
 
~scoped_lock ()
 Destroy lock. If holding a lock, releases the lock first.
 
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Friends

-class spin_mutex
 
scalable_allocator (const scalable_allocator &) throw ()
 
+template<typename U >
 scalable_allocator (const scalable_allocator< U > &) throw ()
 
+pointer address (reference x) const
 
+const_pointer address (const_reference x) const
 
+pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
+void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
+size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
+template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 
+void construct (pointer p, value_type &&value)
 
+void construct (pointer p, const value_type &value)
 
+void destroy (pointer p)
 

Detailed Description

-

Represents acquisition of a mutex.

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - - -
bool tbb::spin_mutex::scoped_lock::try_acquire (spin_mutexm)
-
-inline
-
+

template<typename T>
+class tbb::scalable_allocator< T >

-

Try acquiring lock (non-blocking)

-

Return true if lock acquired; false otherwise.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • spin_mutex.h
  • +

    Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

    +

    The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

    +

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00163.png b/doc/html/a00163.png deleted file mode 100644 index 25da9c6ba09d573b82ff7e6295013c42ed53edd9..0000000000000000000000000000000000000000 Binary files a/doc/html/a00163.png and /dev/null differ diff --git a/doc/html/a00164.html b/doc/html/a00164.html index 1959cbbbaab839326d4e254b18d8a04eb72f7eaf..4084b6d364a04c8a6e93e4bc429aa25928ef04e3 100644 --- a/doc/html/a00164.html +++ b/doc/html/a00164.html @@ -4,7 +4,7 @@ -tbb::queuing_mutex::scoped_lock Class Reference +tbb::scalable_allocator< void > Class Template Reference @@ -33,94 +33,53 @@
-
tbb::queuing_mutex::scoped_lock Class Reference
+
tbb::scalable_allocator< void > Class Template Reference
-

The scoped locking pattern. +

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. More...

-

#include <queuing_mutex.h>

-
-Inheritance diagram for tbb::queuing_mutex::scoped_lock:
-
-
- - - -
+

#include <scalable_allocator.h>

- - - - - - - - - - - - - - - - - - - + + + +

-Public Member Functions

 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (queuing_mutex &m)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
-void __TBB_EXPORTED_METHOD acquire (queuing_mutex &m)
 Acquire lock on given mutex.
 
-bool __TBB_EXPORTED_METHOD try_acquire (queuing_mutex &m)
 Acquire lock on given mutex if free (i.e. non-blocking)
 
-void __TBB_EXPORTED_METHOD release ()
 Release lock.
 

+Classes

struct  rebind
 
+ + + + + + +

+Public Types

+typedef void * pointer
 
+typedef const void * const_pointer
 
+typedef void value_type
 

Detailed Description

-

The scoped locking pattern.

-

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - -
tbb::queuing_mutex::scoped_lock::scoped_lock ()
-
-inline
-
- -

Construct lock that has not acquired a mutex.

-

Equivalent to zero-initialization of *this.

+

template<>
+class tbb::scalable_allocator< void >

-
-
-
The documentation for this class was generated from the following file:
    -
  • queuing_mutex.h
  • +

    Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

    +

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00164.png b/doc/html/a00164.png deleted file mode 100644 index 611457f0e8f9f148ec8a56d0ffee01acb4892bd2..0000000000000000000000000000000000000000 Binary files a/doc/html/a00164.png and /dev/null differ diff --git a/doc/html/a00165.html b/doc/html/a00165.html index c4361b967e4427243ee7f741155da1429d5a0917..a76740e09aebb65a093c18bb1d143ef0e3888fa9 100644 --- a/doc/html/a00165.html +++ b/doc/html/a00165.html @@ -4,7 +4,7 @@ -tbb::spin_rw_mutex_v3::scoped_lock Class Reference +tbb::queuing_mutex::scoped_lock Class Reference @@ -33,87 +33,62 @@
-
tbb::spin_rw_mutex_v3::scoped_lock Class Reference
+
tbb::queuing_mutex::scoped_lock Class Reference

The scoped locking pattern. More...

-

#include <spin_rw_mutex.h>

+

#include <queuing_mutex.h>

-Inheritance diagram for tbb::spin_rw_mutex_v3::scoped_lock:
+Inheritance diagram for tbb::queuing_mutex::scoped_lock:
- - + +
- - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (spin_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
-void acquire (spin_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
bool upgrade_to_writer ()
 Upgrade reader to become a writer. More...
 
-void release ()
 Release lock.
 
-bool downgrade_to_reader ()
 Downgrade writer to become a reader.
 
-bool try_acquire (spin_rw_mutex &m, bool write=true)
 Try acquire lock on given mutex.
 
- - - - - - - -

-Protected Attributes

-spin_rw_mutexmutex
 The pointer to the current mutex that is held, or NULL if no mutex is held.
 
bool is_writer
 If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. More...
 
- - - + + + + + + + + + + + + + + + + + +

-Friends

-class tbb::interface8::internal::x86_rtm_rw_mutex
 
 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (queuing_mutex &m)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
+void __TBB_EXPORTED_METHOD acquire (queuing_mutex &m)
 Acquire lock on given mutex.
 
+bool __TBB_EXPORTED_METHOD try_acquire (queuing_mutex &m)
 Acquire lock on given mutex if free (i.e. non-blocking)
 
+void __TBB_EXPORTED_METHOD release ()
 Release lock.
 

Detailed Description

The scoped locking pattern.

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

Constructor & Destructor Documentation

- +
@@ -121,7 +96,7 @@ class  - + - - + + - - + + - - + + @@ -72,279 +72,281 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tbb::interface8::int - + @@ -137,70 +112,15 @@ class 

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/files.html b/doc/html/files.html index f8203a0b25a75637aa1abdc87fad8a1af813d635..cf240e163acbcd9f8c3bf18e1f483018f948feb3 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -38,15 +38,15 @@
Here is a list of all documented files with brief descriptions:
tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock tbb::queuing_mutex::scoped_lock::scoped_lock ( ) tbb::interface8::int

Construct lock that has not acquired a mutex.

Equivalent to zero-initialization of *this.

- - -

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer ()
-
-inline
-
- -

Upgrade reader to become a writer.

-

Returns whether the upgrade happened without releasing and re-acquiring the lock

- -

References is_writer.

- -
-
-

Member Data Documentation

- -
-
- - - - - -
- - - - -
bool tbb::spin_rw_mutex_v3::scoped_lock::is_writer
-
-protected
-
- -

If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock.

-

Not defined if not holding a lock.

- -

Referenced by acquire(), downgrade_to_reader(), release(), try_acquire(), and upgrade_to_writer().

-

The documentation for this class was generated from the following file:
    -
  • spin_rw_mutex.h
  • +
  • queuing_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00165.png b/doc/html/a00165.png index 13249c6a5c9189fb4202efb8b5609124c7dc489e..611457f0e8f9f148ec8a56d0ffee01acb4892bd2 100644 Binary files a/doc/html/a00165.png and b/doc/html/a00165.png differ diff --git a/doc/html/a00166.html b/doc/html/a00166.html index 2734d8865850d7bfa25744730387c91c350ee4c8..c52f7da468d4def053bb36ed3da7da8b8fce0adb 100644 --- a/doc/html/a00166.html +++ b/doc/html/a00166.html @@ -4,7 +4,7 @@ -tbb::recursive_mutex::scoped_lock Class Reference +tbb::spin_rw_mutex_v3::scoped_lock Class Reference @@ -33,75 +33,174 @@
-
tbb::recursive_mutex::scoped_lock Class Reference
+
tbb::spin_rw_mutex_v3::scoped_lock Class Reference

The scoped locking pattern. More...

-

#include <recursive_mutex.h>

+

#include <spin_rw_mutex.h>

-Inheritance diagram for tbb::recursive_mutex::scoped_lock:
+Inheritance diagram for tbb::spin_rw_mutex_v3::scoped_lock:
- - + +
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

scoped_lock ()
 Construct lock that has not acquired a recursive_mutex.
 
scoped_lock (recursive_mutex &mutex)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
-void acquire (recursive_mutex &mutex)
 Acquire lock on given mutex.
 
-bool try_acquire (recursive_mutex &mutex)
 Try acquire lock on given recursive_mutex.
 
-void release ()
 Release lock.
 
 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (spin_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
+void acquire (spin_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
bool upgrade_to_writer ()
 Upgrade reader to become a writer. More...
 
+void release ()
 Release lock.
 
+bool downgrade_to_reader ()
 Downgrade writer to become a reader.
 
+bool try_acquire (spin_rw_mutex &m, bool write=true)
 Try acquire lock on given mutex.
 
+ + + + + + +

+Protected Attributes

+spin_rw_mutexmutex
 The pointer to the current mutex that is held, or NULL if no mutex is held.
 
bool is_writer
 If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. More...
 
- - + +

Friends

-class recursive_mutex
 
+class tbb::interface8::internal::x86_rtm_rw_mutex
 

Detailed Description

The scoped locking pattern.

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

-

The documentation for this class was generated from the following file:
    -
  • recursive_mutex.h
  • +

    Constructor & Destructor Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    tbb::spin_rw_mutex_v3::scoped_lock::scoped_lock ()
    +
    +inline
    +
    + +

    Construct lock that has not acquired a mutex.

    +

    Equivalent to zero-initialization of *this.

    + +
    +
    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    bool tbb::spin_rw_mutex_v3::scoped_lock::upgrade_to_writer ()
    +
    +inline
    +
    + +

    Upgrade reader to become a writer.

    +

    Returns whether the upgrade happened without releasing and re-acquiring the lock

    + +

    References is_writer.

    + +
    +
    +

    Member Data Documentation

    + +
    +
    + + + + + +
    + + + + +
    bool tbb::spin_rw_mutex_v3::scoped_lock::is_writer
    +
    +protected
    +
    + +

    If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock.

    +

    Not defined if not holding a lock.

    + +

    Referenced by acquire(), downgrade_to_reader(), release(), try_acquire(), and upgrade_to_writer().

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • spin_rw_mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00166.png b/doc/html/a00166.png index 9d4ec98b911f2d18a41fad4e3ce2d10c7aa42596..13249c6a5c9189fb4202efb8b5609124c7dc489e 100644 Binary files a/doc/html/a00166.png and b/doc/html/a00166.png differ diff --git a/doc/html/a00167.html b/doc/html/a00167.html index a3e9ae23a3e4245507c2c46ca24c89f5f44cde41..8704f461ff484bec8764c7d835590ce21dfcd647 100644 --- a/doc/html/a00167.html +++ b/doc/html/a00167.html @@ -4,7 +4,7 @@ -tbb::queuing_rw_mutex::scoped_lock Class Reference +tbb::interface5::reader_writer_lock::scoped_lock Class Reference @@ -33,120 +33,65 @@
-
tbb::queuing_rw_mutex::scoped_lock Class Reference
+
tbb::interface5::reader_writer_lock::scoped_lock Class Reference
-

The scoped locking pattern. +

The scoped lock pattern for write locks. More...

-

#include <queuing_rw_mutex.h>

+

#include <reader_writer_lock.h>

-Inheritance diagram for tbb::queuing_rw_mutex::scoped_lock:
+Inheritance diagram for tbb::interface5::reader_writer_lock::scoped_lock:
- - + +
- - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +

Public Member Functions

 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
-void acquire (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
-bool try_acquire (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex if free (i.e. non-blocking)
 
-void release ()
 Release lock.
 
bool upgrade_to_writer ()
 Upgrade reader to become a writer. More...
 
-bool downgrade_to_reader ()
 Downgrade writer to become a reader.
 
scoped_lock (reader_writer_lock &lock)
 Construct with blocking attempt to acquire write lock on the passed-in lock.
 
~scoped_lock ()
 Destructor, releases the write lock.
 
+void * operator new (size_t s)
 
+void operator delete (void *p)
 
+ + +

+Friends

+class reader_writer_lock
 

Detailed Description

-

The scoped locking pattern.

-

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - -
tbb::queuing_rw_mutex::scoped_lock::scoped_lock ()
-
-inline
-
- -

Construct lock that has not acquired a mutex.

-

Equivalent to zero-initialization of *this.

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer ()
-
- -

Upgrade reader to become a writer.

-

Returns whether the upgrade happened without releasing and re-acquiring the lock

- -
-
-
The documentation for this class was generated from the following file:
    -
  • queuing_rw_mutex.h
  • +

    The scoped lock pattern for write locks.

    +

    Scoped locks help avoid the common problem of forgetting to release the lock. This type also serves as the node for queuing locks.

    +

    The documentation for this class was generated from the following file:
      +
    • reader_writer_lock.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00167.png b/doc/html/a00167.png index 227e99a9e7146d2e7de5a746eb21af449090be9c..a999a7d0cd0bd7f4fb4169b8e0db9283f0821121 100644 Binary files a/doc/html/a00167.png and b/doc/html/a00167.png differ diff --git a/doc/html/a00168.html b/doc/html/a00168.html index 201f5e6daf4c15703b91d626fd4f102e2c640d34..7a4e7e027951e28d02ee29b6a947d39616809bb1 100644 --- a/doc/html/a00168.html +++ b/doc/html/a00168.html @@ -4,7 +4,7 @@ -tbb::null_mutex::scoped_lock Class Reference +tbb::internal::critical_section_v4::scoped_lock Class Reference @@ -33,55 +33,39 @@
-
tbb::null_mutex::scoped_lock Class Reference
+
tbb::internal::critical_section_v4::scoped_lock Class Reference
- -

Represents acquisition of a mutex. - More...

- -

#include <null_mutex.h>

-Inheritance diagram for tbb::null_mutex::scoped_lock:
+Inheritance diagram for tbb::internal::critical_section_v4::scoped_lock:
- - + +
- - - - - - - - + +

Public Member Functions

scoped_lock (null_mutex &)
 
-void acquire (null_mutex &)
 
-bool try_acquire (null_mutex &)
 
-void release ()
 
scoped_lock (critical_section_v4 &lock_me)
 
-

Detailed Description

-

Represents acquisition of a mutex.

-

The documentation for this class was generated from the following file:
    -
  • null_mutex.h
  • +
    The documentation for this class was generated from the following file:
      +
    • critical_section.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00168.png b/doc/html/a00168.png index d8565aa377b4b6d12e30bda0927c2756bdb21acf..15626cfa0fabd91facbde8e62a8b58a223eb2eca 100644 Binary files a/doc/html/a00168.png and b/doc/html/a00168.png differ diff --git a/doc/html/a00169.html b/doc/html/a00169.html index b841c5284bf4e95c76678a585a2acfec23deefb2..4db9404a88db15ea8331ffa3b7434bcef6677153 100644 --- a/doc/html/a00169.html +++ b/doc/html/a00169.html @@ -4,7 +4,7 @@ -tbb::interface5::reader_writer_lock::scoped_lock Class Reference +tbb::queuing_rw_mutex::scoped_lock Class Reference @@ -33,65 +33,120 @@
-
tbb::interface5::reader_writer_lock::scoped_lock Class Reference
+
tbb::queuing_rw_mutex::scoped_lock Class Reference
-

The scoped lock pattern for write locks. +

The scoped locking pattern. More...

-

#include <reader_writer_lock.h>

+

#include <queuing_rw_mutex.h>

-Inheritance diagram for tbb::interface5::reader_writer_lock::scoped_lock:
+Inheritance diagram for tbb::queuing_rw_mutex::scoped_lock:
- - + +
- - - - - - - - - - -

Public Member Functions

scoped_lock (reader_writer_lock &lock)
 Construct with blocking attempt to acquire write lock on the passed-in lock.
 
~scoped_lock ()
 Destructor, releases the write lock.
 
-void * operator new (size_t s)
 
-void operator delete (void *p)
 
- - - + + + + + + + + + + + + + + + + + + + + + + + +

-Friends

-class reader_writer_lock
 
 scoped_lock ()
 Construct lock that has not acquired a mutex. More...
 
scoped_lock (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
+void acquire (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex.
 
+bool try_acquire (queuing_rw_mutex &m, bool write=true)
 Acquire lock on given mutex if free (i.e. non-blocking)
 
+void release ()
 Release lock.
 
bool upgrade_to_writer ()
 Upgrade reader to become a writer. More...
 
+bool downgrade_to_reader ()
 Downgrade writer to become a reader.
 

Detailed Description

-

The scoped lock pattern for write locks.

-

Scoped locks help avoid the common problem of forgetting to release the lock. This type also serves as the node for queuing locks.

-

The documentation for this class was generated from the following file:
    -
  • reader_writer_lock.h
  • +

    The scoped locking pattern.

    +

    It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

    +

    Constructor & Destructor Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    tbb::queuing_rw_mutex::scoped_lock::scoped_lock ()
    +
    +inline
    +
    + +

    Construct lock that has not acquired a mutex.

    +

    Equivalent to zero-initialization of *this.

    + +
    +
    +

    Member Function Documentation

    + +
    +
    + + + + + + + +
    bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer ()
    +
    + +

    Upgrade reader to become a writer.

    +

    Returns whether the upgrade happened without releasing and re-acquiring the lock

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • queuing_rw_mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00169.png b/doc/html/a00169.png index a999a7d0cd0bd7f4fb4169b8e0db9283f0821121..227e99a9e7146d2e7de5a746eb21af449090be9c 100644 Binary files a/doc/html/a00169.png and b/doc/html/a00169.png differ diff --git a/doc/html/a00170.html b/doc/html/a00170.html index 683e4087930fbf54f43cdf16309fa00a018a6b38..fe27a145d1fcfdbf2b8e4f506edb653948312706 100644 --- a/doc/html/a00170.html +++ b/doc/html/a00170.html @@ -4,7 +4,7 @@ -tbb::null_rw_mutex::scoped_lock Class Reference +tbb::recursive_mutex::scoped_lock Class Reference @@ -33,61 +33,75 @@
-
tbb::null_rw_mutex::scoped_lock Class Reference
+
tbb::recursive_mutex::scoped_lock Class Reference
-

Represents acquisition of a mutex. +

The scoped locking pattern. More...

-

#include <null_rw_mutex.h>

+

#include <recursive_mutex.h>

-Inheritance diagram for tbb::null_rw_mutex::scoped_lock:
+Inheritance diagram for tbb::recursive_mutex::scoped_lock:
- - + +
- - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +

Public Member Functions

scoped_lock (null_rw_mutex &, bool=true)
 
-void acquire (null_rw_mutex &, bool=true)
 
-bool upgrade_to_writer ()
 
-bool downgrade_to_reader ()
 
-bool try_acquire (null_rw_mutex &, bool=true)
 
-void release ()
 
scoped_lock ()
 Construct lock that has not acquired a recursive_mutex.
 
scoped_lock (recursive_mutex &mutex)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
+void acquire (recursive_mutex &mutex)
 Acquire lock on given mutex.
 
+bool try_acquire (recursive_mutex &mutex)
 Try acquire lock on given recursive_mutex.
 
+void release ()
 Release lock.
 
+ + +

+Friends

+class recursive_mutex
 

Detailed Description

-

Represents acquisition of a mutex.

+

The scoped locking pattern.

+

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.


The documentation for this class was generated from the following file:
    -
  • null_rw_mutex.h
  • +
  • recursive_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00170.png b/doc/html/a00170.png index 081a54dff5c3418a26e55aabe7207612d4a46482..9d4ec98b911f2d18a41fad4e3ce2d10c7aa42596 100644 Binary files a/doc/html/a00170.png and b/doc/html/a00170.png differ diff --git a/doc/html/a00171.html b/doc/html/a00171.html index d41c0c38a76654dcdbd3d86eaef0c7d6eab02980..05a75da378772bd79f01dfea6f506a2af4a9af2c 100644 --- a/doc/html/a00171.html +++ b/doc/html/a00171.html @@ -4,7 +4,7 @@ -tbb::internal::critical_section_v4::scoped_lock Class Reference +tbb::mutex::scoped_lock Class Reference @@ -33,39 +33,75 @@
-
tbb::internal::critical_section_v4::scoped_lock Class Reference
+
tbb::mutex::scoped_lock Class Reference
+ +

The scoped locking pattern. + More...

+ +

#include <mutex.h>

-Inheritance diagram for tbb::internal::critical_section_v4::scoped_lock:
+Inheritance diagram for tbb::mutex::scoped_lock:
- - + +
- - + + + + + + + + + + + + + + + + + + +

Public Member Functions

scoped_lock (critical_section_v4 &lock_me)
 
scoped_lock ()
 Construct lock that has not acquired a mutex.
 
scoped_lock (mutex &mutex)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
+void acquire (mutex &mutex)
 Acquire lock on given mutex.
 
+bool try_acquire (mutex &mutex)
 Try acquire lock on given mutex.
 
+void release ()
 Release lock.
 
+ + +

+Friends

+class mutex
 
-
The documentation for this class was generated from the following file:
    -
  • critical_section.h
  • +

    Detailed Description

    +

    The scoped locking pattern.

    +

    It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

    +

    The documentation for this class was generated from the following file:
      +
    • mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00171.png b/doc/html/a00171.png index 15626cfa0fabd91facbde8e62a8b58a223eb2eca..5450176d7fa5c18126f5e6f83daf7a63bab18728 100644 Binary files a/doc/html/a00171.png and b/doc/html/a00171.png differ diff --git a/doc/html/a00172.html b/doc/html/a00172.html index 56e3688c7ec6d81cc05ffc0368b12698bd9477c1..40e5f920a15e12bf70f260152f9205977b97ba0f 100644 --- a/doc/html/a00172.html +++ b/doc/html/a00172.html @@ -4,7 +4,7 @@ -tbb::mutex::scoped_lock Class Reference +tbb::spin_mutex::scoped_lock Class Reference @@ -33,75 +33,101 @@
-
tbb::mutex::scoped_lock Class Reference
+
tbb::spin_mutex::scoped_lock Class Reference
-

The scoped locking pattern. +

Represents acquisition of a mutex. More...

-

#include <mutex.h>

+

#include <spin_mutex.h>

-Inheritance diagram for tbb::mutex::scoped_lock:
+Inheritance diagram for tbb::spin_mutex::scoped_lock:
- - + +
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Public Member Functions

scoped_lock ()
 Construct lock that has not acquired a mutex.
 
scoped_lock (mutex &mutex)
 Acquire lock on given mutex.
 
~scoped_lock ()
 Release lock (if lock is held).
 
-void acquire (mutex &mutex)
 Acquire lock on given mutex.
 
-bool try_acquire (mutex &mutex)
 Try acquire lock on given mutex.
 
-void release ()
 Release lock.
 
scoped_lock ()
 Construct without acquiring a mutex.
 
scoped_lock (spin_mutex &m)
 Construct and acquire lock on a mutex.
 
+void acquire (spin_mutex &m)
 Acquire lock.
 
bool try_acquire (spin_mutex &m)
 Try acquiring lock (non-blocking) More...
 
+void release ()
 Release lock.
 
~scoped_lock ()
 Destroy lock. If holding a lock, releases the lock first.
 
- - + +

Friends

-class mutex
 
+class spin_mutex
 

Detailed Description

-

The scoped locking pattern.

-

It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.

-

The documentation for this class was generated from the following file:
    -
  • mutex.h
  • +

    Represents acquisition of a mutex.

    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + + +
    bool tbb::spin_mutex::scoped_lock::try_acquire (spin_mutexm)
    +
    +inline
    +
    + +

    Try acquiring lock (non-blocking)

    +

    Return true if lock acquired; false otherwise.

    + +
    +
    +
    The documentation for this class was generated from the following file:
      +
    • spin_mutex.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00172.png b/doc/html/a00172.png index 5450176d7fa5c18126f5e6f83daf7a63bab18728..25da9c6ba09d573b82ff7e6295013c42ed53edd9 100644 Binary files a/doc/html/a00172.png and b/doc/html/a00172.png differ diff --git a/doc/html/a00173.html b/doc/html/a00173.html index 4cdca67c6e324284bd1f1f333a229aeba4216131..2d3255cdaebf727ad9b0566c360a4af24ca39b01 100644 --- a/doc/html/a00173.html +++ b/doc/html/a00173.html @@ -4,7 +4,7 @@ -tbb::interface5::reader_writer_lock::scoped_lock_read Class Reference +tbb::null_rw_mutex::scoped_lock Class Reference @@ -33,64 +33,61 @@
-
tbb::interface5::reader_writer_lock::scoped_lock_read Class Reference
+
tbb::null_rw_mutex::scoped_lock Class Reference
-

The scoped lock pattern for read locks. +

Represents acquisition of a mutex. More...

-

#include <reader_writer_lock.h>

+

#include <null_rw_mutex.h>

-Inheritance diagram for tbb::interface5::reader_writer_lock::scoped_lock_read:
+Inheritance diagram for tbb::null_rw_mutex::scoped_lock:
- - + +
- - - - - - - - - - -

Public Member Functions

scoped_lock_read (reader_writer_lock &lock)
 Construct with blocking attempt to acquire read lock on the passed-in lock.
 
~scoped_lock_read ()
 Destructor, releases the read lock.
 
-void * operator new (size_t s)
 
-void operator delete (void *p)
 
- - - + + + + + + + + + + + +

-Friends

-class reader_writer_lock
 
scoped_lock (null_rw_mutex &, bool=true)
 
+void acquire (null_rw_mutex &, bool=true)
 
+bool upgrade_to_writer ()
 
+bool downgrade_to_reader ()
 
+bool try_acquire (null_rw_mutex &, bool=true)
 
+void release ()
 

Detailed Description

-

The scoped lock pattern for read locks.

+

Represents acquisition of a mutex.


The documentation for this class was generated from the following file:
    -
  • reader_writer_lock.h
  • +
  • null_rw_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00173.png b/doc/html/a00173.png index 10066bd980a7f04d27b6d2c16ba84af835b461d3..081a54dff5c3418a26e55aabe7207612d4a46482 100644 Binary files a/doc/html/a00173.png and b/doc/html/a00173.png differ diff --git a/doc/html/a00174.html b/doc/html/a00174.html index 61e71729530a3c2103c852f97c967c16673a621f..e5084893e3926598be38ef1eaa4e1fbb46014a3a 100644 --- a/doc/html/a00174.html +++ b/doc/html/a00174.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::sender< T > Class Template Reference +tbb::null_mutex::scoped_lock Class Reference @@ -33,115 +33,55 @@
-
tbb::flow::interface8::sender< T > Class Template Referenceabstract
+
tbb::null_mutex::scoped_lock Class Reference
-

Pure virtual template class that defines a sender of messages of type T. +

Represents acquisition of a mutex. More...

-

#include <flow_graph.h>

+

#include <null_mutex.h>

-Inheritance diagram for tbb::flow::interface8::sender< T >:
+Inheritance diagram for tbb::null_mutex::scoped_lock:
- - -tbb::flow::interface8::broadcast_node< T > -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::limiter_node< T > -tbb::flow::interface8::overwrite_node< T > -tbb::flow::interface8::priority_queue_node< T, Compare, A > -tbb::flow::interface8::queue_node< T, A > -tbb::flow::interface8::write_once_node< T > -tbb::flow::interface8::sequencer_node< T, A > + +
- - - - - - - - - - - - -

-Public Types

-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + +

Public Member Functions

-virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node.
 
-virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
-virtual bool try_get (T &)
 Request an item from the sender.
 
-virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
-virtual built_successors_typebuilt_successors ()=0
 
-virtual void internal_add_built_successor (successor_type &)=0
 
-virtual void internal_delete_built_successor (successor_type &)=0
 
-virtual void copy_successors (successor_list_type &)=0
 
-virtual size_t successor_count ()=0
 
scoped_lock (null_mutex &)
 
+void acquire (null_mutex &)
 
+bool try_acquire (null_mutex &)
 
+void release ()
 

Detailed Description

-

template<typename T>
-class tbb::flow::interface8::sender< T >

- -

Pure virtual template class that defines a sender of messages of type T.

+

Represents acquisition of a mutex.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00174.png b/doc/html/a00174.png index f8d0e860bbe1900215e6561d6d50ca9ed37a990b..d8565aa377b4b6d12e30bda0927c2756bdb21acf 100644 Binary files a/doc/html/a00174.png and b/doc/html/a00174.png differ diff --git a/doc/html/a00175.html b/doc/html/a00175.html index 9dcce5ad1eddcbee7d76c6eb8052bf56fddbd291..d802f6cae65e23149985dac10eb94e1a7be61eb4 100644 --- a/doc/html/a00175.html +++ b/doc/html/a00175.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::sender< dependency_msg< T, Factory > > Class Template Reference +tbb::interface5::reader_writer_lock::scoped_lock_read Class Reference @@ -33,74 +33,64 @@
-
tbb::flow::interface8::sender< dependency_msg< T, Factory > > Class Template Referenceabstract
+
tbb::interface5::reader_writer_lock::scoped_lock_read Class Reference
+ +

The scoped lock pattern for read locks. + More...

+ +

#include <reader_writer_lock.h>

-Inheritance diagram for tbb::flow::interface8::sender< dependency_msg< T, Factory > >:
+Inheritance diagram for tbb::interface5::reader_writer_lock::scoped_lock_read:
- - -tbb::flow::interface8::proxy_dependency_sender< T, Factory > + +
- - - - - - -

-Public Types

-typedef receiver
-< dependency_msg< T, Factory > > 
dependency_successor_type
 The successor type for this sender.
 
-typedef
-proxy_dependency_sender< T,
-Factory > 
proxy
 
- - - - - - - - - - - - - - - - + + + + + + + + + + +

Public Member Functions

-virtual bool register_successor (dependency_successor_type &r)=0
 Add a new successor to this node.
 
-virtual bool remove_successor (dependency_successor_type &r)=0
 Removes a successor from this node.
 
-virtual bool try_get (dependency_msg< T, Factory > &)
 Request an item from the sender.
 
-virtual bool try_reserve (dependency_msg< T, Factory > &)
 Reserves an item in the sender.
 
-ordinary_sender & ordinary_sender ()
 
-bool has_host_successors ()
 
scoped_lock_read (reader_writer_lock &lock)
 Construct with blocking attempt to acquire read lock on the passed-in lock.
 
~scoped_lock_read ()
 Destructor, releases the read lock.
 
+void * operator new (size_t s)
 
+void operator delete (void *p)
 
+ + +

+Friends

+class reader_writer_lock
 
-
The documentation for this class was generated from the following file:
    -
  • flow_graph_opencl_node.h
  • +

    Detailed Description

    +

    The scoped lock pattern for read locks.

    +

    The documentation for this class was generated from the following file:
      +
    • reader_writer_lock.h

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00175.png b/doc/html/a00175.png index f942f222c63fd3d6b3402da4c6c8425cb9809f9b..10066bd980a7f04d27b6d2c16ba84af835b461d3 100644 Binary files a/doc/html/a00175.png and b/doc/html/a00175.png differ diff --git a/doc/html/a00176.html b/doc/html/a00176.html index f9bddddae226ed0f12ed1447af39f0f669b42358..e5fdf8df86f21cf0af484613302a3c9c7d4600c8 100644 --- a/doc/html/a00176.html +++ b/doc/html/a00176.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::sequencer_node< T, A > Class Template Reference +tbb::flow::interface8::sender< T > Class Template Reference @@ -33,358 +33,115 @@
-
tbb::flow::interface8::sequencer_node< T, A > Class Template Reference
+
tbb::flow::interface8::sender< T > Class Template Referenceabstract
-

Forwards messages in sequence order. +

Pure virtual template class that defines a sender of messages of type T. More...

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::sequencer_node< T, A >:
+Inheritance diagram for tbb::flow::interface8::sender< T >:
- - -tbb::flow::interface8::queue_node< T, A > -tbb::flow::interface8::buffer_node< T, A > -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > + + +tbb::flow::interface8::broadcast_node< T > +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::limiter_node< T > +tbb::flow::interface8::overwrite_node< T > +tbb::flow::interface8::priority_queue_node< T, Compare, A > +tbb::flow::interface8::queue_node< T, A > +tbb::flow::interface8::write_once_node< T > +tbb::flow::interface8::sequencer_node< T, A >
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + - +

Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::queue_node< T, A >
-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef buffer_node< T, A > class_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
typedef
built_successors_type::edge_list_type 
successor_list_type
 
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

-template<typename Sequencer >
 sequencer_node (graph &g, const Sequencer &s)
 Constructor.
 
sequencer_node (const sequencer_node &src)
 Copy constructor.
 
~sequencer_node ()
 Destructor.
 
-void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::queue_node< T, A >
queue_node (graph &g)
 Constructor.
 
queue_node (const queue_node &src)
 Copy constructor.
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-size_t successor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Types

enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef buffer_node< T, A >
-::size_type 
size_type
 
-typedef buffer_node< T, A >
-::buffer_operation 
sequencer_operation
 
- Protected Types inherited from tbb::flow::interface8::queue_node< T, A >
enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef buffer_node< T, A > base_type
 
-typedef base_type::size_type size_type
 
-typedef base_type::buffer_operation queue_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
-  reg_succ, -rem_succ, -req_item, -res_item, -
-  rel_res, -con_res, -put_item, -try_fwd_task, -
-  add_blt_succ, -del_blt_succ, -add_blt_pred, -del_blt_pred, -
-  blt_succ_cnt, -blt_pred_cnt, -blt_succ_cpy, -blt_pred_cpy -
- }
 
enum  op_stat { WAIT =0, -SUCCEEDED, -FAILED - }
 
-typedef size_t size_type
 
-typedef
-internal::aggregating_functor
-< class_type, buffer_operation
handler_type
 
-typedef sender< T >
-::built_successors_type 
built_successors_type
 
-typedef receiver< T >
-::built_predecessors_type 
built_predecessors_type
 
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Additional Inherited Members

- Protected Member Functions inherited from tbb::flow::interface8::queue_node< T, A >
-void internal_forward_task (queue_operation *op)
 Tries to forward valid items to successors.
 
-void internal_pop (queue_operation *op)
 
-void internal_reserve (queue_operation *op)
 
-void internal_consume (queue_operation *op)
 
-void reset_node (reset_flags f)
 
- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
-internal::round_robin_cache< T,
-null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-bool forwarder_busy
 
-internal::aggregator
-< handler_type,
-buffer_operation
my_aggregator
 
+virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node.
 
+virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
+virtual bool try_get (T &)
 Request an item from the sender.
 
+virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+virtual built_successors_typebuilt_successors ()=0
 
+virtual void internal_add_built_successor (successor_type &)=0
 
+virtual void internal_delete_built_successor (successor_type &)=0
 
+virtual void copy_successors (successor_list_type &)=0
 
+virtual size_t successor_count ()=0
 

Detailed Description

-

template<typename T, typename A = cache_aligned_allocator<T>>
-class tbb::flow::interface8::sequencer_node< T, A >

+

template<typename T>
+class tbb::flow::interface8::sender< T >

-

Forwards messages in sequence order.

+

Pure virtual template class that defines a sender of messages of type T.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00176.png b/doc/html/a00176.png index 2190e2e8ed3da24541acc59fc2348d86298b606c..f8d0e860bbe1900215e6561d6d50ca9ed37a990b 100644 Binary files a/doc/html/a00176.png and b/doc/html/a00176.png differ diff --git a/doc/html/a00177.html b/doc/html/a00177.html index 8ce4effac5d6fbba99ccbce13eae63b5e388329a..cc82166a4155a1941afad9c1cf57645fb48684e0 100644 --- a/doc/html/a00177.html +++ b/doc/html/a00177.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::source_node< Output > Class Template Reference +tbb::flow::interface8::sender< dependency_msg< T, Factory > > Class Template Reference @@ -33,218 +33,74 @@
-
tbb::flow::interface8::source_node< Output > Class Template Reference
+
tbb::flow::interface8::sender< dependency_msg< T, Factory > > Class Template Referenceabstract
- -

An executable node that acts as a source, i.e. it has no predecessors. - More...

- -

#include <flow_graph.h>

-Inheritance diagram for tbb::flow::interface8::source_node< Output >:
+Inheritance diagram for tbb::flow::interface8::sender< dependency_msg< T, Factory > >:
- - -tbb::flow::interface8::graph_node -tbb::flow::interface8::sender< Output > + + +tbb::flow::interface8::proxy_dependency_sender< T, Factory >
- - - - - - - - - - - - - - - - - - - - + + + - - - - +proxy_dependency_sender< T,
+Factory >  +

Public Types

-typedef Output output_type
 The type of the output message, which is complete.
 
-typedef receiver< Output > successor_type
 The type of successors of this node.
 
-typedef null_type input_type
 
-typedef sender< output_type >
-::built_successors_type 
built_successors_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< Output >
-typedef Output output_type
 The output type of this sender.
 
-typedef receiver< Output > successor_type
 The successor type for this node.
 
+
+typedef receiver
+< dependency_msg< T, Factory > > 
successor_type
 The successor type for this sender.
 
typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
proxy
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

-template<typename Body >
 source_node (graph &g, Body body, bool is_active=true)
 Constructor for a node with a successor.
 
source_node (const source_node &src)
 Copy constructor.
 
~source_node ()
 The destructor.
 
-void set_name (const char *name)
 
-bool register_successor (successor_type &r)
 Add a new successor to this node.
 
-bool remove_successor (successor_type &r)
 Removes a successor from this node.
 
-built_successors_typebuilt_successors ()
 
-void internal_add_built_successor (successor_type &r)
 
-void internal_delete_built_successor (successor_type &r)
 
-size_t successor_count ()
 
-void copy_successors (successor_list_type &v)
 
-bool try_get (output_type &v)
 Request an item from the node.
 
-bool try_reserve (output_type &v)
 Reserves an item.
 
bool try_release ()
 Release a reserved item. More...
 
-bool try_consume ()
 Consumes a reserved item.
 
-void activate ()
 Activates a node that was created in the inactive state.
 
-template<typename Body >
Body copy_function_object ()
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - - -

-Protected Member Functions

-void reset_node (reset_flags f)
 resets the source_node to its initial state
 
- - - -

-Friends

-class internal::source_task_bypass< source_node< output_type > >
 
- - - - - - - - + + + + + + + + + + + + + + + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
+virtual bool register_successor (successor_type &r)=0
 Add a new successor to this node.
 
+virtual bool remove_successor (successor_type &r)=0
 Removes a successor from this node.
 
+virtual bool try_get (dependency_msg< T, Factory > &)
 Request an item from the sender.
 
+virtual bool try_reserve (dependency_msg< T, Factory > &)
 Reserves an item in the sender.
 
+ordinary_sender & ordinary_sender ()
 
+bool has_host_successors ()
 
-

Detailed Description

-

template<typename Output>
-class tbb::flow::interface8::source_node< Output >

- -

An executable node that acts as a source, i.e. it has no predecessors.

-

Member Function Documentation

- -
-
-
-template<typename Output >
- - - - - -
- - - - - - - -
bool tbb::flow::interface8::source_node< Output >::try_release ()
-
-inlinevirtual
-
- -

Release a reserved item.

-

true = item has been released and so remains in sender, dest must request or reserve future items

- -

Reimplemented from tbb::flow::interface8::sender< Output >.

- -
-

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00177.png b/doc/html/a00177.png index a8bbd54a4772774bff1e515d5690aa14b5b96d5d..f942f222c63fd3d6b3402da4c6c8425cb9809f9b 100644 Binary files a/doc/html/a00177.png and b/doc/html/a00177.png differ diff --git a/doc/html/a00178.html b/doc/html/a00178.html index 491f3e19ef4743d7931b947b6869a1a2efc9ef82..8dc436eebbe49fb3c9f48891a180c5bd15a1baef 100644 --- a/doc/html/a00178.html +++ b/doc/html/a00178.html @@ -4,7 +4,7 @@ -tbb::spin_mutex Class Reference +tbb::flow::interface8::sequencer_node< T, A > Class Template Reference @@ -33,147 +33,358 @@
-
tbb::spin_mutex Class Reference
+
tbb::flow::interface8::sequencer_node< T, A > Class Template Reference
-

A lock that occupies a single byte. +

Forwards messages in sequence order. More...

-

#include <spin_mutex.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::spin_mutex:
+Inheritance diagram for tbb::flow::interface8::sequencer_node< T, A >:
- - + + +tbb::flow::interface8::queue_node< T, A > +tbb::flow::interface8::buffer_node< T, A > +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T >
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Classes

class  scoped_lock
 Represents acquisition of a mutex. More...
 

+Public Types

+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::queue_node< T, A >
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::buffer_node< T, A >
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef buffer_node< T, A > class_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
+typedef
+built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 spin_mutex ()
 Construct unacquired lock. More...
 
-void __TBB_EXPORTED_METHOD internal_construct ()
 Internal constructor with ITT instrumentation.
 
-void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
-void unlock ()
 Release lock.
 
+template<typename Sequencer >
 sequencer_node (graph &g, const Sequencer &s)
 Constructor.
 
sequencer_node (const sequencer_node &src)
 Copy constructor.
 
~sequencer_node ()
 Destructor.
 
+void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::queue_node< T, A >
queue_node (graph &g)
 Constructor.
 
queue_node (const queue_node &src)
 Copy constructor.
 
- Public Member Functions inherited from tbb::flow::interface8::buffer_node< T, A >
buffer_node (graph &g)
 Constructor.
 
buffer_node (const buffer_node &src)
 Copy constructor.
 
bool register_successor (successor_type &r)
 Adds a new successor. More...
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+size_t successor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void copy_successors (successor_list_type &v)
 
bool remove_successor (successor_type &r)
 Removes a successor. More...
 
bool try_get (T &v)
 Request an item from the buffer_node. More...
 
bool try_reserve (T &v)
 Reserves an item. More...
 
bool try_release ()
 Release a reserved item. More...
 
bool try_consume ()
 Consumes a reserved item. More...
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

-Static Public Attributes

-static const bool is_rw_mutex = false
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = false
 

+Protected Types

enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef buffer_node< T, A >
+::size_type 
size_type
 
+typedef buffer_node< T, A >
+::buffer_operation 
sequencer_operation
 
- Protected Types inherited from tbb::flow::interface8::queue_node< T, A >
enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef buffer_node< T, A > base_type
 
+typedef base_type::size_type size_type
 
+typedef base_type::buffer_operation queue_operation
 
- Protected Types inherited from tbb::flow::interface8::buffer_node< T, A >
enum  op_type {
+  reg_succ, +rem_succ, +req_item, +res_item, +
+  rel_res, +con_res, +put_item, +try_fwd_task, +
+  add_blt_succ, +del_blt_succ, +add_blt_pred, +del_blt_pred, +
+  blt_succ_cnt, +blt_pred_cnt, +blt_succ_cpy, +blt_pred_cpy +
+ }
 
enum  op_stat { WAIT =0, +SUCCEEDED, +FAILED + }
 
+typedef size_t size_type
 
+typedef
+internal::aggregating_functor
+< class_type, buffer_operation
handler_type
 
+typedef sender< T >
+::built_successors_type 
built_successors_type
 
+typedef receiver< T >
+::built_predecessors_type 
built_predecessors_type
 
- - - + + + + + + + + + + + + + + + + + + + + + +

-Friends

-class scoped_lock
 

+Additional Inherited Members

- Protected Member Functions inherited from tbb::flow::interface8::queue_node< T, A >
+void internal_forward_task (queue_operation *op)
 Tries to forward valid items to successors.
 
+void internal_pop (queue_operation *op)
 
+void internal_reserve (queue_operation *op)
 
+void internal_consume (queue_operation *op)
 
+void reset_node (reset_flags f)
 
- Protected Attributes inherited from tbb::flow::interface8::buffer_node< T, A >
+internal::round_robin_cache< T,
+null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+bool forwarder_busy
 
+internal::aggregator
+< handler_type,
+buffer_operation
my_aggregator
 

Detailed Description

-

A lock that occupies a single byte.

-

A spin_mutex is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically less than 20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld.

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - -
tbb::spin_mutex::spin_mutex ()
-
-inline
-
- -

Construct unacquired lock.

-

Equivalent to zero-initialization of *this.

- -

References internal_construct().

+

template<typename T, typename A = cache_aligned_allocator<T>>
+class tbb::flow::interface8::sequencer_node< T, A >

-
-
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
bool tbb::spin_mutex::try_lock ()
-
-inline
-
- -

Try acquiring lock (non-blocking)

-

Return true if lock acquired; false otherwise.

- -

References tbb::aligned_space< T, N >::begin().

- -
-
-
The documentation for this class was generated from the following file:
    -
  • spin_mutex.h
  • +

    Forwards messages in sequence order.

    +

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00178.png b/doc/html/a00178.png index 5dfc58974fe23922ad2b6e7edde1e485bc375a30..2190e2e8ed3da24541acc59fc2348d86298b606c 100644 Binary files a/doc/html/a00178.png and b/doc/html/a00178.png differ diff --git a/doc/html/a00179.html b/doc/html/a00179.html index a0f523e76c886875b6214693d84a20ff74bef238..3098e23ab5c93a03ec9fb45ab2864c7d058b5943 100644 --- a/doc/html/a00179.html +++ b/doc/html/a00179.html @@ -4,7 +4,7 @@ -tbb::spin_rw_mutex_v3 Class Reference +tbb::flow::interface8::source_node< Output > Class Template Reference @@ -33,151 +33,192 @@
-
tbb::spin_rw_mutex_v3 Class Reference
+
tbb::flow::interface8::source_node< Output > Class Template Reference
-

Fast, unfair, spinning reader-writer lock with backoff and writer-preference. +

An executable node that acts as a source, i.e. it has no predecessors. More...

-

#include <spin_rw_mutex.h>

+

#include <flow_graph.h>

-Inheritance diagram for tbb::spin_rw_mutex_v3:
+Inheritance diagram for tbb::flow::interface8::source_node< Output >:
- - + + +tbb::flow::interface8::graph_node +tbb::flow::interface8::sender< Output >
- - - - + + + + + + + + + + + + + + + + + + + + + + + + +

-Classes

class  scoped_lock
 The scoped locking pattern. More...
 

+Public Types

+typedef Output output_type
 The type of the output message, which is complete.
 
+typedef receiver< Output > successor_type
 The type of successors of this node.
 
+typedef null_type input_type
 
+typedef sender< output_type >
+::built_successors_type 
built_successors_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< Output >
+typedef Output output_type
 The output type of this sender.
 
+typedef receiver< Output > successor_type
 The successor type for this node.
 
+typedef
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
+typedef
+built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

spin_rw_mutex_v3 ()
 Construct unacquired mutex.
 
~spin_rw_mutex_v3 ()
 Destructor asserts if the mutex is acquired, i.e. state is zero.
 
-void lock ()
 Acquire writer lock.
 
bool try_lock ()
 Try acquiring writer lock (non-blocking) More...
 
-void unlock ()
 Release lock.
 
-void lock_read ()
 Acquire reader lock.
 
bool try_lock_read ()
 Try acquiring reader lock (non-blocking) More...
 
+template<typename Body >
 source_node (graph &g, Body body, bool is_active=true)
 Constructor for a node with a successor.
 
source_node (const source_node &src)
 Copy constructor.
 
~source_node ()
 The destructor.
 
+void set_name (const char *name)
 
+bool register_successor (successor_type &r)
 Add a new successor to this node.
 
+bool remove_successor (successor_type &r)
 Removes a successor from this node.
 
+built_successors_typebuilt_successors ()
 
+void internal_add_built_successor (successor_type &r)
 
+void internal_delete_built_successor (successor_type &r)
 
+size_t successor_count ()
 
+void copy_successors (successor_list_type &v)
 
+bool try_get (output_type &v)
 Request an item from the node.
 
+bool try_reserve (output_type &v)
 Reserves an item.
 
bool try_release ()
 Release a reserved item. More...
 
+bool try_consume ()
 Consumes a reserved item.
 
+void activate ()
 Activates a node that was created in the inactive state.
 
+template<typename Body >
Body copy_function_object ()
 
+void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- - - - - - - + + + +

-Static Public Attributes

-static const bool is_rw_mutex = true
 
-static const bool is_recursive_mutex = false
 
-static const bool is_fair_mutex = false
 

+Protected Member Functions

+void reset_node (reset_flags f)
 resets the source_node to its initial state
 
- - - + + +

-Protected Types

-typedef intptr_t state_t
 

+Friends

+class internal::source_task_bypass< source_node< output_type > >
 
- - - - -

-Protected Attributes

state_t state
 State of lock. More...
 
- - - - - - - - - - - + + + + + + + +

-Static Protected Attributes

-static const state_t WRITER = 1
 
-static const state_t WRITER_PENDING = 2
 
-static const state_t READERS = ~(WRITER | WRITER_PENDING)
 
-static const state_t ONE_READER = 4
 
-static const state_t BUSY = WRITER | READERS
 

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::graph_node
+graphmy_graph
 
+graph_nodenext
 
+graph_nodeprev
 

Detailed Description

-

Fast, unfair, spinning reader-writer lock with backoff and writer-preference.

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
bool tbb::spin_rw_mutex_v3::try_lock ()
-
-inline
-
+

template<typename Output>
+class tbb::flow::interface8::source_node< Output >

-

Try acquiring writer lock (non-blocking)

-

Return true if lock acquired; false otherwise.

- -
-
- +

An executable node that acts as a source, i.e. it has no predecessors.

+

Member Function Documentation

+
+
+template<typename Output >
- -
- + @@ -185,49 +226,25 @@ static const state_t 
bool tbb::spin_rw_mutex_v3::try_lock_read bool tbb::flow::interface8::source_node< Output >::try_release ( ) BUSY<
-inline
-
- -

Try acquiring reader lock (non-blocking)

-

Return true if reader lock acquired; false otherwise.

- -
-
-

Member Data Documentation

- -
-
- - - - +inlinevirtual
- - - - -
state_t tbb::spin_rw_mutex_v3::state
-
-protected
-

State of lock.

-

Bit 0 = writer is holding lock Bit 1 = request by a writer to acquire lock (hint to readers to wait) Bit 2..N = number of readers holding lock

+

Release a reserved item.

+

true = item has been released and so remains in sender, dest must request or reserve future items

-

Referenced by tbb::spin_rw_mutex_v3::scoped_lock::release(), and unlock().

+

Reimplemented from tbb::flow::interface8::sender< Output >.


The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00179.png b/doc/html/a00179.png index ff1efc94eefd31b2d4083e828ac11551d2a93292..a8bbd54a4772774bff1e515d5690aa14b5b96d5d 100644 Binary files a/doc/html/a00179.png and b/doc/html/a00179.png differ diff --git a/doc/html/a00180.html b/doc/html/a00180.html index 9d130f97778adeccbeedba484ee358e862b26599..1e312fef051818888e59dfa210c4ed9df85a667d 100644 --- a/doc/html/a00180.html +++ b/doc/html/a00180.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::split_node< TupleType, Allocator > Class Template Reference +tbb::spin_mutex Class Reference @@ -33,138 +33,147 @@
-
tbb::flow::interface8::split_node< TupleType, Allocator > Class Template Reference
+
tbb::spin_mutex Class Reference
-

split_node: accepts a tuple as input, forwards each element of the tuple to its +

A lock that occupies a single byte. More...

-

#include <flow_graph.h>

+

#include <spin_mutex.h>

-Inheritance diagram for tbb::flow::interface8::split_node< TupleType, Allocator >:
+Inheritance diagram for tbb::spin_mutex:
- - -tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator > -tbb::flow::interface8::graph_node + +
- - - - - - - - - - - - - - - - - - - - + + + +

-Public Types

-typedef
-base_type::output_ports_type 
output_ports_type
 
-typedef base_type::output_type output_type
 
-typedef TupleType input_type
 
-typedef Allocator allocator_type
 
- Public Types inherited from tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator >
-typedef TupleType input_type
 
-typedef null_type output_type
 
-typedef
-internal::wrap_tuple_elements
-< N,
-internal::multifunction_output,
-TupleType >::type 
output_ports_type
 
-typedef
-internal::multifunction_input
-< input_type,
-output_ports_type, Allocator > 
fInput_type
 
-typedef
-internal::function_input_queue
-< input_type, Allocator > 
input_queue_type
 

+Classes

class  scoped_lock
 Represents acquisition of a mutex. More...
 
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +

Public Member Functions

split_node (graph &g)
 
split_node (const split_node &other)
 
-void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator >
multifunction_node (graph &g, size_t concurrency, Body body)
 
multifunction_node (const multifunction_node &other)
 
-void set_name (const char *name)
 
-void extract ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
 spin_mutex ()
 Construct unacquired lock. More...
 
+void __TBB_EXPORTED_METHOD internal_construct ()
 Internal constructor with ITT instrumentation.
 
+void lock ()
 Acquire lock.
 
bool try_lock ()
 Try acquiring lock (non-blocking) More...
 
+void unlock ()
 Release lock.
 
- - - - - - - - - - - - - - + + + + + + + +

-Additional Inherited Members

- Protected Member Functions inherited from tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator >
-void reset_node (reset_flags f)
 
- Protected Attributes inherited from tbb::flow::interface8::graph_node
-graphmy_graph
 
-graph_nodenext
 
-graph_nodeprev
 
- Static Protected Attributes inherited from tbb::flow::interface8::multifunction_node< TupleType, TupleType, rejecting, Allocator >
-static const int N
 

+Static Public Attributes

+static const bool is_rw_mutex = false
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = false
 
+ + +

+Friends

+class scoped_lock
 

Detailed Description

-

template<typename TupleType, typename Allocator = cache_aligned_allocator<TupleType>>
-class tbb::flow::interface8::split_node< TupleType, Allocator >

+

A lock that occupies a single byte.

+

A spin_mutex is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically less than 20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + +
tbb::spin_mutex::spin_mutex ()
+
+inline
+
+ +

Construct unacquired lock.

+

Equivalent to zero-initialization of *this.

+ +

References internal_construct().

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool tbb::spin_mutex::try_lock ()
+
+inline
+
+ +

Try acquiring lock (non-blocking)

+

Return true if lock acquired; false otherwise.

-

split_node: accepts a tuple as input, forwards each element of the tuple to its

-

The documentation for this class was generated from the following file:
+
+
The documentation for this class was generated from the following file:
    +
  • spin_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00180.png b/doc/html/a00180.png index a0bcfb49c5dde3f875c4c5f19ecaff9172e75f8f..5dfc58974fe23922ad2b6e7edde1e485bc375a30 100644 Binary files a/doc/html/a00180.png and b/doc/html/a00180.png differ diff --git a/doc/html/a00181.html b/doc/html/a00181.html index 5dcd61a201a3b4efb94cc80bc25c56637290df9c..102746b5ff39efbe01953047691733dde2ad13bb 100644 --- a/doc/html/a00181.html +++ b/doc/html/a00181.html @@ -4,7 +4,7 @@ -tbb::structured_task_group Class Reference +tbb::spin_rw_mutex_v3 Class Reference @@ -33,83 +33,201 @@
-
tbb::structured_task_group Class Reference
+
tbb::spin_rw_mutex_v3 Class Reference
+ +

Fast, unfair, spinning reader-writer lock with backoff and writer-preference. + More...

+ +

#include <spin_rw_mutex.h>

-Inheritance diagram for tbb::structured_task_group:
+Inheritance diagram for tbb::spin_rw_mutex_v3:
- - -tbb::internal::task_group_base + +
+ + + + +

+Classes

class  scoped_lock
 The scoped locking pattern. More...
 
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

-template<typename F >
task_group_status run_and_wait (task_handle< F > &h)
 
-task_group_status wait ()
 
- Public Member Functions inherited from tbb::internal::task_group_base
task_group_base (uintptr_t traits=0)
 
-template<typename F >
void run (task_handle< F > &h)
 
-task_group_status wait ()
 
-bool is_canceling ()
 
-void cancel ()
 
spin_rw_mutex_v3 ()
 Construct unacquired mutex.
 
~spin_rw_mutex_v3 ()
 Destructor asserts if the mutex is acquired, i.e. state is zero.
 
+void lock ()
 Acquire writer lock.
 
bool try_lock ()
 Try acquiring writer lock (non-blocking) More...
 
+void unlock ()
 Release lock.
 
+void lock_read ()
 Acquire reader lock.
 
bool try_lock_read ()
 Try acquiring reader lock (non-blocking) More...
 
+ + + + + + + +

+Static Public Attributes

+static const bool is_rw_mutex = true
 
+static const bool is_recursive_mutex = false
 
+static const bool is_fair_mutex = false
 
+ + + +

+Protected Types

+typedef intptr_t state_t
 
+ + + +

+Protected Attributes

state_t state
 State of lock. More...
 
- - - - - - - - - - - - - - - + + + + + + + + + + +

-Additional Inherited Members

- Protected Member Functions inherited from tbb::internal::task_group_base
-task & owner ()
 
-template<typename F >
task_group_status internal_run_and_wait (F &f)
 
-template<typename F , typename Task >
void internal_run (F &f)
 
- Protected Attributes inherited from tbb::internal::task_group_base
-empty_task * my_root
 
-task_group_context my_context
 

+Static Protected Attributes

+static const state_t WRITER = 1
 
+static const state_t WRITER_PENDING = 2
 
+static const state_t READERS = ~(WRITER | WRITER_PENDING)
 
+static const state_t ONE_READER = 4
 
+static const state_t BUSY = WRITER | READERS
 
+

Detailed Description

+

Fast, unfair, spinning reader-writer lock with backoff and writer-preference.

+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
bool tbb::spin_rw_mutex_v3::try_lock ()
+
+inline
+
+ +

Try acquiring writer lock (non-blocking)

+

Return true if lock acquired; false otherwise.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool tbb::spin_rw_mutex_v3::try_lock_read ()
+
+inline
+
+ +

Try acquiring reader lock (non-blocking)

+

Return true if reader lock acquired; false otherwise.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
state_t tbb::spin_rw_mutex_v3::state
+
+protected
+
+ +

State of lock.

+

Bit 0 = writer is holding lock Bit 1 = request by a writer to acquire lock (hint to readers to wait) Bit 2..N = number of readers holding lock

+ +

Referenced by tbb::spin_rw_mutex_v3::scoped_lock::release(), and unlock().

+ +
+

The documentation for this class was generated from the following file:
    -
  • task_group.h
  • +
  • spin_rw_mutex.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00181.png b/doc/html/a00181.png index f9335edceafd7f8bc89407edcd399573fb4cb1e3..ff1efc94eefd31b2d4083e828ac11551d2a93292 100644 Binary files a/doc/html/a00181.png and b/doc/html/a00181.png differ diff --git a/doc/html/a00182.html b/doc/html/a00182.html index ad4a01c0c517ead485d5989bfdd18194f5c1f627..7b83198137af991c62235284d3e5aae4fd1a6a9b 100644 --- a/doc/html/a00182.html +++ b/doc/html/a00182.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::internal::successor_cache< T, M > Class Template Reference +tbb::flow::interface8::split_node< TupleType, Allocator > Class Template Reference @@ -33,21 +33,138 @@
+
-
tbb::flow::interface8::internal::successor_cache< T, M > Class Template Reference
+
tbb::flow::interface8::split_node< TupleType, Allocator > Class Template Reference
-
The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00182.png b/doc/html/a00182.png new file mode 100644 index 0000000000000000000000000000000000000000..a0bcfb49c5dde3f875c4c5f19ecaff9172e75f8f Binary files /dev/null and b/doc/html/a00182.png differ diff --git a/doc/html/a00183.html b/doc/html/a00183.html index 9439b4f113f96199fd0922ce5ef07ba7cd3f3bc0..c116a745b8478910bf3222e7c09156dde50dd6ae 100644 --- a/doc/html/a00183.html +++ b/doc/html/a00183.html @@ -4,7 +4,7 @@ -tbb::interface7::task_arena Class Reference +tbb::structured_task_group Class Reference @@ -33,351 +33,83 @@
-
tbb::interface7::task_arena Class Reference
+
tbb::structured_task_group Class Reference
- -

#include <task_arena.h>

-Inheritance diagram for tbb::interface7::task_arena:
+Inheritance diagram for tbb::structured_task_group:
- - + + +tbb::internal::task_group_base
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +

Public Member Functions

 task_arena (int max_concurrency=automatic, unsigned reserved_for_masters=1)
 Creates task_arena with certain concurrency limits. More...
 
task_arena (const task_arena &s)
 Copies settings from another task_arena.
 
task_arena (tbb::internal::attach)
 Creates an instance of task_arena attached to the current arena of the thread.
 
-void initialize ()
 Forces allocation of the resources for the task_arena as specified in constructor arguments.
 
-void initialize (int max_concurrency, unsigned reserved_for_masters=1)
 Overrides concurrency level and forces initialization of internal representation.
 
void terminate ()
 
 ~task_arena ()
 
bool is_active () const
 
template<typename F >
void enqueue (const F &f)
 
template<typename F >
void enqueue (const F &f, priority_t p)
 
template<typename F >
void execute (F &f)
 
template<typename F >
void execute (const F &f)
 
void debug_wait_until_empty ()
 
+template<typename F >
task_group_status run_and_wait (task_handle< F > &h)
 
+task_group_status wait ()
 
- Public Member Functions inherited from tbb::internal::task_group_base
task_group_base (uintptr_t traits=0)
 
+template<typename F >
void run (task_handle< F > &h)
 
+task_group_status wait ()
 
+bool is_canceling ()
 
+void cancel ()
 
- - - - -

-Static Public Member Functions

-static int current_thread_index ()
 Returns the index, aka slot number, of the calling thread in its current arena.
 
- - - -

-Friends

-class tbb::internal::task_scheduler_observer_v3
 
-

Detailed Description

-

1-to-1 proxy representation class of scheduler's arena Constructors set up settings only, real construction is deferred till the first method invocation Destructor only removes one of the references to the inner arena representation. Final destruction happens when all the references (and the work) are gone.

-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
tbb::interface7::task_arena::task_arena (int max_concurrency = automatic,
unsigned reserved_for_masters = 1 
)
-
-inline
-
- -

Creates task_arena with certain concurrency limits.

-

Sets up settings only, real construction is deferred till the first method invocation

-
    -
  • max_concurrency specifies total number of slots in arena where threads work
  • -
  • reserved_for_masters specifies number of slots to be used by master threads only. Value of 1 is default and reflects behavior of implicit arenas.
  • -
- -
-
- -
-
- - - - - -
- - - - - - - -
tbb::interface7::task_arena::~task_arena ()
-
-inline
-
-

Removes the reference to the internal arena representation, and destroys the external object. Not thread safe wrt concurrent invocations of other methods.

- -
-
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
void tbb::interface7::task_arena::debug_wait_until_empty ()
-
-inline
-
-

Wait for all work in the arena to be completed Even submitted by other application threads Joins arena if/when possible (in the same way as execute())

- -
-
- -
-
-
-template<typename F >
- - - - - -
- - - - - - - - -
void tbb::interface7::task_arena::enqueue (const F & f)
-
-inline
-
-

Enqueues a task into the arena to process a functor, and immediately returns. Does not require the calling thread to join the arena

- -
-
- -
-
-
-template<typename F >
- - - - - + + + + + + + + + + + + + + +
- - - - - - - - - - - - - - - - - - -
void tbb::interface7::task_arena::enqueue (const F & f,
priority_t p 
)
-
-inline

+Additional Inherited Members

- Protected Member Functions inherited from tbb::internal::task_group_base
+task & owner ()
 
+template<typename F >
task_group_status internal_run_and_wait (F &f)
 
+template<typename F , typename Task >
void internal_run (F &f)
 
- Protected Attributes inherited from tbb::internal::task_group_base
+empty_task * my_root
 
+task_group_context my_context
 
-
-

Enqueues a task with priority p into the arena to process a functor f, and immediately returns. Does not require the calling thread to join the arena

- -
-
- -
-
-
-template<typename F >
- - - - - -
- - - - - - - - -
void tbb::interface7::task_arena::execute (F & f)
-
-inline
-
-

Joins the arena and executes a functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread

- -
-
- -
-
-
-template<typename F >
- - - - - -
- - - - - - - - -
void tbb::interface7::task_arena::execute (const F & f)
-
-inline
-
-

Joins the arena and executes a functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread

- -
-
- -
-
- - - - - -
- - - - - - - -
bool tbb::interface7::task_arena::is_active () const
-
-inline
-
-

Returns true if the arena is active (initialized); false otherwise. The name was chosen to match a task_scheduler_init method with the same semantics.

- -
-
- -
-
- - - - - -
- - - - - - - -
void tbb::interface7::task_arena::terminate ()
-
-inline
-
-

Removes the reference to the internal arena representation. Not thread safe wrt concurrent invocations of other methods.

- -
-

The documentation for this class was generated from the following file:
    -
  • task_arena.h
  • +
  • task_group.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00183.png b/doc/html/a00183.png index e9685d4171a2c2b80abd7f134114e57d1cfc52ca..f9335edceafd7f8bc89407edcd399573fb4cb1e3 100644 Binary files a/doc/html/a00183.png and b/doc/html/a00183.png differ diff --git a/doc/html/a00184.html b/doc/html/a00184.html index 8ddade1bfec66b1c7a2a3c2c1e897c0f654bca27..ecbcf645d8dcb1ab5722bb99c0b9ecdecbe8785e 100644 --- a/doc/html/a00184.html +++ b/doc/html/a00184.html @@ -4,7 +4,7 @@ -tbb::task_group Class Reference +tbb::flow::interface8::internal::successor_cache< T, M > Class Template Reference @@ -33,92 +33,21 @@
-
-
tbb::task_group Class Reference
+
tbb::flow::interface8::internal::successor_cache< T, M > Class Template Reference
-
-Inheritance diagram for tbb::task_group:
-
-
- - -tbb::internal::task_group_base - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-template<typename F >
void run (task_handle< F > &h)
 
-template<typename F >
void run (const F &f)
 
-template<typename F >
task_group_status run_and_wait (const F &f)
 
-template<typename F >
task_group_status run_and_wait (task_handle< F > &h)
 
- Public Member Functions inherited from tbb::internal::task_group_base
task_group_base (uintptr_t traits=0)
 
-template<typename F >
void run (task_handle< F > &h)
 
-task_group_status wait ()
 
-bool is_canceling ()
 
-void cancel ()
 
- - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Member Functions inherited from tbb::internal::task_group_base
-task & owner ()
 
-template<typename F >
task_group_status internal_run_and_wait (F &f)
 
-template<typename F , typename Task >
void internal_run (F &f)
 
- Protected Attributes inherited from tbb::internal::task_group_base
-empty_task * my_root
 
-task_group_context my_context
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00185.html b/doc/html/a00185.html index 0f4d9244e73fbc17fecb9367b07acd2a64109fa2..205efb2513e5e1fb7e36d395fb4a9b1e6017e04a 100644 --- a/doc/html/a00185.html +++ b/doc/html/a00185.html @@ -4,7 +4,7 @@ -tbb::internal::task_group_base Class Reference +tbb::interface7::task_arena Class Reference @@ -33,79 +33,362 @@
-
tbb::internal::task_group_base Class Reference
+
tbb::interface7::task_arena Class Reference
+ +

#include <task_arena.h>

-Inheritance diagram for tbb::internal::task_group_base:
+Inheritance diagram for tbb::interface7::task_arena:
- - -tbb::structured_task_group -tbb::task_group + +
+ + + + +

+Classes

struct  attach
 Tag class used to indicate the "attaching" constructor. More...
 
- - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

task_group_base (uintptr_t traits=0)
 
-template<typename F >
void run (task_handle< F > &h)
 
-task_group_status wait ()
 
-bool is_canceling ()
 
-void cancel ()
 
 task_arena (int max_concurrency=automatic, unsigned reserved_for_masters=1)
 Creates task_arena with certain concurrency limits. More...
 
task_arena (const task_arena &s)
 Copies settings from another task_arena.
 
task_arena (attach)
 Creates an instance of task_arena attached to the current arena of the thread.
 
+void initialize ()
 Forces allocation of the resources for the task_arena as specified in constructor arguments.
 
+void initialize (int max_concurrency, unsigned reserved_for_masters=1)
 Overrides concurrency level and forces initialization of internal representation.
 
+void initialize (attach)
 Attaches this instance to the current arena of the thread.
 
void terminate ()
 
 ~task_arena ()
 
bool is_active () const
 
template<typename F >
void enqueue (const F &f)
 
template<typename F >
void enqueue (const F &f, priority_t p)
 
template<typename F >
void execute (F &f)
 
template<typename F >
void execute (const F &f)
 
void debug_wait_until_empty ()
 
- - - - - - - - - + + + +

-Protected Member Functions

-task & owner ()
 
-template<typename F >
task_group_status internal_run_and_wait (F &f)
 
-template<typename F , typename Task >
void internal_run (F &f)
 

+Static Public Member Functions

+static int current_thread_index ()
 Returns the index, aka slot number, of the calling thread in its current arena.
 
- - - - - + + + +

-Protected Attributes

-empty_task * my_root
 
-task_group_context my_context
 

+Friends

+class tbb::internal::task_scheduler_observer_v3
 
+

Detailed Description

+

1-to-1 proxy representation class of scheduler's arena Constructors set up settings only, real construction is deferred till the first method invocation Destructor only removes one of the references to the inner arena representation. Final destruction happens when all the references (and the work) are gone.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
tbb::interface7::task_arena::task_arena (int max_concurrency = automatic,
unsigned reserved_for_masters = 1 
)
+
+inline
+
+ +

Creates task_arena with certain concurrency limits.

+

Sets up settings only, real construction is deferred till the first method invocation

+
    +
  • max_concurrency specifies total number of slots in arena where threads work
  • +
  • reserved_for_masters specifies number of slots to be used by master threads only. Value of 1 is default and reflects behavior of implicit arenas.
  • +
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
tbb::interface7::task_arena::~task_arena ()
+
+inline
+
+

Removes the reference to the internal arena representation, and destroys the external object. Not thread safe wrt concurrent invocations of other methods.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
void tbb::interface7::task_arena::debug_wait_until_empty ()
+
+inline
+
+

Wait for all work in the arena to be completed Even submitted by other application threads Joins arena if/when possible (in the same way as execute())

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
void tbb::interface7::task_arena::enqueue (const F & f)
+
+inline
+
+

Enqueues a task into the arena to process a functor, and immediately returns. Does not require the calling thread to join the arena

+ +
+
+ +
+
+
+template<typename F >
+ + + + +
+ + + + + + + + + + + + + + + + + + +
void tbb::interface7::task_arena::enqueue (const F & f,
priority_t p 
)
+
+inline
+
+

Enqueues a task with priority p into the arena to process a functor f, and immediately returns. Does not require the calling thread to join the arena

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
void tbb::interface7::task_arena::execute (F & f)
+
+inline
+
+

Joins the arena and executes a functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread

+ +
+
+ +
+
+
+template<typename F >
+ + + + + +
+ + + + + + + + +
void tbb::interface7::task_arena::execute (const F & f)
+
+inline
+
+

Joins the arena and executes a functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
bool tbb::interface7::task_arena::is_active () const
+
+inline
+
+

Returns true if the arena is active (initialized); false otherwise. The name was chosen to match a task_scheduler_init method with the same semantics.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void tbb::interface7::task_arena::terminate ()
+
+inline
+
+

Removes the reference to the internal arena representation. Not thread safe wrt concurrent invocations of other methods.

+ +
+

The documentation for this class was generated from the following file:
    -
  • task_group.h
  • +
  • task_arena.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00185.png b/doc/html/a00185.png index e95fec5546162fcf72b876a7571a40174f6db6a5..e9685d4171a2c2b80abd7f134114e57d1cfc52ca 100644 Binary files a/doc/html/a00185.png and b/doc/html/a00185.png differ diff --git a/doc/html/a00186.html b/doc/html/a00186.html index e471d5b5df35d3767efe6770c4022705d7290d43..c31ebb0903c8136953ba9a3371bbe063d5eb960f 100644 --- a/doc/html/a00186.html +++ b/doc/html/a00186.html @@ -4,7 +4,7 @@ -tbb::task_group_context Struct Reference +tbb::task_group Class Reference @@ -33,25 +33,92 @@
+
-
tbb::task_group_context Struct Reference
+
tbb::task_group Class Reference
- -

#include <parallel_invoke.h>

-

Detailed Description

-

Dummy to avoid cluttering the bulk of the header with enormous amount of ifdefs.

-

The documentation for this struct was generated from the following file:
    -
  • parallel_invoke.h
  • +
    +Inheritance diagram for tbb::task_group:
    +
    +
    + + +tbb::internal::task_group_base + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    +template<typename F >
    void run (task_handle< F > &h)
     
    +template<typename F >
    void run (const F &f)
     
    +template<typename F >
    task_group_status run_and_wait (const F &f)
     
    +template<typename F >
    task_group_status run_and_wait (task_handle< F > &h)
     
    - Public Member Functions inherited from tbb::internal::task_group_base
    task_group_base (uintptr_t traits=0)
     
    +template<typename F >
    void run (task_handle< F > &h)
     
    +task_group_status wait ()
     
    +bool is_canceling ()
     
    +void cancel ()
     
    + + + + + + + + + + + + + + + +

    +Additional Inherited Members

    - Protected Member Functions inherited from tbb::internal::task_group_base
    +task & owner ()
     
    +template<typename F >
    task_group_status internal_run_and_wait (F &f)
     
    +template<typename F , typename Task >
    void internal_run (F &f)
     
    - Protected Attributes inherited from tbb::internal::task_group_base
    +empty_task * my_root
     
    +task_group_context my_context
     
    +
    The documentation for this class was generated from the following file:
      +
    • task_group.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00184.png b/doc/html/a00186.png similarity index 100% rename from doc/html/a00184.png rename to doc/html/a00186.png diff --git a/doc/html/a00187.html b/doc/html/a00187.html index 42379a4f368973b91dce0323edbbaea73fcf6f54..81a0360698ac603f18c56f9b303384292b63f581 100644 --- a/doc/html/a00187.html +++ b/doc/html/a00187.html @@ -4,7 +4,7 @@ -tbb::task_handle< F > Class Template Reference +tbb::internal::task_group_base Class Reference @@ -33,48 +33,71 @@
-
tbb::task_handle< F > Class Template Reference
+
tbb::internal::task_group_base Class Reference
-Inheritance diagram for tbb::task_handle< F >:
+Inheritance diagram for tbb::internal::task_group_base:
- - + + +tbb::structured_task_group +tbb::task_group
- - - - + + + + + + + + + + +

Public Member Functions

task_handle (const F &f)
 
-void operator() () const
 
task_group_base (uintptr_t traits=0)
 
+template<typename F >
void run (task_handle< F > &h)
 
+task_group_status wait ()
 
+bool is_canceling ()
 
+void cancel ()
 
- - - - - - - - + + + + + + + + + +

-Friends

-template<typename _F >
class internal::task_handle_task
 
-class task_group
 
-class structured_task_group
 

+Protected Member Functions

+task & owner ()
 
+template<typename F >
task_group_status internal_run_and_wait (F &f)
 
+template<typename F , typename Task >
void internal_run (F &f)
 
+ + + + +

+Protected Attributes

+empty_task * my_root
 
+task_group_context my_context
 

The documentation for this class was generated from the following file:
  • task_group.h
  • @@ -82,7 +105,7 @@ class 
structured_task_grou

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00187.png b/doc/html/a00187.png index 5f640e9e7369f83c7c304b581f01b7969a27ed2f..e95fec5546162fcf72b876a7571a40174f6db6a5 100644 Binary files a/doc/html/a00187.png and b/doc/html/a00187.png differ diff --git a/doc/html/a00188.html b/doc/html/a00188.html index 572565f8d22b943d58c854b695adda8f3d5d0a6d..1c0fbad0a9219c731837d42bc906a94e6aa9c4a6 100644 --- a/doc/html/a00188.html +++ b/doc/html/a00188.html @@ -4,7 +4,7 @@ -tbb::internal::task_handle_task< F > Class Template Reference +tbb::task_group_context Struct Reference @@ -33,39 +33,25 @@
-
-
tbb::internal::task_handle_task< F > Class Template Reference
+
tbb::task_group_context Struct Reference
-
-Inheritance diagram for tbb::internal::task_handle_task< F >:
-
-
- - - -
- - - - -

-Public Member Functions

task_handle_task (task_handle< F > &h)
 
-
The documentation for this class was generated from the following file:
    -
  • task_group.h
  • + +

    #include <parallel_invoke.h>

    +

    Detailed Description

    +

    Dummy to avoid cluttering the bulk of the header with enormous amount of ifdefs.

    +

    The documentation for this struct was generated from the following file:
      +
    • parallel_invoke.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00188.png b/doc/html/a00188.png deleted file mode 100644 index 229263c6223fbf739b854a1eafa70239ec72a2cf..0000000000000000000000000000000000000000 Binary files a/doc/html/a00188.png and /dev/null differ diff --git a/doc/html/a00189.html b/doc/html/a00189.html index e49c2e9da276830ad859bc767ee86282ae9a5c4b..15a3998ff675b3bb8da99ba361ac2d684a79301a 100644 --- a/doc/html/a00189.html +++ b/doc/html/a00189.html @@ -4,7 +4,7 @@ -tbb::task_scheduler_init Class Reference +tbb::task_handle< F > Class Template Reference @@ -33,180 +33,56 @@
-
tbb::task_scheduler_init Class Reference
+
tbb::task_handle< F > Class Template Reference
- -

Class delimiting the scope of task scheduler activity. - More...

- -

#include <task_scheduler_init.h>

-Inheritance diagram for tbb::task_scheduler_init:
+Inheritance diagram for tbb::task_handle< F >:
- - + +
- - - - - - - - - - - - - - - - - - - + + + +

Public Member Functions

void __TBB_EXPORTED_METHOD initialize (int number_of_threads=automatic)
 Ensure that scheduler exists for this thread. More...
 
void __TBB_EXPORTED_METHOD initialize (int number_of_threads, stack_size_type thread_stack_size)
 The overloaded method with stack size parameter. More...
 
-void __TBB_EXPORTED_METHOD terminate ()
 Inverse of method initialize.
 
if (wait_workers_in_terminate) my_scheduler
 
initialize (number_of_threads, thread_stack_size)
 
~task_scheduler_init ()
 Destroy scheduler for this thread if thread has no other live task_scheduler_inits.
 
-bool is_active () const
 Returns true if scheduler is active (initialized); false otherwise.
 
task_handle (const F &f)
 
+void operator() () const
 
- - - - -

-Static Public Member Functions

static int __TBB_EXPORTED_FUNC default_num_threads ()
 Returns the number of threads TBB scheduler would create if initialized by default. More...
 
- - - - -

-Public Attributes

-task_scheduler_init(int
-number_of_threads=automatic,
-stack_size_type
-thread_stack_size=0, bool
-wait_workers_in_terminate=false) 
thread_stack_size = TBB_USE_CAPTURED_EXCEPTION ? propagation_mode_captured : propagation_mode_exact
 Shorthand for default constructor followed by call to initialize(number_of_threads).
 
- - - - - - - -

-Static Public Attributes

-static const int automatic = -1
 Typedef for number of threads that is automatic.
 
-static const int deferred = -2
 Argument to initialize() or constructor that causes initialization to be deferred.
 
-

Detailed Description

-

Class delimiting the scope of task scheduler activity.

-

A thread can construct a task_scheduler_init object and keep it alive while it uses TBB's tasking subsystem (including parallel algorithms).

-

This class allows to customize properties of the TBB task pool to some extent. For example it can limit concurrency level of parallel work initiated by the given thread. It also can be used to specify stack size of the TBB worker threads, though this setting is not effective if the thread pool has already been created.

-

If a parallel construct is used without task_scheduler_init object previously created, the scheduler will be initialized automatically with default settings, and will persist until this thread exits. Default concurrency level is defined as described in task_scheduler_init::initialize().

-

Member Function Documentation

- -
-
- - - - - + + + + + + + +
- - - - - - - -
static int __TBB_EXPORTED_FUNC tbb::task_scheduler_init::default_num_threads ()
-
-static

+Friends

+template<typename _F >
class internal::task_handle_task
 
+class task_group
 
+class structured_task_group
 
-
- -

Returns the number of threads TBB scheduler would create if initialized by default.

-

Result returned by this method does not depend on whether the scheduler has already been initialized.

-

Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state.

-

Before TBB 3.0 U4 this method returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask.

-

NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool.

- -
-
- -
-
- - - - - - - - -
void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize (int number_of_threads = automatic)
-
- -

Ensure that scheduler exists for this thread.

-

A value of -1 lets TBB decide on the number of threads, which is usually maximal hardware concurrency for this process, that is the number of logical CPUs on the machine (possibly limited by the processor affinity mask of this process (Windows) or of this thread (Linux, FreeBSD). It is preferable option for production code because it helps to avoid nasty surprises when several TBB based components run side-by-side or in a nested fashion inside the same process.

-

The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize (int number_of_threads,
stack_size_type thread_stack_size 
)
-
- -

The overloaded method with stack size parameter.

-

Overloading is necessary to preserve ABI compatibility

- -
-

The documentation for this class was generated from the following file:
    -
  • task_scheduler_init.h
  • +
  • task_group.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00189.png b/doc/html/a00189.png index 58550fd5aa8d025a8c6f44950d758c08a4175849..5f640e9e7369f83c7c304b581f01b7969a27ed2f 100644 Binary files a/doc/html/a00189.png and b/doc/html/a00189.png differ diff --git a/doc/html/a00190.html b/doc/html/a00190.html index bfcaaca054a7c98a9de8f4718d2710283f21a26e..8c283079803790f7888b83303f802b8dc4d1bc9f 100644 --- a/doc/html/a00190.html +++ b/doc/html/a00190.html @@ -4,7 +4,7 @@ -tbb::interface6::task_scheduler_observer Class Reference +tbb::internal::task_handle_task< F > Class Template Reference @@ -33,234 +33,39 @@
-
tbb::interface6::task_scheduler_observer Class Reference
+
tbb::internal::task_handle_task< F > Class Template Reference
-Inheritance diagram for tbb::interface6::task_scheduler_observer:
+Inheritance diagram for tbb::internal::task_handle_task< F >:
- - -tbb::internal::task_scheduler_observer_v3 + +
- - - - -

-Public Types

enum  { keep_awake = false, -allow_sleep = true - }
 Return commands for may_sleep()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 task_scheduler_observer (bool local=false)
 Construct local or global observer in inactive state (observation disabled). More...
 
 task_scheduler_observer (task_arena &a)
 Construct local observer for a given arena in inactive state (observation disabled). More...
 
virtual ~task_scheduler_observer ()
 
void observe (bool state=true)
 Enable or disable observation. More...
 
virtual bool may_sleep ()
 The callback can be invoked by a worker thread before it goes to sleep. More...
 
- Public Member Functions inherited from tbb::internal::task_scheduler_observer_v3
void __TBB_EXPORTED_METHOD observe (bool state=true)
 Enable or disable observation. More...
 
-bool is_observing () const
 Returns true if observation is enabled, false otherwise.
 
task_scheduler_observer_v3 ()
 Construct observer with observation disabled.
 
virtual void on_scheduler_entry (bool)
 Entry notification. More...
 
virtual void on_scheduler_exit (bool)
 Exit notification. More...
 
-virtual ~task_scheduler_observer_v3 ()
 Destructor automatically switches observation off if it is enabled.
 
- - - - - - - + +

-Friends

-class internal::task_scheduler_observer_v3
 
-class internal::observer_proxy
 
-class internal::observer_list
 
task_handle_task (task_handle< F > &h)
 
-

Constructor & Destructor Documentation

- -
-
- - - - - -
- - - - - - - - -
tbb::interface6::task_scheduler_observer::task_scheduler_observer (bool local = false)
-
-inline
-
- -

Construct local or global observer in inactive state (observation disabled).

-

For a local observer entry/exit notifications are invoked whenever a worker thread joins/leaves the arena of the observer's owner thread. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. TODO: Obsolete. Global observer semantics is obsolete as it violates master thread isolation guarantees and is not composable. Thus the current default behavior of the constructor is obsolete too and will be changed in one of the future versions of the library.

- -
-
- -
-
- - - - - -
- - - - - - - - -
tbb::interface6::task_scheduler_observer::task_scheduler_observer (task_arena & a)
-
-inline
-
- -

Construct local observer for a given arena in inactive state (observation disabled).

-

entry/exit notifications are invoked whenever a thread joins/leaves arena. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task.

- -
-
- -
-
- - - - - -
- - - - - - - -
virtual tbb::interface6::task_scheduler_observer::~task_scheduler_observer ()
-
-inlinevirtual
-
-

Destructor protects instance of the observer from concurrent notification. It is recommended to disable observation before destructor of a derived class starts, otherwise it can lead to concurrent notification callback on partly destroyed object

- -

References observe().

- -
-
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
virtual bool tbb::interface6::task_scheduler_observer::may_sleep ()
-
-inlinevirtual
-
- -

The callback can be invoked by a worker thread before it goes to sleep.

-

If it returns false ('keep_awake'), the thread will keep spinning and looking for work. It will not be called for master threads.

- -
-
- -
-
- - - - - -
- - - - - - - - -
void tbb::interface6::task_scheduler_observer::observe (bool state = true)
-
-inline
-
- -

Enable or disable observation.

-

Warning: concurrent invocations of this method are not safe. Repeated calls with the same state are no-ops.

- -

References tbb::internal::task_scheduler_observer_v3::observe(), and tbb::relaxed.

- -

Referenced by ~task_scheduler_observer().

- -
-

The documentation for this class was generated from the following file:
    -
  • task_scheduler_observer.h
  • +
  • task_group.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00190.png b/doc/html/a00190.png index 37496e90766c364ef54c599c792827549384d309..229263c6223fbf739b854a1eafa70239ec72a2cf 100644 Binary files a/doc/html/a00190.png and b/doc/html/a00190.png differ diff --git a/doc/html/a00191.html b/doc/html/a00191.html index da0c35029b43f59bb183609b16257fefea4fe6ea..7c9f42445207fa6b982dfe475f8602185f1feae8 100644 --- a/doc/html/a00191.html +++ b/doc/html/a00191.html @@ -4,7 +4,7 @@ -tbb::internal::task_scheduler_observer_v3 Class Reference +tbb::task_scheduler_init Class Reference @@ -33,150 +33,180 @@
-
tbb::internal::task_scheduler_observer_v3 Class Reference
+
tbb::task_scheduler_init Class Reference
+ +

Class delimiting the scope of task scheduler activity. + More...

+ +

#include <task_scheduler_init.h>

-Inheritance diagram for tbb::internal::task_scheduler_observer_v3:
+Inheritance diagram for tbb::task_scheduler_init:
- - -tbb::interface6::task_scheduler_observer + +
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +

Public Member Functions

void __TBB_EXPORTED_METHOD observe (bool state=true)
 Enable or disable observation. More...
 
-bool is_observing () const
 Returns true if observation is enabled, false otherwise.
 
task_scheduler_observer_v3 ()
 Construct observer with observation disabled.
 
virtual void on_scheduler_entry (bool)
 Entry notification. More...
 
virtual void on_scheduler_exit (bool)
 Exit notification. More...
 
-virtual ~task_scheduler_observer_v3 ()
 Destructor automatically switches observation off if it is enabled.
 
void __TBB_EXPORTED_METHOD initialize (int number_of_threads=automatic)
 Ensure that scheduler exists for this thread. More...
 
void __TBB_EXPORTED_METHOD initialize (int number_of_threads, stack_size_type thread_stack_size)
 The overloaded method with stack size parameter. More...
 
+void __TBB_EXPORTED_METHOD terminate ()
 Inverse of method initialize.
 
if (wait_workers_in_terminate) my_scheduler
 
initialize (number_of_threads, thread_stack_size)
 
~task_scheduler_init ()
 Destroy scheduler for this thread if thread has no other live task_scheduler_inits.
 
+bool is_active () const
 Returns true if scheduler is active (initialized); false otherwise.
 
+ + + +

+Static Public Member Functions

static int __TBB_EXPORTED_FUNC default_num_threads ()
 Returns the number of threads TBB scheduler would create if initialized by default. More...
 
- - - - - - - + + + + +

-Friends

-class observer_proxy
 
-class observer_list
 
-class interface6::task_scheduler_observer
 

+Public Attributes

+task_scheduler_init(int
+number_of_threads=automatic,
+stack_size_type
+thread_stack_size=0, bool
+wait_workers_in_terminate=false) 
thread_stack_size = TBB_USE_CAPTURED_EXCEPTION ? propagation_mode_captured : propagation_mode_exact
 Shorthand for default constructor followed by call to initialize(number_of_threads).
 
+ + + + + + +

+Static Public Attributes

+static const int automatic = -1
 Typedef for number of threads that is automatic.
 
+static const int deferred = -2
 Argument to initialize() or constructor that causes initialization to be deferred.
 
-

Member Function Documentation

- +

Detailed Description

+

Class delimiting the scope of task scheduler activity.

+

A thread can construct a task_scheduler_init object and keep it alive while it uses TBB's tasking subsystem (including parallel algorithms).

+

This class allows to customize properties of the TBB task pool to some extent. For example it can limit concurrency level of parallel work initiated by the given thread. It also can be used to specify stack size of the TBB worker threads, though this setting is not effective if the thread pool has already been created.

+

If a parallel construct is used without task_scheduler_init object previously created, the scheduler will be initialized automatically with default settings, and will persist until this thread exits. Default concurrency level is defined as described in task_scheduler_init::initialize().

+

Member Function Documentation

+
+ + + + + +
- + - - +
void __TBB_EXPORTED_METHOD tbb::internal::task_scheduler_observer_v3::observe static int __TBB_EXPORTED_FUNC tbb::task_scheduler_init::default_num_threads (bool state = true))
+
+static
-

Enable or disable observation.

-

For local observers the method can be used only when the current thread has the task scheduler initialized or is attached to an arena.

-

Repeated calls with the same state are no-ops.

- -

Referenced by tbb::interface6::task_scheduler_observer::observe(), and ~task_scheduler_observer_v3().

+

Returns the number of threads TBB scheduler would create if initialized by default.

+

Result returned by this method does not depend on whether the scheduler has already been initialized.

+

Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state.

+

Before TBB 3.0 U4 this method returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask.

+

NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool.

- +
- - - - - -
- + - - + +
virtual void tbb::internal::task_scheduler_observer_v3::on_scheduler_entry void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize (bool )int number_of_threads = automatic)
-
-inlinevirtual
-

Entry notification.

-

Invoked from inside observe(true) call and whenever a worker enters the arena this observer is associated with. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task.

-

Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled.

+

Ensure that scheduler exists for this thread.

+

A value of -1 lets TBB decide on the number of threads, which is usually maximal hardware concurrency for this process, that is the number of logical CPUs on the machine (possibly limited by the processor affinity mask of this process (Windows) or of this thread (Linux, FreeBSD). It is preferable option for production code because it helps to avoid nasty surprises when several TBB based components run side-by-side or in a nested fashion inside the same process.

+

The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted.

- +
- - - - - -
- + - - + + + + + + + + + + + +
virtual void tbb::internal::task_scheduler_observer_v3::on_scheduler_exit void __TBB_EXPORTED_METHOD tbb::task_scheduler_init::initialize (bool )int number_of_threads,
stack_size_type thread_stack_size 
)
-
-inlinevirtual
-

Exit notification.

-

Invoked from inside observe(false) call and whenever a worker leaves the arena this observer is associated with.

-

Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled.

+

The overloaded method with stack size parameter.

+

Overloading is necessary to preserve ABI compatibility


The documentation for this class was generated from the following file:
    -
  • task_scheduler_observer.h
  • +
  • task_scheduler_init.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00191.png b/doc/html/a00191.png index b87088c72d9c41832275a3a031b419b26a0c66d6..58550fd5aa8d025a8c6f44950d758c08a4175849 100644 Binary files a/doc/html/a00191.png and b/doc/html/a00191.png differ diff --git a/doc/html/a00192.html b/doc/html/a00192.html index dcdff54f266839e4acafb35dd6fd2e814b2a4b21..e8369f773d28a0423ee1100518f1ba7480a7a022 100644 --- a/doc/html/a00192.html +++ b/doc/html/a00192.html @@ -4,7 +4,7 @@ -tbb::tbb_allocator< T > Class Template Reference +tbb::interface6::task_scheduler_observer Class Reference @@ -33,125 +33,234 @@
-
tbb::tbb_allocator< T > Class Template Reference
+
tbb::interface6::task_scheduler_observer Class Reference
- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. - More...

- -

#include <tbb_allocator.h>

+
+Inheritance diagram for tbb::interface6::task_scheduler_observer:
+
+
+ + +tbb::internal::task_scheduler_observer_v3 + +
- - - -

-Classes

struct  rebind
 
- - - - - - - - - - - - - - - - - + +

Public Types

enum  malloc_type { scalable, -standard +
enum  { keep_awake = false, +allow_sleep = true }
 Specifies current allocator.
 
-typedef
-internal::allocator_type< T >
-::value_type 
value_type
 
-typedef value_type * pointer
 
-typedef const value_type * const_pointer
 
-typedef value_type & reference
 
-typedef const value_type & const_reference
 
-typedef size_t size_type
 
-typedef ptrdiff_t difference_type
 
 Return commands for may_sleep()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

tbb_allocator (const tbb_allocator &) throw ()
 
-template<typename U >
 tbb_allocator (const tbb_allocator< U > &) throw ()
 
-pointer address (reference x) const
 
-const_pointer address (const_reference x) const
 
-pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
-void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
-size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
-template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
-void construct (pointer p, value_type &&value)
 
-void construct (pointer p, const value_type &value)
 
-void destroy (pointer p)
 Destroy value at location pointed to by p.
 
 task_scheduler_observer (bool local=false)
 Construct local or global observer in inactive state (observation disabled). More...
 
 task_scheduler_observer (task_arena &a)
 Construct local observer for a given arena in inactive state (observation disabled). More...
 
virtual ~task_scheduler_observer ()
 
void observe (bool state=true)
 Enable or disable observation. More...
 
virtual bool may_sleep ()
 The callback can be invoked by a worker thread before it goes to sleep. More...
 
- Public Member Functions inherited from tbb::internal::task_scheduler_observer_v3
void __TBB_EXPORTED_METHOD observe (bool state=true)
 Enable or disable observation. More...
 
+bool is_observing () const
 Returns true if observation is enabled, false otherwise.
 
task_scheduler_observer_v3 ()
 Construct observer with observation disabled.
 
virtual void on_scheduler_entry (bool)
 Entry notification. More...
 
virtual void on_scheduler_exit (bool)
 Exit notification. More...
 
+virtual ~task_scheduler_observer_v3 ()
 Destructor automatically switches observation off if it is enabled.
 
- - - - + + + + + + + +

-Static Public Member Functions

-static malloc_type allocator_type ()
 Returns current allocator.
 

+Friends

+class internal::task_scheduler_observer_v3
 
+class internal::observer_proxy
 
+class internal::observer_list
 
+

Constructor & Destructor Documentation

+ +
+
+ + + + +
+ + + + + + + + +
tbb::interface6::task_scheduler_observer::task_scheduler_observer (bool local = false)
+
+inline
-

Detailed Description

-

template<typename T>
-class tbb::tbb_allocator< T >

+
+ +

Construct local or global observer in inactive state (observation disabled).

+

For a local observer entry/exit notifications are invoked whenever a worker thread joins/leaves the arena of the observer's owner thread. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. TODO: Obsolete. Global observer semantics is obsolete as it violates master thread isolation guarantees and is not composable. Thus the current default behavior of the constructor is obsolete too and will be changed in one of the future versions of the library.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
tbb::interface6::task_scheduler_observer::task_scheduler_observer (task_arena & a)
+
+inline
+
+ +

Construct local observer for a given arena in inactive state (observation disabled).

+

entry/exit notifications are invoked whenever a thread joins/leaves arena. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
virtual tbb::interface6::task_scheduler_observer::~task_scheduler_observer ()
+
+inlinevirtual
+
+

Destructor protects instance of the observer from concurrent notification. It is recommended to disable observation before destructor of a derived class starts, otherwise it can lead to concurrent notification callback on partly destroyed object

+ +

References observe().

-

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

-

The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

-

The documentation for this class was generated from the following file:
    -
  • tbb_allocator.h
  • +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + +
virtual bool tbb::interface6::task_scheduler_observer::may_sleep ()
+
+inlinevirtual
+
+ +

The callback can be invoked by a worker thread before it goes to sleep.

+

If it returns false ('keep_awake'), the thread will keep spinning and looking for work. It will not be called for master threads.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void tbb::interface6::task_scheduler_observer::observe (bool state = true)
+
+inline
+
+ +

Enable or disable observation.

+

Warning: concurrent invocations of this method are not safe. Repeated calls with the same state are no-ops.

+ +

References tbb::internal::task_scheduler_observer_v3::observe(), and tbb::relaxed.

+ +

Referenced by ~task_scheduler_observer().

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • task_scheduler_observer.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00192.png b/doc/html/a00192.png new file mode 100644 index 0000000000000000000000000000000000000000..37496e90766c364ef54c599c792827549384d309 Binary files /dev/null and b/doc/html/a00192.png differ diff --git a/doc/html/a00193.html b/doc/html/a00193.html index 6489324ab91cd589b6ed25b146435d2a23690129..1df7465f06967e7e5da4dadd167cd4ec62b83306 100644 --- a/doc/html/a00193.html +++ b/doc/html/a00193.html @@ -4,7 +4,7 @@ -tbb::tbb_allocator< void > Class Template Reference +tbb::internal::task_scheduler_observer_v3 Class Reference @@ -33,53 +33,150 @@
-
tbb::tbb_allocator< void > Class Template Reference
+
tbb::internal::task_scheduler_observer_v3 Class Reference
- -

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. - More...

- -

#include <tbb_allocator.h>

+
+Inheritance diagram for tbb::internal::task_scheduler_observer_v3:
+
+
+ + +tbb::interface6::task_scheduler_observer + +
- - - + + + + + + + + + + + + + + + + + + +

-Classes

struct  rebind
 

+Public Member Functions

void __TBB_EXPORTED_METHOD observe (bool state=true)
 Enable or disable observation. More...
 
+bool is_observing () const
 Returns true if observation is enabled, false otherwise.
 
task_scheduler_observer_v3 ()
 Construct observer with observation disabled.
 
virtual void on_scheduler_entry (bool)
 Entry notification. More...
 
virtual void on_scheduler_exit (bool)
 Exit notification. More...
 
+virtual ~task_scheduler_observer_v3 ()
 Destructor automatically switches observation off if it is enabled.
 
- - - - - - - + + + + + + + +

-Public Types

-typedef void * pointer
 
-typedef const void * const_pointer
 
-typedef void value_type
 

+Friends

+class observer_proxy
 
+class observer_list
 
+class interface6::task_scheduler_observer
 
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void __TBB_EXPORTED_METHOD tbb::internal::task_scheduler_observer_v3::observe (bool state = true)
+
+ +

Enable or disable observation.

+

For local observers the method can be used only when the current thread has the task scheduler initialized or is attached to an arena.

+

Repeated calls with the same state are no-ops.

+ +

Referenced by tbb::interface6::task_scheduler_observer::observe(), and ~task_scheduler_observer_v3().

+ +
+
+ +
+
+ + + + +
+ + + + + + + + +
virtual void tbb::internal::task_scheduler_observer_v3::on_scheduler_entry (bool )
+
+inlinevirtual
-

Detailed Description

-

template<>
-class tbb::tbb_allocator< void >

+
-

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

-

The documentation for this class was generated from the following file:
    -
  • tbb_allocator.h
  • +

    Entry notification.

    +

    Invoked from inside observe(true) call and whenever a worker enters the arena this observer is associated with. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task.

    +

    Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled.

    + +
+
+ +
+
+ + + + + +
+ + + + + + + + +
virtual void tbb::internal::task_scheduler_observer_v3::on_scheduler_exit (bool )
+
+inlinevirtual
+
+ +

Exit notification.

+

Invoked from inside observe(false) call and whenever a worker leaves the arena this observer is associated with.

+

Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • task_scheduler_observer.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00193.png b/doc/html/a00193.png new file mode 100644 index 0000000000000000000000000000000000000000..b87088c72d9c41832275a3a031b419b26a0c66d6 Binary files /dev/null and b/doc/html/a00193.png differ diff --git a/doc/html/a00194.html b/doc/html/a00194.html index da5d7c2de649e4baba093da8608b363908732c14..8b15888c047837e29e89a5fac6a6f8f826595a4f 100644 --- a/doc/html/a00194.html +++ b/doc/html/a00194.html @@ -4,7 +4,7 @@ -tbb::tbb_exception Class Reference +tbb::tbb_allocator< T > Class Template Reference @@ -33,191 +33,125 @@
-
tbb::tbb_exception Class Referenceabstract
+
tbb::tbb_allocator< T > Class Template Reference
-

Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. +

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. More...

-

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::tbb_exception:
-
-
- - -tbb::captured_exception -tbb::movable_exception< ExceptionData > - -
+

#include <tbb_allocator.h>

+ + + +

+Classes

struct  rebind
 
+ + + + + + + + + + + + + + + + + + +

+Public Types

enum  malloc_type { scalable, +standard + }
 Specifies current allocator.
 
+typedef
+internal::allocator_type< T >
+::value_type 
value_type
 
+typedef value_type * pointer
 
+typedef const value_type * const_pointer
 
+typedef value_type & reference
 
+typedef const value_type & const_reference
 
+typedef size_t size_type
 
+typedef ptrdiff_t difference_type
 
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual tbb_exceptionmove ()=0 throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
virtual void destroy ()=0 throw ()
 Destroys objects created by the move() method. More...
 
virtual void throw_self ()=0
 Throws this exception object. More...
 
-virtual const char * name () const =0 throw ()
 Returns RTTI name of the originally intercepted exception.
 
-virtual const char * what () const =0 throw ()
 Returns the result of originally intercepted exception's what() method.
 
void operator delete (void *p)
 
tbb_allocator (const tbb_allocator &) throw ()
 
+template<typename U >
 tbb_allocator (const tbb_allocator< U > &) throw ()
 
+pointer address (reference x) const
 
+const_pointer address (const_reference x) const
 
+pointer allocate (size_type n, const void *=0)
 Allocate space for n objects.
 
+void deallocate (pointer p, size_type)
 Free previously allocated block of memory.
 
+size_type max_size () const throw ()
 Largest value for which method allocate might succeed.
 
+template<typename U , typename... Args>
void construct (U *p, Args &&...args)
 Copy-construct value at location pointed to by p.
 
+void construct (pointer p, value_type &&value)
 
+void construct (pointer p, const value_type &value)
 
+void destroy (pointer p)
 Destroy value at location pointed to by p.
 
+ + + +

+Static Public Member Functions

+static malloc_type allocator_type ()
 Returns current allocator.
 

Detailed Description

-

Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.

-

If an unhandled exception of the type derived from tbb::tbb_exception is intercepted by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in the root thread. The root thread is the thread that has started the outermost algorithm or root task sharing the same task_group_context with the guilty algorithm/task (the one that threw the exception first).

-

Note: when documentation mentions workers with respect to exception handling, masters are implied as well, because they are completely equivalent in this context. Consequently a root thread can be master or worker thread.

-

NOTE: In case of nested algorithms or complex task hierarchies when the nested levels share (explicitly or by means of implicit inheritance) the task group context of the outermost level, the exception may be (re-)thrown multiple times (ultimately - in each worker on each nesting level) before reaching the root thread at the outermost level. IMPORTANT: if you intercept an exception derived from this class on a nested level, you must re-throw it in the catch block by means of the "throw;" operator.

-

TBB provides two implementations of this interface: tbb::captured_exception and template class tbb::movable_exception. See their declarations for more info.

-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - - - - - - - -
virtual void tbb::tbb_exception::destroy ()
throw (
)
-
-pure virtual
-
- -

Destroys objects created by the move() method.

-

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

- -

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.

+

template<typename T>
+class tbb::tbb_allocator< T >

-
-
- -
-
- - - - - -
- - - - - - - - - - - - - -
virtual tbb_exception* tbb::tbb_exception::move ()
throw (
)
-
-pure virtual
-
- -

Creates and returns pointer to the deep copy of this exception object.

-

Move semantics is allowed.

- -

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.

- -
-
- -
-
- - - - - -
- - - - - - - - -
void tbb::tbb_exception::operator delete (void * p)
-
-inline
-
-

Operator delete is provided only to allow using existing smart pointers with TBB exception objects obtained as the result of applying move() operation on an exception thrown out of TBB scheduler.

-

When overriding method move() make sure to override operator delete as well if memory is allocated not by TBB's scalable allocator.

- -
-
- -
-
- - - - - -
- - - - - - - -
virtual void tbb::tbb_exception::throw_self ()
-
-pure virtual
-
- -

Throws this exception object.

-

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

- -

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +

    Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

    +

    The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

    +

The documentation for this class was generated from the following file:
    +
  • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00195.html b/doc/html/a00195.html index 81165e902639b41009bb6b0e444092c18e34ab95..5bb90fdbd859cb7529fcfe400df9329738bc9df0 100644 --- a/doc/html/a00195.html +++ b/doc/html/a00195.html @@ -4,7 +4,7 @@ -tbb::internal::tbb_exception_ptr Class Reference +tbb::tbb_allocator< void > Class Template Reference @@ -33,82 +33,53 @@
-
tbb::internal::tbb_exception_ptr Class Reference
+
tbb::tbb_allocator< void > Class Template Reference
-

Exception container that preserves the exact copy of the original exception. +

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. More...

-

#include <tbb_exception.h>

+

#include <tbb_allocator.h>

- - - - - - - + + +

-Public Member Functions

void destroy () throw ()
 Destroys this objects. More...
 
-void throw_self ()
 Throws the contained exception .
 

+Classes

struct  rebind
 
- - - - - - - - + + + + + + +

-Static Public Member Functions

-static tbb_exception_ptrallocate ()
 
-static tbb_exception_ptrallocate (const tbb_exception &tag)
 
-static tbb_exception_ptrallocate (captured_exception &src)
 This overload uses move semantics (i.e. it empties src)
 

+Public Types

+typedef void * pointer
 
+typedef const void * const_pointer
 
+typedef void value_type
 

Detailed Description

-

Exception container that preserves the exact copy of the original exception.

-

This class can be used only when the appropriate runtime support (mandated by C++0x) is present

-

Member Function Documentation

- -
-
- - - - - - - - - - - - - -
void tbb::internal::tbb_exception_ptr::destroy ()
throw (
)
-
+

template<>
+class tbb::tbb_allocator< void >

-

Destroys this objects.

-

Note that objects of this type can be created only by the allocate() method.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +

    Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

    +

The documentation for this class was generated from the following file:
    +
  • tbb_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00196.html b/doc/html/a00196.html index 82bacc0faa04774d5cc8f697ce6b8759ffecca7b..4eddf9c96fc7c0ca67f3052b49ca31b448c6c2c7 100644 --- a/doc/html/a00196.html +++ b/doc/html/a00196.html @@ -4,7 +4,7 @@ -tbb::internal::tbb_thread_v3 Class Reference +tbb::tbb_exception Class Reference @@ -33,117 +33,63 @@
-
tbb::internal::tbb_thread_v3 Class Reference
+
tbb::tbb_exception Class Referenceabstract
-

Versioned thread class. +

Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. More...

-

#include <tbb_thread.h>

+

#include <tbb_exception.h>

+
+Inheritance diagram for tbb::tbb_exception:
+
+
+ + +tbb::captured_exception +tbb::movable_exception< ExceptionData > + +
- - - -

-Classes

class  id
 
- - - - - -

-Public Types

-typedef HANDLE native_handle_type
 
-typedef pthread_t native_handle_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

tbb_thread_v3 (const tbb_thread_v3 &)
 
tbb_thread_v3 () __TBB_NOEXCEPT(true)
 Constructs a thread object that does not represent a thread of execution.
 
-template<class F >
 tbb_thread_v3 (F f)
 Constructs an object and executes f() in a new thread.
 
-template<class F , class X >
 tbb_thread_v3 (F f, X x)
 Constructs an object and executes f(x) in a new thread.
 
-template<class F , class X , class Y >
 tbb_thread_v3 (F f, X x, Y y)
 Constructs an object and executes f(x,y) in a new thread.
 
-tbb_thread_v3operator= (tbb_thread_v3 &x)
 
-void swap (tbb_thread_v3 &t) __TBB_NOEXCEPT(true)
 
-bool joinable () const __TBB_NOEXCEPT(true)
 
-void __TBB_EXPORTED_METHOD join ()
 The completion of the thread represented by *this happens before join() returns.
 
-void __TBB_EXPORTED_METHOD detach ()
 When detach() returns, *this no longer represents the possibly continuing thread of execution.
 
-id get_id () const __TBB_NOEXCEPT(true)
 
-native_handle_type native_handle ()
 
- - - - -

-Static Public Member Functions

static unsigned __TBB_EXPORTED_FUNC hardware_concurrency () __TBB_NOEXCEPT(true)
 The number of hardware thread contexts. More...
 
- - - -

-Public Attributes

-tbb_thread_v3(tbb_thread_v3
-&&x) __TBB_NOEXCEPT(true)
-tbb_thread_v3
operator= (tbb_thread_v3 &&x) __TBB_NOEXCEPT(true)
 
- - - - - + + + + + + + + + + + + + + + + +

-Friends

-void __TBB_EXPORTED_FUNC move_v3 (tbb_thread_v3 &t1, tbb_thread_v3 &t2)
 
-void tbb::swap (tbb_thread_v3 &t1, tbb_thread_v3 &t2) __TBB_NOEXCEPT(true)
 
virtual tbb_exceptionmove ()=0 throw ()
 Creates and returns pointer to the deep copy of this exception object. More...
 
virtual void destroy ()=0 throw ()
 Destroys objects created by the move() method. More...
 
virtual void throw_self ()=0
 Throws this exception object. More...
 
+virtual const char * name () const =0 throw ()
 Returns RTTI name of the originally intercepted exception.
 
+virtual const char * what () const =0 throw ()
 Returns the result of originally intercepted exception's what() method.
 
void operator delete (void *p)
 

Detailed Description

-

Versioned thread class.

+

Interface to be implemented by all exceptions TBB recognizes and propagates across the threads.

+

If an unhandled exception of the type derived from tbb::tbb_exception is intercepted by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in the root thread. The root thread is the thread that has started the outermost algorithm or root task sharing the same task_group_context with the guilty algorithm/task (the one that threw the exception first).

+

Note: when documentation mentions workers with respect to exception handling, masters are implied as well, because they are completely equivalent in this context. Consequently a root thread can be master or worker thread.

+

NOTE: In case of nested algorithms or complex task hierarchies when the nested levels share (explicitly or by means of implicit inheritance) the task group context of the outermost level, the exception may be (re-)thrown multiple times (ultimately - in each worker on each nesting level) before reaching the root thread at the outermost level. IMPORTANT: if you intercept an exception derived from this class on a nested level, you must re-throw it in the catch block by means of the "throw;" operator.

+

TBB provides two implementations of this interface: tbb::captured_exception and template class tbb::movable_exception. See their declarations for more info.

Member Function Documentation

- +
+ +

Destroys objects created by the move() method.

+

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

+ +

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + +
virtual tbb_exception* tbb::tbb_exception::move ()
throw (
)
+
+pure virtual
+
+ +

Creates and returns pointer to the deep copy of this exception object.

+

Move semantics is allowed.

+ +

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void tbb::tbb_exception::operator delete (void * p)
+
+inline
+
+

Operator delete is provided only to allow using existing smart pointers with TBB exception objects obtained as the result of applying move() operation on an exception thrown out of TBB scheduler.

+

When overriding method move() make sure to override operator delete as well if memory is allocated not by TBB's scalable allocator.

+ +
+
+ +
+
+ + +

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00200.png b/doc/html/a00200.png index aa52099a9d5bbc6b96933a805511a865e9ce5c50..ca33e7fe184cb31e2bdd96f46b569d3fabe4e756 100644 Binary files a/doc/html/a00200.png and b/doc/html/a00200.png differ diff --git a/doc/html/a00201.html b/doc/html/a00201.html index 84a6e0d0e52fe5d8dd2a2464c01f6625340fc033..0de13ba7e522ac583ecd0cecd1c4723998da31bd 100644 --- a/doc/html/a00201.html +++ b/doc/html/a00201.html @@ -4,7 +4,7 @@ -tbb::internal::thread_closure_base Struct Reference +tbb::internal::thread_closure_1< F, X > Struct Template Reference @@ -33,45 +33,75 @@
-
tbb::internal::thread_closure_base Struct Reference
+
tbb::internal::thread_closure_1< F, X > Struct Template Reference
+ +

Structure used to pass user function with 1 argument to thread. + More...

+ +

#include <tbb_thread.h>

-Inheritance diagram for tbb::internal::thread_closure_base:
+Inheritance diagram for tbb::internal::thread_closure_1< F, X >:
- - -tbb::internal::thread_closure_0< F > -tbb::internal::thread_closure_1< F, X > -tbb::internal::thread_closure_2< F, X, Y > + + +tbb::internal::thread_closure_base
+ + + @@ -159,24 +199,25 @@ void  +pure virtual
virtual void tbb::tbb_exception::throw_self ( ) tbb::swap ( -static
-

The number of hardware thread contexts.

-

Before TBB 3.0 U4 this methods returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask.

-

NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool.

+

Throws this exception object.

+

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

+ +

Implemented in tbb::movable_exception< ExceptionData >, and tbb::captured_exception.


The documentation for this class was generated from the following file:
    -
  • tbb_thread.h
  • +
  • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00194.png b/doc/html/a00196.png similarity index 100% rename from doc/html/a00194.png rename to doc/html/a00196.png diff --git a/doc/html/a00197.html b/doc/html/a00197.html index 88d70c5e7fec389576e0846d303cd54301e2d06e..0312cddbe64d7864be4ad86c707a6f76c75941c6 100644 --- a/doc/html/a00197.html +++ b/doc/html/a00197.html @@ -4,7 +4,7 @@ -tbb::thread_bound_filter Class Reference +tbb::internal::tbb_exception_ptr Class Reference @@ -33,125 +33,82 @@
-
tbb::thread_bound_filter Class Reference
+
tbb::internal::tbb_exception_ptr Class Reference
-

A stage in a pipeline served by a user thread. +

Exception container that preserves the exact copy of the original exception. More...

-

#include <pipeline.h>

-
-Inheritance diagram for tbb::thread_bound_filter:
-
-
- - -tbb::filter - -
+

#include <tbb_exception.h>

- - - -

-Public Types

enum  result_type { success, -item_not_available, -end_of_stream - }
 
- - - - - - -

Public Member Functions

result_type __TBB_EXPORTED_METHOD try_process_item ()
 If a data item is available, invoke operator() on that item. More...
 
result_type __TBB_EXPORTED_METHOD process_item ()
 Wait until a data item becomes available, and invoke operator() on that item. More...
 
- - - + + + + + +

-Protected Member Functions

thread_bound_filter (mode filter_mode)
 
void destroy () throw ()
 Destroys this objects. More...
 
+void throw_self ()
 Throws the contained exception .
 
- - - - - - - - - - - - - - - - - + + + + + + + +

-Additional Inherited Members

- Static Protected Attributes inherited from tbb::filter
-static const unsigned char filter_is_serial = 0x1
 The lowest bit 0 is for parallel vs. serial.
 
static const unsigned char filter_is_out_of_order = 0x1<<4
 4th bit distinguishes ordered vs unordered filters. More...
 
-static const unsigned char filter_is_bound = 0x1<<5
 5th bit distinguishes thread-bound and regular filters.
 
-static const unsigned char filter_may_emit_null = 0x1<<6
 6th bit marks input filters emitting small objects
 
static const unsigned char exact_exception_propagation
 7th bit defines exception propagation mode expected by the application. More...
 

+Static Public Member Functions

+static tbb_exception_ptrallocate ()
 
+static tbb_exception_ptrallocate (const tbb_exception &tag)
 
+static tbb_exception_ptrallocate (captured_exception &src)
 This overload uses move semantics (i.e. it empties src)
 

Detailed Description

-

A stage in a pipeline served by a user thread.

+

Exception container that preserves the exact copy of the original exception.

+

This class can be used only when the appropriate runtime support (mandated by C++0x) is present

Member Function Documentation

- +
- + -
result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::process_item void tbb::internal::tbb_exception_ptr::destroy ( )
-
- -

Wait until a data item becomes available, and invoke operator() on that item.

-

This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies.

- -
-
- -
-
- - - - - + + + +
result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::try_process_item ()throw (
)
-

If a data item is available, invoke operator() on that item.

-

This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process.

+

Destroys this objects.

+

Note that objects of this type can be created only by the allocate() method.


The documentation for this class was generated from the following file:
    -
  • pipeline.h
  • +
  • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00197.png b/doc/html/a00197.png deleted file mode 100644 index 7eab1d5112ca5b7d7067137bdd3c71a2d17e0a60..0000000000000000000000000000000000000000 Binary files a/doc/html/a00197.png and /dev/null differ diff --git a/doc/html/a00198.html b/doc/html/a00198.html index 1e739519a95e47504af0456d1f890129a38b1017..bbf06aeb0fac913f015d152f487d3f80b88c2587 100644 --- a/doc/html/a00198.html +++ b/doc/html/a00198.html @@ -4,7 +4,7 @@ -tbb::internal::thread_closure_0< F > Struct Template Reference +tbb::internal::tbb_thread_v3 Class Reference @@ -33,61 +33,150 @@
-
tbb::internal::thread_closure_0< F > Struct Template Reference
+
tbb::internal::tbb_thread_v3 Class Reference
-
-Inheritance diagram for tbb::internal::thread_closure_0< F >:
-
-
- - -tbb::internal::thread_closure_base - -
+ +

Versioned thread class. + More...

+ +

#include <tbb_thread.h>

+ + + +

+Classes

class  id
 
+ + + + + +

+Public Types

+typedef HANDLE native_handle_type
 
+typedef pthread_t native_handle_type
 
- - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

thread_closure_0 (const F &f)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
-void * operator new (size_t size)
 
-void operator delete (void *ptr)
 
tbb_thread_v3 (const tbb_thread_v3 &)
 
tbb_thread_v3 () __TBB_NOEXCEPT(true)
 Constructs a thread object that does not represent a thread of execution.
 
+template<class F >
 tbb_thread_v3 (F f)
 Constructs an object and executes f() in a new thread.
 
+template<class F , class X >
 tbb_thread_v3 (F f, X x)
 Constructs an object and executes f(x) in a new thread.
 
+template<class F , class X , class Y >
 tbb_thread_v3 (F f, X x, Y y)
 Constructs an object and executes f(x,y) in a new thread.
 
+tbb_thread_v3operator= (tbb_thread_v3 &x)
 
+void swap (tbb_thread_v3 &t) __TBB_NOEXCEPT(true)
 
+bool joinable () const __TBB_NOEXCEPT(true)
 
+void __TBB_EXPORTED_METHOD join ()
 The completion of the thread represented by *this happens before join() returns.
 
+void __TBB_EXPORTED_METHOD detach ()
 When detach() returns, *this no longer represents the possibly continuing thread of execution.
 
+id get_id () const __TBB_NOEXCEPT(true)
 
+native_handle_type native_handle ()
 
- - + + +

Static Public Member Functions

-static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 
static unsigned __TBB_EXPORTED_FUNC hardware_concurrency () __TBB_NOEXCEPT(true)
 The number of hardware thread contexts. More...
 
- - + + +

Public Attributes

-F function
 
+tbb_thread_v3(tbb_thread_v3
+&&x) __TBB_NOEXCEPT(true)
+tbb_thread_v3
operator= (tbb_thread_v3 &&x) __TBB_NOEXCEPT(true)
 
+ + + + +

+Friends

+void __TBB_EXPORTED_FUNC move_v3 (tbb_thread_v3 &t1, tbb_thread_v3 &t2)
 
+void tbb::swap (tbb_thread_v3 &t1, tbb_thread_v3 &t2) __TBB_NOEXCEPT(true)
 
-
The documentation for this struct was generated from the following file:
    +

    Detailed Description

    +

    Versioned thread class.

    +

    Member Function Documentation

    + +
    +
    + + + + + +
    + + + + + + + +
    static unsigned __TBB_EXPORTED_FUNC tbb::internal::tbb_thread_v3::hardware_concurrency ()
    +
    +static
    +
    + +

    The number of hardware thread contexts.

    +

    Before TBB 3.0 U4 this methods returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask.

    +

    NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool.

    + +
    +
    +
    The documentation for this class was generated from the following file:
    • tbb_thread.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00198.png b/doc/html/a00198.png deleted file mode 100644 index ca33e7fe184cb31e2bdd96f46b569d3fabe4e756..0000000000000000000000000000000000000000 Binary files a/doc/html/a00198.png and /dev/null differ diff --git a/doc/html/a00199.html b/doc/html/a00199.html index 835424dabfaf4e13d8f3467833d2745b43fa8442..32c3e6af78620687b1976f09ed7ca2cc2c3654a9 100644 --- a/doc/html/a00199.html +++ b/doc/html/a00199.html @@ -4,7 +4,7 @@ -tbb::internal::thread_closure_1< F, X > Struct Template Reference +tbb::thread_bound_filter Class Reference @@ -33,75 +33,125 @@
-
tbb::internal::thread_closure_1< F, X > Struct Template Reference
+
tbb::thread_bound_filter Class Reference
-

Structure used to pass user function with 1 argument to thread. +

A stage in a pipeline served by a user thread. More...

-

#include <tbb_thread.h>

+

#include <pipeline.h>

-Inheritance diagram for tbb::internal::thread_closure_1< F, X >:
+Inheritance diagram for tbb::thread_bound_filter:
- - -tbb::internal::thread_closure_base + + +tbb::filter
+ + + +

+Public Types

enum  result_type { success, +item_not_available, +end_of_stream + }
 
- - - - - - - + + + + + +

Public Member Functions

thread_closure_1 (const F &f, const X &x)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
-void * operator new (size_t size)
 
-void operator delete (void *ptr)
 
result_type __TBB_EXPORTED_METHOD try_process_item ()
 If a data item is available, invoke operator() on that item. More...
 
result_type __TBB_EXPORTED_METHOD process_item ()
 Wait until a data item becomes available, and invoke operator() on that item. More...
 
- - - - + + +

-Static Public Member Functions

-static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll.
 

+Protected Member Functions

thread_bound_filter (mode filter_mode)
 
- - - - - + + + + + + + + + + + + + + + + +

-Public Attributes

-F function
 
-X arg1
 

+Additional Inherited Members

- Static Protected Attributes inherited from tbb::filter
+static const unsigned char filter_is_serial = 0x1
 The lowest bit 0 is for parallel vs. serial.
 
static const unsigned char filter_is_out_of_order = 0x1<<4
 4th bit distinguishes ordered vs unordered filters. More...
 
+static const unsigned char filter_is_bound = 0x1<<5
 5th bit distinguishes thread-bound and regular filters.
 
+static const unsigned char filter_may_emit_null = 0x1<<6
 6th bit marks input filters emitting small objects
 
static const unsigned char exact_exception_propagation
 7th bit defines exception propagation mode expected by the application. More...
 

Detailed Description

-

template<class F, class X>
-struct tbb::internal::thread_closure_1< F, X >

+

A stage in a pipeline served by a user thread.

+

Member Function Documentation

+ +
+
+ + + + + + + +
result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::process_item ()
+
+ +

Wait until a data item becomes available, and invoke operator() on that item.

+

This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies.

+ +
+
+ +
+
+ + + + + + + +
result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::try_process_item ()
+
+ +

If a data item is available, invoke operator() on that item.

+

This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process.

-

Structure used to pass user function with 1 argument to thread.

-

The documentation for this struct was generated from the following file:
    -
  • tbb_thread.h
  • +
+
+
The documentation for this class was generated from the following file:
    +
  • pipeline.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00199.png b/doc/html/a00199.png index 961925b53400cd0df57f3333002868179b5c8a9f..7eab1d5112ca5b7d7067137bdd3c71a2d17e0a60 100644 Binary files a/doc/html/a00199.png and b/doc/html/a00199.png differ diff --git a/doc/html/a00200.html b/doc/html/a00200.html index 1882a166ed811fdcd9a3db4ead16dc86948c2de5..d9ea58690607e670a2c029eb0206f342dabded2c 100644 --- a/doc/html/a00200.html +++ b/doc/html/a00200.html @@ -4,7 +4,7 @@ -tbb::internal::thread_closure_2< F, X, Y > Struct Template Reference +tbb::internal::thread_closure_0< F > Struct Template Reference @@ -33,7 +33,7 @@ +List of all members
-
tbb::internal::thread_closure_2< F, X, Y > Struct Template Reference
+
tbb::internal::thread_closure_0< F > Struct Template Reference
-Inheritance diagram for tbb::internal::thread_closure_2< F, X, Y >:
+Inheritance diagram for tbb::internal::thread_closure_0< F >:
- - -tbb::internal::thread_closure_base + + +tbb::internal::thread_closure_base
- - - - + + + - - + - +

Public Member Functions

thread_closure_2 (const F &f, const X &x, const Y &y)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
+
thread_closure_0 (const F &f)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
void * operator new (size_t size)
 
+
 
void operator delete (void *ptr)
 
 
- - - + +

Static Public Member Functions

-static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll.
 
+static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 
- - - - - - +

Public Attributes

+
function
 
-X arg1
 
-Y arg2
 
 

The documentation for this struct was generated from the following file:
  • tbb_thread.h
  • @@ -94,7 +87,7 @@ Y 
arg2
- + + + - - + - + +

Public Member Functions

+
thread_closure_1 (const F &f, const X &x)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
void * operator new (size_t size)
 
+
 
void operator delete (void *ptr)
 
 
+ + + + +

+Static Public Member Functions

+static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll.
 
+ + + + +

+Public Attributes

+F function
 
+X arg1
 
-
The documentation for this struct was generated from the following file:
    +

    Detailed Description

    +

    template<class F, class X>
    +struct tbb::internal::thread_closure_1< F, X >

    + +

    Structure used to pass user function with 1 argument to thread.

    +

    The documentation for this struct was generated from the following file:
    • tbb_thread.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00201.png b/doc/html/a00201.png index 0324577e724e80dc1c635675c7fc1bf9494f27bb..961925b53400cd0df57f3333002868179b5c8a9f 100644 Binary files a/doc/html/a00201.png and b/doc/html/a00201.png differ diff --git a/doc/html/a00202.html b/doc/html/a00202.html index c0d657ae765ba67a12e76dda3f72b3fa6fd33286..6d91058eb50106c7f7284bb2fd8fa9cfabcee64e 100644 --- a/doc/html/a00202.html +++ b/doc/html/a00202.html @@ -4,7 +4,7 @@ -tbb::tick_count Class Reference +tbb::internal::thread_closure_2< F, X, Y > Struct Template Reference @@ -33,66 +33,68 @@
-
tbb::tick_count Class Reference
+
tbb::internal::thread_closure_2< F, X, Y > Struct Template Reference
- -

Absolute timestamp. - More...

- -

#include <tick_count.h>

+
+Inheritance diagram for tbb::internal::thread_closure_2< F, X, Y >:
+
+
+ + +tbb::internal::thread_closure_base + +
- - - - -

-Classes

class  interval_t
 Relative time interval. More...
 
- - - + + + + + + +

Public Member Functions

tick_count ()
 Construct an absolute timestamp initialized to zero.
 
thread_closure_2 (const F &f, const X &x, const Y &y)
 
- Public Member Functions inherited from tbb::internal::thread_closure_base
+void * operator new (size_t size)
 
+void operator delete (void *ptr)
 
- - - - - - + + +

Static Public Member Functions

-static tick_count now ()
 Return current time.
 
-static double resolution ()
 Return the resolution of the clock in seconds per tick.
 
+static __TBB_NATIVE_THREAD_ROUTINE start_routine (void *c)
 Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll.
 
- - - - + + + + + + +

-Friends

-interval_t operator- (const tick_count &t1, const tick_count &t0)
 Subtract two timestamps to get the time interval between.
 

+Public Attributes

+F function
 
+X arg1
 
+Y arg2
 
-

Detailed Description

-

Absolute timestamp.

-

The documentation for this class was generated from the following file:
    -
  • tick_count.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • tbb_thread.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00202.png b/doc/html/a00202.png new file mode 100644 index 0000000000000000000000000000000000000000..aa52099a9d5bbc6b96933a805511a865e9ce5c50 Binary files /dev/null and b/doc/html/a00202.png differ diff --git a/doc/html/a00203.html b/doc/html/a00203.html index bee08d8bba026ffd055cc6efb53d0a2ee1240404..347ac2f102ac0335ecfe02aff976b6f7fafa998f 100644 --- a/doc/html/a00203.html +++ b/doc/html/a00203.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor Struct Reference +tbb::internal::thread_closure_base Struct Reference @@ -33,56 +33,45 @@
-
tbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor Struct Reference
+
tbb::internal::thread_closure_base Struct Reference
+
+Inheritance diagram for tbb::internal::thread_closure_base:
+
+
+ + +tbb::internal::thread_closure_0< F > +tbb::internal::thread_closure_1< F, X > +tbb::internal::thread_closure_2< F, X, Y > + +
- - - -

-Public Types

-typedef
-internal::multifunction_output
-< Output > 
output_port_type
 
- - - - -

Public Member Functions

try_put_functor (output_port_type &p, const Output &v)
 
-void operator() ()
 
- - - - - - - + + + +

-Public Attributes

-output_port_type * port
 
-const Output * value
 
-bool result
 
+void * operator new (size_t size)
 
+void operator delete (void *ptr)
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00203.png b/doc/html/a00203.png new file mode 100644 index 0000000000000000000000000000000000000000..0324577e724e80dc1c635675c7fc1bf9494f27bb Binary files /dev/null and b/doc/html/a00203.png differ diff --git a/doc/html/a00204.html b/doc/html/a00204.html index 78601c2cc26ecacffbb977eb59a140cf049899f2..3ff38252c1679979d9773e630c543264023bdec7 100644 --- a/doc/html/a00204.html +++ b/doc/html/a00204.html @@ -4,7 +4,7 @@ -tbb::interface5::internal::use_element_copy_constructor< T, C > Struct Template Reference +tbb::tick_count Class Reference @@ -33,34 +33,66 @@
-
tbb::interface5::internal::use_element_copy_constructor< T, C > Struct Template Reference
+
tbb::tick_count Class Reference
+ +

Absolute timestamp. + More...

+ +

#include <tick_count.h>

- - - - - + + + + +

-Public Types

-typedef tbb::internal::true_type type
 
-typedef tbb::internal::true_type type
 

+Classes

class  interval_t
 Relative time interval. More...
 
+ + + + +

+Public Member Functions

tick_count ()
 Construct an absolute timestamp initialized to zero.
 
+ + + + + + + +

+Static Public Member Functions

+static tick_count now ()
 Return current time.
 
+static double resolution ()
 Return the resolution of the clock in seconds per tick.
 
+ + + +

+Friends

+interval_t operator- (const tick_count &t1, const tick_count &t0)
 Subtract two timestamps to get the time interval between.
 
-
The documentation for this struct was generated from the following file:
    -
  • concurrent_priority_queue.h
  • +

    Detailed Description

    +

    Absolute timestamp.

    +

    The documentation for this class was generated from the following file:
      +
    • tick_count.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00205.html b/doc/html/a00205.html index 00d3f894f0e89f10143643bae2066bd4f51fcf46..fa6adf7512ac44fc74ad20efca3d770d27508173 100644 --- a/doc/html/a00205.html +++ b/doc/html/a00205.html @@ -4,7 +4,7 @@ -tbb::interface5::internal::use_element_copy_constructor< T, false > Struct Template Reference +tbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor Struct Reference @@ -33,31 +33,56 @@
-
tbb::interface5::internal::use_element_copy_constructor< T, false > Struct Template Reference
+
tbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor Struct Reference
- - + + +

Public Types

-typedef tbb::internal::false_type type
 
+typedef
+internal::multifunction_output
+< Output > 
output_port_type
 
+ + + + + +

+Public Member Functions

try_put_functor (output_port_type &p, const Output &v)
 
+void operator() ()
 
+ + + + + + +

+Public Attributes

+output_port_type * port
 
+const Output * value
 
+bool result
 

The documentation for this struct was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00206.html b/doc/html/a00206.html index 543d16b11140b8fa962ad7857c1b422ce6fbdd96..43179ef75b498092b01a24dba5ea6667e437daf5 100644 --- a/doc/html/a00206.html +++ b/doc/html/a00206.html @@ -4,7 +4,7 @@ -tbb::user_abort Class Reference +tbb::interface5::internal::use_element_copy_constructor< T, C > Struct Template Reference @@ -33,46 +33,34 @@
-
tbb::user_abort Class Reference
+
tbb::interface5::internal::use_element_copy_constructor< T, C > Struct Template Reference
- -

Exception for user-initiated abort. - More...

- -

#include <tbb_exception.h>

-
-Inheritance diagram for tbb::user_abort:
-
-
- - - -
- - - + + + + +

-Public Member Functions

-const char * what () const throw ()
 

+Public Types

+typedef tbb::internal::true_type type
 
+typedef tbb::internal::true_type type
 
-

Detailed Description

-

Exception for user-initiated abort.

-

The documentation for this class was generated from the following file:
    -
  • tbb_exception.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • concurrent_priority_queue.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00207.html b/doc/html/a00207.html index e77c21fc0b8bc8d09053c69b8acdb3bb5731bedd..0af44b3451039564133c4379c58b4fb9537d1e4b 100644 --- a/doc/html/a00207.html +++ b/doc/html/a00207.html @@ -4,7 +4,7 @@ -tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare Class Reference +tbb::interface5::internal::use_element_copy_constructor< T, false > Struct Template Reference @@ -33,56 +33,31 @@
-
tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare Class Reference
+
tbb::interface5::internal::use_element_copy_constructor< T, false > Struct Template Reference
-
-Inheritance diagram for tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare:
-
-
- - - -
- - - - - -

-Public Member Functions

-bool operator() (const value_type &left, const value_type &right) const
 
value_compare (const hash_compare &comparator)
 
- - - -

-Protected Attributes

-hash_compare my_hash_compare
 
- - - + + +

-Friends

-class concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >
 

+Public Types

+typedef tbb::internal::false_type type
 
-
The documentation for this class was generated from the following file:
    -
  • concurrent_unordered_map.h
  • +
    The documentation for this struct was generated from the following file:
      +
    • concurrent_priority_queue.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00207.png b/doc/html/a00207.png deleted file mode 100644 index d6754637d9f9a87cfc2318a7afd6a9ed9d4d9816..0000000000000000000000000000000000000000 Binary files a/doc/html/a00207.png and /dev/null differ diff --git a/doc/html/a00208.html b/doc/html/a00208.html index 550e488e8a24f33fdc98dcd6d34feb8eddc9d2d7..c4a29084d72654551c0cfce1652c44a62ba88004 100644 --- a/doc/html/a00208.html +++ b/doc/html/a00208.html @@ -4,7 +4,7 @@ -tbb::vector_iterator< Container, Value > Class Template Reference +tbb::user_abort Class Reference @@ -33,21 +33,46 @@
+
-
tbb::vector_iterator< Container, Value > Class Template Reference
+
tbb::user_abort Class Reference
-
The documentation for this class was generated from the following file:
    -
  • concurrent_vector.h
  • + +

    Exception for user-initiated abort. + More...

    + +

    #include <tbb_exception.h>

    +
    +Inheritance diagram for tbb::user_abort:
    +
    +
    + + + +
    + + + + +

    +Public Member Functions

    +const char * what () const throw ()
     
    +

    Detailed Description

    +

    Exception for user-initiated abort.

    +

    The documentation for this class was generated from the following file:
      +
    • tbb_exception.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00206.png b/doc/html/a00208.png similarity index 100% rename from doc/html/a00206.png rename to doc/html/a00208.png diff --git a/doc/html/a00209.html b/doc/html/a00209.html index 46736233e637d323e0c20dcd333def6d134f923b..9dffd3dfaf4b99ab37f12eb012b6adc877885804 100644 --- a/doc/html/a00209.html +++ b/doc/html/a00209.html @@ -4,7 +4,7 @@ -tbb::flow::interface8::write_once_node< T > Class Template Reference +tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare Class Reference @@ -33,283 +33,56 @@
-
tbb::flow::interface8::write_once_node< T > Class Template Reference
+
tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare Class Reference
-Inheritance diagram for tbb::flow::interface8::write_once_node< T >:
+Inheritance diagram for tbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >::value_compare:
- - -tbb::flow::interface8::overwrite_node< T > -tbb::flow::interface8::graph_node -tbb::flow::interface8::receiver< T > -tbb::flow::interface8::sender< T > + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Types

-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::overwrite_node< T >
-typedef T input_type
 
-typedef T output_type
 
-typedef sender< input_typepredecessor_type
 
-typedef receiver< output_typesuccessor_type
 
-typedef receiver< input_type >
-::built_predecessors_type 
built_predecessors_type
 
-typedef sender< output_type >
-::built_successors_type 
built_successors_type
 
-typedef receiver< input_type >
-::predecessor_list_type 
predecessor_list_type
 
-typedef sender< output_type >
-::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
-typedef T input_type
 The input type of this receiver.
 
-typedef sender< T > predecessor_type
 The predecessor type for this node.
 
-typedef
-internal::edge_container
-< predecessor_type
built_predecessors_type
 
-typedef
-built_predecessors_type::edge_list_type 
predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
-typedef T output_type
 The output type of this sender.
 
-typedef receiver< T > successor_type
 The successor type for this node.
 
-typedef
-internal::edge_container
-< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
-typedef
-built_successors_type::edge_list_type 
successor_list_type
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +

Public Member Functions

write_once_node (graph &g)
 Constructor.
 
write_once_node (const write_once_node &src)
 Copy constructor: call base class copy constructor.
 
-void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::overwrite_node< T >
overwrite_node (graph &g)
 
overwrite_node (const overwrite_node &src)
 
-bool register_successor (successor_type &s)
 Add a new successor to this node.
 
-bool remove_successor (successor_type &s)
 Removes a successor from this node.
 
-built_predecessors_typebuilt_predecessors ()
 
-built_successors_typebuilt_successors ()
 
-void internal_add_built_successor (successor_type &s)
 
-void internal_delete_built_successor (successor_type &s)
 
-size_t successor_count ()
 
-void copy_successors (successor_list_type &v)
 
-void internal_add_built_predecessor (predecessor_type &p)
 
-void internal_delete_built_predecessor (predecessor_type &p)
 
-size_t predecessor_count ()
 
-void copy_predecessors (predecessor_list_type &v)
 
-void extract ()
 
-bool try_get (input_type &v)
 Request an item from the sender.
 
-bool is_valid ()
 
-void clear ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual ~receiver ()
 Destructor.
 
-bool try_put (const T &t)
 Put an item to the receiver.
 
-virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
-virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
-virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
-virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
-virtual bool try_release ()
 Releases the reserved item.
 
-virtual bool try_consume ()
 Consumes the reserved item.
 
+bool operator() (const value_type &left, const value_type &right) const
 
value_compare (const hash_compare &comparator)
 
- - - - - - - - - - - + + +

-Protected Member Functions

-task * try_put_task (const T &v)
 
- Protected Member Functions inherited from tbb::flow::interface8::overwrite_node< T >
-void reset_receiver (reset_flags)
 
-void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
-virtual bool is_continue_receiver ()
 

+Protected Attributes

+hash_compare my_hash_compare
 
- - - - - - - - - -

Friends

-template<typename R , typename B >
class run_and_put_task
 
-template<typename X , typename Y >
class internal::broadcast_cache
 
-template<typename X , typename Y >
class internal::round_robin_cache
 
- - - - - - - - - - - - + +

-Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::overwrite_node< T >
-spin_mutex my_mutex
 
-internal::broadcast_cache
-< input_type, null_rw_mutex
my_successors
 
-internal::edge_container
-< predecessor_type
my_built_predecessors
 
-input_type my_buffer
 
-bool my_buffer_is_valid
 
+class concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >
 

The documentation for this class was generated from the following file:

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00209.png b/doc/html/a00209.png index 6919a098dfb96a008fc3a9a5c549365e9ad3a262..d6754637d9f9a87cfc2318a7afd6a9ed9d4d9816 100644 Binary files a/doc/html/a00209.png and b/doc/html/a00209.png differ diff --git a/doc/html/a00210.html b/doc/html/a00210.html index 6d0bc55223ff54e6d728fb4d9865625dafc575da..b532253862745cedc36f2aa12a951d75fcefa1e9 100644 --- a/doc/html/a00210.html +++ b/doc/html/a00210.html @@ -4,7 +4,7 @@ -tbb::zero_allocator< T, Allocator > Class Template Reference +tbb::vector_iterator< Container, Value > Class Template Reference @@ -33,98 +33,21 @@
-
-
tbb::zero_allocator< T, Allocator > Class Template Reference
+
tbb::vector_iterator< Container, Value > Class Template Reference
- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5. - More...

- -

#include <tbb_allocator.h>

-
-Inheritance diagram for tbb::zero_allocator< T, Allocator >:
-
-
- - - -
- - - - -

-Classes

struct  rebind
 
- - - - - - - - - - - - - - - - - -

-Public Types

-typedef Allocator< T > base_allocator_type
 
-typedef
-base_allocator_type::value_type 
value_type
 
-typedef
-base_allocator_type::pointer 
pointer
 
-typedef
-base_allocator_type::const_pointer 
const_pointer
 
-typedef
-base_allocator_type::reference 
reference
 
-typedef
-base_allocator_type::const_reference 
const_reference
 
-typedef
-base_allocator_type::size_type 
size_type
 
-typedef
-base_allocator_type::difference_type 
difference_type
 
- - - - - - - - -

-Public Member Functions

zero_allocator (const zero_allocator &a) throw ()
 
-template<typename U >
 zero_allocator (const zero_allocator< U > &a) throw ()
 
-pointer allocate (const size_type n, const void *hint=0)
 
-

Detailed Description

-

template<typename T, template< typename X > class Allocator = tbb_allocator>
-class tbb::zero_allocator< T, Allocator >

- -

Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.

-

The class is an adapter over an actual allocator that fills the allocation using memset function with template argument C as the value. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard.

-

The documentation for this class was generated from the following file:
    -
  • tbb_allocator.h
  • +
    The documentation for this class was generated from the following file:
      +
    • concurrent_vector.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/a00211.html b/doc/html/a00211.html index 81a821e2f0b276bf53956b814e93e676dd9b400c..23acfdd9c2eab3dee45d6a3eabdb0b780db3ee13 100644 --- a/doc/html/a00211.html +++ b/doc/html/a00211.html @@ -4,7 +4,7 @@ -tbb::zero_allocator< void, Allocator > Class Template Reference +tbb::flow::interface8::write_once_node< T > Class Template Reference @@ -33,67 +33,283 @@
-
tbb::zero_allocator< void, Allocator > Class Template Reference
+
tbb::flow::interface8::write_once_node< T > Class Template Reference
- -

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1. - More...

- -

#include <tbb_allocator.h>

-Inheritance diagram for tbb::zero_allocator< void, Allocator >:
+Inheritance diagram for tbb::flow::interface8::write_once_node< T >:
- - + + +tbb::flow::interface8::overwrite_node< T > +tbb::flow::interface8::graph_node +tbb::flow::interface8::receiver< T > +tbb::flow::interface8::sender< T >
- - - -

-Classes

struct  rebind
 
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + - - + + + - +built_successors_type::edge_list_type  + +

Public Types

-typedef Allocator< void > base_allocator_type
 
+
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
- Public Types inherited from tbb::flow::interface8::overwrite_node< T >
+typedef T input_type
 
+typedef T output_type
 
+typedef sender< input_typepredecessor_type
 
+typedef receiver< output_typesuccessor_type
 
+typedef receiver< input_type >
+::built_predecessors_type 
built_predecessors_type
 
+typedef sender< output_type >
+::built_successors_type 
built_successors_type
 
+typedef receiver< input_type >
+::predecessor_list_type 
predecessor_list_type
 
+typedef sender< output_type >
+::successor_list_type 
successor_list_type
 
- Public Types inherited from tbb::flow::interface8::receiver< T >
+typedef T input_type
 The input type of this receiver.
 
+typedef sender< T > predecessor_type
 The predecessor type for this node.
 
+typedef
+internal::edge_container
+< predecessor_type
built_predecessors_type
 
typedef
-base_allocator_type::value_type 
value_type
 
+built_predecessors_type::edge_list_type predecessor_list_type
 
- Public Types inherited from tbb::flow::interface8::sender< T >
+typedef T output_type
 The output type of this sender.
 
+typedef receiver< T > successor_type
 The successor type for this node.
 
typedef
-base_allocator_type::pointer 
pointer
 
+internal::edge_container
+< successor_type
built_successors_type
 interface to record edges for traversal & deletion
 
typedef
-base_allocator_type::const_pointer 
const_pointer
 
successor_list_type
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

write_once_node (graph &g)
 Constructor.
 
write_once_node (const write_once_node &src)
 Copy constructor: call base class copy constructor.
 
+void set_name (const char *name)
 
- Public Member Functions inherited from tbb::flow::interface8::overwrite_node< T >
overwrite_node (graph &g)
 
overwrite_node (const overwrite_node &src)
 
+bool register_successor (successor_type &s)
 Add a new successor to this node.
 
+bool remove_successor (successor_type &s)
 Removes a successor from this node.
 
+built_predecessors_typebuilt_predecessors ()
 
+built_successors_typebuilt_successors ()
 
+void internal_add_built_successor (successor_type &s)
 
+void internal_delete_built_successor (successor_type &s)
 
+size_t successor_count ()
 
+void copy_successors (successor_list_type &v)
 
+void internal_add_built_predecessor (predecessor_type &p)
 
+void internal_delete_built_predecessor (predecessor_type &p)
 
+size_t predecessor_count ()
 
+void copy_predecessors (predecessor_list_type &v)
 
+void extract ()
 
+bool try_get (input_type &v)
 Request an item from the sender.
 
+bool is_valid ()
 
+void clear ()
 
- Public Member Functions inherited from tbb::flow::interface8::graph_node
graph_node (graph &g)
 
- Public Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual ~receiver ()
 Destructor.
 
+bool try_put (const T &t)
 Put an item to the receiver.
 
+virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node.
 
+virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node.
 
+virtual void copy_predecessors (predecessor_list_type &)=0
 
- Public Member Functions inherited from tbb::flow::interface8::sender< T >
+virtual bool try_reserve (T &)
 Reserves an item in the sender.
 
+virtual bool try_release ()
 Releases the reserved item.
 
+virtual bool try_consume ()
 Consumes the reserved item.
 
+ + + + + + + + + + + +

+Protected Member Functions

+task * try_put_task (const T &v)
 
- Protected Member Functions inherited from tbb::flow::interface8::overwrite_node< T >
+void reset_receiver (reset_flags)
 
+void reset_node (reset_flags f)
 
- Protected Member Functions inherited from tbb::flow::interface8::receiver< T >
+virtual bool is_continue_receiver ()
 
+ + + + + + + + + + +

+Friends

+template<typename R , typename B >
class run_and_put_task
 
+template<typename X , typename Y >
class internal::broadcast_cache
 
+template<typename X , typename Y >
class internal::round_robin_cache
 
+ + + + + + + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface8::overwrite_node< T >
+spin_mutex my_mutex
 
+internal::broadcast_cache
+< input_type, null_rw_mutex
my_successors
 
+internal::edge_container
+< predecessor_type
my_built_predecessors
 
+input_type my_buffer
 
+bool my_buffer_is_valid
 
-

Detailed Description

-

template<template< typename T > class Allocator>
-class tbb::zero_allocator< void, Allocator >

- -

Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1.

-

The documentation for this class was generated from the following file:
- - - + + +
o*flow_graph.hThe graph related classes and functions
o*memory_pool.h
\*scalable_allocator.h
o*flow_graph.hThe graph related classes and functions
o*memory_pool.h
\*scalable_allocator.h

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/functions.html b/doc/html/functions.html index 3d9ae901d3aff3d8d5fafa54ff27b413f35ea435..08281f8808b6d028ae2c07202ecd238c7a9dc030 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -75,46 +75,46 @@

- a -


-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/functions_0x62.html b/doc/html/functions_0x62.html index 3af043bc29da97b5e481079cabaa985c9a7a4487..29cb7a1bc3b53651da7192a1c279aecd71fe63c8 100644 --- a/doc/html/functions_0x62.html +++ b/doc/html/functions_0x62.html @@ -75,36 +75,36 @@

- b -


-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/functions_0x63.html b/doc/html/functions_0x63.html index 25064b2d85809579aab284b63ec403fbd56a1d1d..7911ebd521807adab30bea2cb78030045065cd9e 100644 --- a/doc/html/functions_0x63.html +++ b/doc/html/functions_0x63.html @@ -75,96 +75,96 @@

- c -


-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/functions_0x64.html b/doc/html/functions_0x64.html index 77266444bf868875d0c812a41e24ebff254835e2..d966c5bf27ca928d98e797c90fc86cb2f7180152 100644 --- a/doc/html/functions_0x64.html +++ b/doc/html/functions_0x64.html @@ -75,58 +75,52 @@

- d -


-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/functions_0x65.html b/doc/html/functions_0x65.html index c28155ba4a0a7e1cdba4fcc5e2c258df1efebd3a..88de4948c9e523dbbd999951a61391cce963ab22 100644 --- a/doc/html/functions_0x65.html +++ b/doc/html/functions_0x65.html @@ -75,84 +75,84 @@

- e -

oC__TBB_malloc_proxy_caller
oCtbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::accessor_not_used
oCaggregated_operation
oCtbb::interface6::aggregator_operation
oCtbb::aligned_space< T, N >Block of space aligned sufficiently to construct an array T with N elements
oCtbb::flow::interface8::allocate_buffer< T >
oCtbb::flow::interface8::allocate_buffer< queueing >
oCAllocator
oCallocator_base
oCtbb::flow::interface8::internal::async_body< Input, Ports, AsyncGateway, Body >
oCtbb::flow::interface8::internal::async_gateway< Output >Pure virtual template class that defines interface for async communication
oCbad_alloc
oCtbb::interface6::internal::basic_handler
oCbinary_function
oCtbb::blocked_range< Value >A range over which to iterate
oCtbb::blocked_range2d< RowValue, ColValue >A 2-dimensional range that models the Range concept
oCtbb::blocked_range3d< PageValue, RowValue, ColValue >A 3-dimensional range that models the Range concept
oCtbb::blocked_range< ColValue >
oCtbb::blocked_range< I >
oCtbb::blocked_range< PageValue >
oCtbb::blocked_range< RowValue >
oCtbb::flow::interface8::internal::broadcast_cache< T, M >
oCtbb::flow::interface8::internal::broadcast_cache< input_type >
oCtbb::flow::interface8::internal::broadcast_cache< input_type, tbb::null_rw_mutex >
oCtbb::flow::interface8::internal::broadcast_cache< output_type >
oCtbb::flow::interface8::internal::broadcast_cache< T >
oCtbb::cache_aligned_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::cache_aligned_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCtbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave
oCtbb::combinable< T >Thread-local storage with optional reduction
oCtbb::flow::interface8::composite_node< InputTuple, OutputTuple >
oCtbb::flow::interface8::composite_node< tuple< dependency_msg< Ports, Factory >...>, tuple< dependency_msg< Ports, Factory >...> >
oCtbb::interface6::internal::concrete_filter< T, U, Body >
oCtbb::interface5::concurrent_priority_queue< T, Compare, A >Concurrent priority queue
oCconcurrent_queue_base_v3
oCconcurrent_queue_base_v8
oCconcurrent_unordered_base
oCtbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >
oCtbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping >
oCconcurrent_vector_base
oCcontinue_input
oCtbb::flow::interface8::continue_msgAn empty class used for messages that mean "I'm done"
oCtbb::flow::interface8::default_opencl_factory_device_filter
oCtbb::flow::interface8::dependency_msg< T, Factory >
oCtbb::flow::interface8::internal::edge_container< C >
oCtbb::flow::interface8::internal::edge_container< predecessor_type >
oCtbb::flow::interface8::internal::edge_container< tbb::flow::interface8::sender >
oCets_base
oCexception
oCtbb::interface6::filter_t< T, U >Class representing a chain of type-safe pipeline filters
oCtbb::final_scan_tagUsed to indicate that the final scan is being performed
oCtbb::interface6::flattened2d< Container >
oCtbb::interface6::flow_controlInput_filter control to signal end-of-input for parallel_pipeline
oCfunction_input
oCfunction_output
oCtbb::interface9::global_control
oCtbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType >
oChash_map_base
oCtbb::internal::tbb_thread_v3::id
oCtbb::tick_count::interval_tRelative time interval
oCtbb::flow::interface8::join_node< OutputTuple, JP >
oCtbb::flow::interface8::join_node< kernel_input_tuple, JP >
oCtbb::flow::interface8::key_from_policy< JP >
oCtbb::flow::interface8::key_from_policy< key_matching< Key & > >
oCtbb::flow::interface8::key_from_policy< key_matching< Key > >
oCtbb::interface6::memory_pool_allocator< T, P >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::interface6::memory_pool_allocator< void, P >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCrml::MemPoolPolicy
oCmultifunction_input
oCmutex_copy_deprecated_and_disabled
oCno_assign
oCtbb::interface7::task_arena::attachTag class used to indicate the "attaching" constructor
oCbad_alloc
oCtbb::interface6::internal::basic_handler
oCbinary_function
oCtbb::blocked_range< Value >A range over which to iterate
oCtbb::blocked_range2d< RowValue, ColValue >A 2-dimensional range that models the Range concept
oCtbb::blocked_range3d< PageValue, RowValue, ColValue >A 3-dimensional range that models the Range concept
oCtbb::blocked_range< ColValue >
oCtbb::blocked_range< I >
oCtbb::blocked_range< PageValue >
oCtbb::blocked_range< RowValue >
oCtbb::flow::interface8::internal::broadcast_cache< T, M >
oCtbb::flow::interface8::internal::broadcast_cache< input_type >
oCtbb::flow::interface8::internal::broadcast_cache< input_type, tbb::null_rw_mutex >
oCtbb::flow::interface8::internal::broadcast_cache< output_type >
oCtbb::flow::interface8::internal::broadcast_cache< T >
oCtbb::cache_aligned_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::cache_aligned_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCtbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::call_clear_on_leave
oCtbb::combinable< T >Thread-local storage with optional reduction
oCtbb::flow::interface8::composite_node< InputTuple, OutputTuple >
oCtbb::flow::interface8::composite_node< tuple< dependency_msg< Ports, Factory >...>, tuple< dependency_msg< Ports, Factory >...> >
oCtbb::interface6::internal::concrete_filter< T, U, Body >
oCtbb::interface5::concurrent_priority_queue< T, Compare, A >Concurrent priority queue
oCconcurrent_queue_base_v3
oCconcurrent_queue_base_v8
oCconcurrent_unordered_base
oCtbb::interface5::concurrent_unordered_map_traits< Key, T, Hash_compare, Allocator, Allow_multimapping >
oCtbb::interface5::concurrent_unordered_set_traits< Key, Hash_compare, Allocator, Allow_multimapping >
oCconcurrent_vector_base
oCcontinue_input
oCtbb::flow::interface8::continue_msgAn empty class used for messages that mean "I'm done"
oCtbb::flow::interface8::default_opencl_factory_device_filter
oCtbb::flow::interface8::dependency_msg< T, Factory >
oCtbb::flow::interface8::internal::edge_container< C >
oCtbb::flow::interface8::internal::edge_container< predecessor_type >
oCtbb::flow::interface8::internal::edge_container< tbb::flow::interface8::sender >
oCets_base
oCexception
oCtbb::interface6::filter_t< T, U >Class representing a chain of type-safe pipeline filters
oCtbb::final_scan_tagUsed to indicate that the final scan is being performed
oCtbb::interface6::flattened2d< Container >
oCtbb::interface6::flow_controlInput_filter control to signal end-of-input for parallel_pipeline
oCfunction_input
oCfunction_output
oCtbb::interface9::global_control
oCtbb::flow::interface8::graph_iterator< GraphContainerType, GraphNodeType >
oChash_map_base
oCtbb::internal::tbb_thread_v3::id
oCtbb::tick_count::interval_tRelative time interval
oCtbb::flow::interface8::join_node< OutputTuple, JP >
oCtbb::flow::interface8::join_node< kernel_input_tuple, JP >
oCtbb::flow::interface8::key_from_policy< JP >
oCtbb::flow::interface8::key_from_policy< key_matching< Key & > >
oCtbb::flow::interface8::key_from_policy< key_matching< Key > >
oCtbb::interface6::memory_pool_allocator< T, P >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::interface6::memory_pool_allocator< void, P >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCrml::MemPoolPolicy
oCmultifunction_input
oCmutex_copy_deprecated_and_disabled
oCno_assign
oCno_copy
oCnode_base
oCtbb::flow::interface8::null_type
oCtbb::flow::interface8::num_arguments< T >
oCtbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > >
oCtbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()>
oCtbb::flow::interface8::opencl_buffer< T, Factory >
oCtbb::flow::interface8::opencl_device
oCtbb::flow::interface8::opencl_device_list
oCtbb::flow::interface8::opencl_device_with_key< Key >
oCtbb::flow::interface8::opencl_factory< DeviceFilter >
oCtbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter >
oCtbb::flow::interface8::opencl_memory< Factory >
oCtbb::flow::interface8::opencl_node< Args >
oCtbb::flow::interface8::opencl_node< tuple< Ports...>, JP, default_opencl_factory >
oCtbb::flow::interface8::opencl_node< tuple< Ports...>, queueing, default_opencl_factory >
oCtbb::pipelineA processing pipeline that applies filters to items
oCpool_base
oCtbb::flow::interface8::port_ref_impl< N1, N2 >
oCtbb::pre_scan_tagUsed to indicate that the initial scan is being performed
oCtbb::zero_allocator< void, Allocator >::rebind< U >
oCtbb::interface6::memory_pool_allocator< void, P >::rebind< U >
oCtbb::interface6::memory_pool_allocator< T, P >::rebind< U >
oCtbb::cache_aligned_allocator< T >::rebind< U >
oCtbb::cache_aligned_allocator< void >::rebind< U >
oCtbb::scalable_allocator< T >::rebind< U >
oCtbb::scalable_allocator< void >::rebind< U >
oCtbb::tbb_allocator< T >::rebind< U >
oCtbb::tbb_allocator< void >::rebind< U >
oCtbb::zero_allocator< T, Allocator >::rebind< U >
oCtbb::flow::interface8::receiver< T >Pure virtual template class that defines a receiver of messages of type T
oCtbb::flow::interface8::receiver< continue_msg >
oCtbb::flow::interface8::receiver< dependency_msg< T, Factory > >
oCtbb::flow::interface8::receiver< tbb::flow::interface8::dependency_msg< T, Factory > >
oCreservable_item_buffer
oCtbb::flow::interface8::internal::round_robin_cache< T, M >
oCtbb::flow::interface8::internal::round_robin_cache< T, tbb::null_rw_mutex >
oCtbb::flow::interface8::run_and_put_task< R, B >
oCtbb::scalable_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::scalable_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCscoped_t
oCno_assign
oCno_copy
oCnode_base
oCtbb::flow::interface8::null_type
oCtbb::flow::interface8::num_arguments< T >
oCtbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 > >
oCtbb::flow::interface8::num_arguments< port_ref_impl< N1, N2 >(*)()>
oCtbb::flow::interface8::opencl_buffer< T, Factory >
oCtbb::flow::interface8::opencl_device
oCtbb::flow::interface8::opencl_device_list
oCtbb::flow::interface8::opencl_device_with_key< Key >
oCtbb::flow::interface8::opencl_factory< DeviceFilter >
oCtbb::flow::interface8::opencl_factory< default_opencl_factory_device_filter >
oCtbb::flow::interface8::opencl_memory< Factory >
oCtbb::flow::interface8::opencl_node< Args >
oCtbb::flow::interface8::opencl_node< tuple< Ports...>, JP, default_opencl_factory >
oCtbb::flow::interface8::opencl_node< tuple< Ports...>, queueing, default_opencl_factory >
oCtbb::pipelineA processing pipeline that applies filters to items
oCpool_base
oCtbb::flow::interface8::port_ref_impl< N1, N2 >
oCtbb::pre_scan_tagUsed to indicate that the initial scan is being performed
oCtbb::cache_aligned_allocator< void >::rebind< U >
oCtbb::zero_allocator< void, Allocator >::rebind< U >
oCtbb::zero_allocator< T, Allocator >::rebind< U >
oCtbb::cache_aligned_allocator< T >::rebind< U >
oCtbb::scalable_allocator< T >::rebind< U >
oCtbb::interface6::memory_pool_allocator< T, P >::rebind< U >
oCtbb::interface6::memory_pool_allocator< void, P >::rebind< U >
oCtbb::scalable_allocator< void >::rebind< U >
oCtbb::tbb_allocator< T >::rebind< U >
oCtbb::tbb_allocator< void >::rebind< U >
oCtbb::flow::interface8::receiver< T >Pure virtual template class that defines a receiver of messages of type T
oCtbb::flow::interface8::receiver< continue_msg >
oCtbb::flow::interface8::receiver< dependency_msg< T, Factory > >
oCtbb::flow::interface8::receiver< tbb::flow::interface8::dependency_msg< T, Factory > >
oCreservable_item_buffer
oCtbb::flow::interface8::internal::round_robin_cache< T, M >
oCtbb::flow::interface8::internal::round_robin_cache< T, tbb::null_rw_mutex >
oCtbb::flow::interface8::run_and_put_task< R, B >
oCtbb::scalable_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::scalable_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCscoped_t
oCtbb::flow::interface8::sender< T >Pure virtual template class that defines a sender of messages of type T
oCtbb::flow::interface8::sender< dependency_msg< T, Factory > >
oCtbb::flow::interface8::sender< Output >
oCtbb::flow::interface8::sender< tbb::flow::interface8::dependency_msg< T, Factory > >
oCtbb::flow::interface8::internal::successor_cache< T, M >
oCtask
oCtask_arena_base
oCtbb::task_group_context
oCtbb::internal::task_scheduler_observer_v3
oCtbb::tbb_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::tbb_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCtbb::internal::tbb_exception_ptrException container that preserves the exact copy of the original exception
oCtbb::internal::tbb_thread_v3Versioned thread class
oCtbb::internal::thread_closure_base
oCtbb::tick_countAbsolute timestamp
oCtbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor
oCunfolded_indexer_node
oCunfolded_join_node
oCtbb::interface5::internal::use_element_copy_constructor< T, C >
oCtbb::interface5::internal::use_element_copy_constructor< T, false >
\Ctbb::vector_iterator< Container, Value >
oCscoped_t
oCtbb::flow::interface8::sender< T >Pure virtual template class that defines a sender of messages of type T
oCtbb::flow::interface8::sender< dependency_msg< T, Factory > >
oCtbb::flow::interface8::sender< Output >
oCtbb::flow::interface8::sender< tbb::flow::interface8::dependency_msg< T, Factory > >
oCtbb::flow::interface8::internal::successor_cache< T, M >
oCtask
oCtask_arena_base
oCtbb::task_group_context
oCtbb::internal::task_scheduler_observer_v3
oCtbb::tbb_allocator< T >Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
oCtbb::tbb_allocator< void >Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
oCtbb::internal::tbb_exception_ptrException container that preserves the exact copy of the original exception
oCtbb::internal::tbb_thread_v3Versioned thread class
oCtbb::internal::thread_closure_base
oCtbb::tick_countAbsolute timestamp
oCtbb::flow::interface8::async_node< Input, Output, Policy, Allocator >::try_put_functor
oCunfolded_indexer_node
oCunfolded_join_node
oCtbb::interface5::internal::use_element_copy_constructor< T, C >
oCtbb::interface5::internal::use_element_copy_constructor< T, false >
\Ctbb::vector_iterator< Container, Value >

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/index.html b/doc/html/index.html index 7ca7590b5b4b681588a75411dacc82e9a4ec6ee9..11094d955877fbf6eed548881c1989d4416615c9 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -44,7 +44,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/modules.html b/doc/html/modules.html index 499894979944225596260872e998d8dfbf6746ed..6dc796717a2e222b8f8bd4a3288f494194acb0b5 100644 --- a/doc/html/modules.html +++ b/doc/html/modules.html @@ -32,18 +32,18 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespacemembers.html b/doc/html/namespacemembers.html index 810898a03272c76d891141f05faf288e906d1f27..cedf27a4baa83ff59f44a3c7a98767024f0e3b1b 100644 --- a/doc/html/namespacemembers.html +++ b/doc/html/namespacemembers.html @@ -58,96 +58,96 @@

- _ -

  • __TBB_DECL_ATOMIC_ALT() -: tbb +: tbb

- a -

- e -

  • ets_key_usage_type -: tbb +: tbb

- f -

- m -

  • memory_semantics -: tbb +: tbb

- p -

  • parallel_deterministic_reduce() -: tbb +: tbb
  • parallel_do() -: tbb +: tbb
  • parallel_for() -: tbb +: tbb
  • parallel_for_each() -: tbb +: tbb
  • parallel_invoke() -: tbb +: tbb
  • parallel_reduce() -: tbb +: tbb
  • parallel_scan() -: tbb +: tbb
  • parallel_sort() -: tbb +: tbb

- r -

- s -

  • speculative_spin_mutex -: tbb +: tbb

- t -

  • TBB_runtime_interface_version() -: tbb +: tbb
  • tbb_thread -: tbb +: tbb

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespacemembers_enum.html b/doc/html/namespacemembers_enum.html index 24a7dd51873d10c3862a9c411b311753899e1257..facf874ede6ffafe1f5ef1babf641164e3d1a8ee 100644 --- a/doc/html/namespacemembers_enum.html +++ b/doc/html/namespacemembers_enum.html @@ -43,16 +43,16 @@
 
  • ets_key_usage_type -: tbb +: tbb
  • memory_semantics -: tbb +: tbb

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespacemembers_eval.html b/doc/html/namespacemembers_eval.html index 522a5b41ad88216a892ecbfa401b897deeb49534..b1cafea636b5f8b3746596771a20ad1e23c1d4b5 100644 --- a/doc/html/namespacemembers_eval.html +++ b/doc/html/namespacemembers_eval.html @@ -43,22 +43,22 @@
 

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespacemembers_func.html b/doc/html/namespacemembers_func.html index 94e3f30e103080b098fedd0c43af2b8d1e06d613..f1faf265014634bf6b2d683807035c47bd9a4b17 100644 --- a/doc/html/namespacemembers_func.html +++ b/doc/html/namespacemembers_func.html @@ -52,48 +52,48 @@

- _ -

  • __TBB_DECL_ATOMIC_ALT() -: tbb +: tbb

- p -

  • parallel_deterministic_reduce() -: tbb +: tbb
  • parallel_do() -: tbb +: tbb
  • parallel_for() -: tbb +: tbb
  • parallel_for_each() -: tbb +: tbb
  • parallel_invoke() -: tbb +: tbb
  • parallel_reduce() -: tbb +: tbb
  • parallel_scan() -: tbb +: tbb
  • parallel_sort() -: tbb +: tbb

- t -

  • TBB_runtime_interface_version() -: tbb +: tbb

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespacemembers_type.html b/doc/html/namespacemembers_type.html index 85c0b0aab609862de4266ad80d3facc053f9e955..dd1ada4d2067eec429ec041e8d306369ea4a779e 100644 --- a/doc/html/namespacemembers_type.html +++ b/doc/html/namespacemembers_type.html @@ -43,16 +43,16 @@
 
  • speculative_spin_mutex -: tbb +: tbb
  • tbb_thread -: tbb +: tbb

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html index 71c3533b0792b1379f8cd8d6b240353d32b10753..ab08cb11bc273cc654a08f0bab72e300fd775653 100644 --- a/doc/html/namespaces.html +++ b/doc/html/namespaces.html @@ -38,14 +38,14 @@
Here is a list of all documented namespaces with brief descriptions:
- - + +
oNrmlThe namespace rml contains components of low-level memory pool interface
\NtbbThe namespace tbb contains all components of the library
oNrmlThe namespace rml contains components of low-level memory pool interface
\NtbbThe namespace tbb contains all components of the library

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/doc/html/pages.html b/doc/html/pages.html index 843ac8bb5307876ee42985d428f7443774534e0c..d8a8a28346fde72a4c30af422ad0dcfdaca05c1c 100644 --- a/doc/html/pages.html +++ b/doc/html/pages.html @@ -38,7 +38,7 @@

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its diff --git a/examples/GettingStarted/index.html b/examples/GettingStarted/index.html index 2aaeaba1577b00fc942a7b23dfec01941f3f3bb5..837a7170b468cc0c40567ed48d35460577a08a29 100644 --- a/examples/GettingStarted/index.html +++ b/examples/GettingStarted/index.html @@ -13,7 +13,7 @@ This directory contains the examples referenced by the Intel® Threading Buil
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/GettingStarted/sub_string_finder/Makefile b/examples/GettingStarted/sub_string_finder/Makefile index c1a91e28b538a86ecc9e8e048083dd2ff945f567..e8b5afc19ae0466e8709fd5d4740548d62a61329 100644 --- a/examples/GettingStarted/sub_string_finder/Makefile +++ b/examples/GettingStarted/sub_string_finder/Makefile @@ -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 @@ -44,6 +44,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/GettingStarted/sub_string_finder/Makefile.windows b/examples/GettingStarted/sub_string_finder/Makefile.windows index b3bc58bb80419a516eb5173d0e4a41921284ea9f..d9d4cfd0740ff1eb26d4951bf687c4fec793c654 100644 --- a/examples/GettingStarted/sub_string_finder/Makefile.windows +++ b/examples/GettingStarted/sub_string_finder/Makefile.windows @@ -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 diff --git a/examples/GettingStarted/sub_string_finder/index.html b/examples/GettingStarted/sub_string_finder/index.html index 0e98979fac168c0f2c29fcff109bad04ace8f839..5e8905cb4f975b8175f762830cab7d231a57a092 100644 --- a/examples/GettingStarted/sub_string_finder/index.html +++ b/examples/GettingStarted/sub_string_finder/index.html @@ -56,7 +56,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp index f12df4141b9ce509b50558b5f927eaa951bd4081..27de60fd04a670ea3af1a63efc0a1cf933a15cfc 100644 --- a/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp +++ b/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp index a13f9e2d8975e979f9e59fae8eb33cc47ec55c81..0caedca61d66355055f1e0b8c2f6953d352467d6 100644 --- a/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp +++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp b/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp index 0cdb9880b212e96778e13dfad00e846c694f9d33..c6c29f2d121d9ef3976ed11b2376048b893dcae1 100644 --- a/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp +++ b/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/Makefile b/examples/Makefile index 232bf697e0c142e71bf5ef778d13ea3dce9164a2..fa4d970e126ae5abc63bcdb71d4b33de009fe317 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -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 @@ -107,6 +107,7 @@ else endif ifeq ($(tbb_os),macos) export DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(work_dir)_release:$(work_dir)_debug + override CXXFLAGS += -Wl,-rpath,$(work_dir)_release -Wl,-rpath,$(work_dir)_debug else export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(work_dir)_release:$(work_dir)_debug ifeq ($(findstring mic,$(offload) $(target)),mic) diff --git a/examples/common/copy_libraries.bat b/examples/common/copy_libraries.bat index 9e94e9c820459efba54e6ddab5a8aca795c85614..e8d385d1ca08358b2c718b79f10df0275f992e69 100644 --- a/examples/common/copy_libraries.bat +++ b/examples/common/copy_libraries.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 2005-2015 Intel Corporation. All Rights Reserved. +REM Copyright 2005-2016 Intel Corporation. All Rights Reserved. REM REM This file is part of Threading Building Blocks. Threading Building Blocks is free software; REM you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/examples/common/gui/Makefile.gmake b/examples/common/gui/Makefile.gmake index 8937826d280ee41af8dacacfe42ade0ca0f975c2..752c649204a96d5c48dc46eed286c4896ed71daa 100644 --- a/examples/common/gui/Makefile.gmake +++ b/examples/common/gui/Makefile.gmake @@ -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 diff --git a/examples/common/gui/Makefile.win b/examples/common/gui/Makefile.win index 42ea77f59fc9548b5fd8df75fc7892cc0e34ef29..175e1eb6a18fdbc5d50f2ff612347f3633f190c1 100644 --- a/examples/common/gui/Makefile.win +++ b/examples/common/gui/Makefile.win @@ -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 diff --git a/examples/common/gui/convideo.cpp b/examples/common/gui/convideo.cpp index fd3d76f643e0584e08e9a8bd0dcaa0af5d135fb3..0cb1933f93728f89a7df74973792ad837ff10de0 100644 --- a/examples/common/gui/convideo.cpp +++ b/examples/common/gui/convideo.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/gui/d2dvideo.cpp b/examples/common/gui/d2dvideo.cpp index 64f4cc594be276a98b7b66e4ce04a9bcc4c99109..e803b868d13a9537503c43c92cacb3f313b65b47 100644 --- a/examples/common/gui/d2dvideo.cpp +++ b/examples/common/gui/d2dvideo.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/gui/dxcheck.bat b/examples/common/gui/dxcheck.bat index 5c0e282ce2d853e50021c1719c185a04be49f5b8..4f281fdfe923ed38ddf824168f756a2363564f18 100644 --- a/examples/common/gui/dxcheck.bat +++ b/examples/common/gui/dxcheck.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 2005-2015 Intel Corporation. All Rights Reserved. +REM Copyright 2005-2016 Intel Corporation. All Rights Reserved. REM REM This file is part of Threading Building Blocks. Threading Building Blocks is free software; REM you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/examples/common/gui/gdivideo.cpp b/examples/common/gui/gdivideo.cpp index 64d6a64a524c0132faca5c3f5bae6164e25db3b4..3226d9e9b113c8512c8a10a962e4f1d21524db01 100644 --- a/examples/common/gui/gdivideo.cpp +++ b/examples/common/gui/gdivideo.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/gui/macvideo.cpp b/examples/common/gui/macvideo.cpp index e18910e3081b3ecc35adb6c6517d20d9f4e6ddf8..decbb1092286532a213d31d9d5d14a0a12f1c3d8 100644 --- a/examples/common/gui/macvideo.cpp +++ b/examples/common/gui/macvideo.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -37,8 +37,13 @@ int cocoa_update=0; struct timeval g_time; video::video() +#if __TBB_IOS + : red_mask(0xff), red_shift(0), green_mask(0xff00), + green_shift(8), blue_mask(0xff0000), blue_shift(16), depth(24) +#else : red_mask(0xff0000), red_shift(16), green_mask(0xff00), - green_shift(8), blue_mask(0xff), blue_shift(0), depth(24) + green_shift(8), blue_mask(0xff), blue_shift(0), depth(24) +#endif { assert(g_video == 0); g_video = this; title = "Video"; cocoa_update=1; updating = true; calc_fps = false; @@ -136,7 +141,8 @@ void video::main_loop() //! Change window title void video::show_title() { - strncpy( window_title, title, WINDOW_TITLE_SIZE ); + if(title) + strncpy( window_title, title, WINDOW_TITLE_SIZE ); return; } diff --git a/examples/common/gui/video.h b/examples/common/gui/video.h index 35823ca2d1145c659b9e8d338c55667b89906ab5..7a331d370c0dfbd7de33b7cacffdad5c566aa736 100644 --- a/examples/common/gui/video.h +++ b/examples/common/gui/video.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/gui/winvideo.h b/examples/common/gui/winvideo.h index b31cd9019bee67de1b7540ee8d4477d67b172858..62d61514b8182eefe95e8ff2f6d35354c6c5b02f 100644 --- a/examples/common/gui/winvideo.h +++ b/examples/common/gui/winvideo.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/gui/xcode/tbbExample/Info.plist b/examples/common/gui/xcode/tbbExample/Info.plist deleted file mode 100644 index db4faaed44a7b5685e499cfcecf251f892f22030..0000000000000000000000000000000000000000 --- a/examples/common/gui/xcode/tbbExample/Info.plist +++ /dev/null @@ -1,59 +0,0 @@ - - - - - BuildMachineOSBuild - 11D50d - CFBundleDevelopmentRegion - en - CFBundleDisplayName - - CFBundleExecutable - tbbExample - CFBundleIdentifier - Intel.tbbExample - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - tbbExample - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 4E1019 - DTPlatformVersion - GM - DTSDKBuild - 11D50a - DTSDKName - macosx10.7 - DTXcode - 0431 - DTXcodeBuild - 4E1019 - LSApplicationCategoryType - public.app-category.business - LSEnvironment - - DYLD_LIBRARY_PATH - Contents/Resources:.:../Resources:/tmp:$DYLD_LIBRARY_PATH - LIBRARY_PATH - Contents/Resources:.:../:/tmp:$DYLD_LIBRARY_PATH - - LSMinimumSystemVersion - 10.7 - NSHumanReadableCopyright - Copyright 2005-2015 Intel Corporation. All Rights Reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/examples/common/gui/xcode/tbbExample/OpenGLView.h b/examples/common/gui/xcode/tbbExample/OpenGLView.h index 5b47e3d147c4d3d0d53befd4c93b58a1060f2011..314a2cd17717c965bf79c34b08b010154eb0d9e6 100644 --- a/examples/common/gui/xcode/tbbExample/OpenGLView.h +++ b/examples/common/gui/xcode/tbbExample/OpenGLView.h @@ -1,5 +1,5 @@ /* - 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 @@ -18,6 +18,28 @@ reasons why the executable file might be covered by the GNU General Public License. */ +#import + +#if TARGET_OS_IPHONE + +#import +#import "OpenGLES/ES2/gl.h" + +@interface OpenGLView : UIView { + NSTimer *timer; + CGRect imageRect; +} + +@property (nonatomic, retain) NSTimer *timer; +@property (nonatomic) CGRect imageRect; + +- (void) drawRect:(CGRect)rect; +- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; + +@end + +#elif TARGET_OS_MAC + #import #import @@ -34,3 +56,5 @@ - (void) viewDidEndLiveResize; @end + +#endif diff --git a/examples/common/gui/xcode/tbbExample/OpenGLView.m b/examples/common/gui/xcode/tbbExample/OpenGLView.m index 19a76d4586e90bf0ce4413792a3897e13caca899..21f85c845d0485d0031907e8d2714043c074be1b 100644 --- a/examples/common/gui/xcode/tbbExample/OpenGLView.m +++ b/examples/common/gui/xcode/tbbExample/OpenGLView.m @@ -1,5 +1,5 @@ /* - 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 @@ -18,9 +18,8 @@ reasons why the executable file might be covered by the GNU General Public License. */ +#import #import "OpenGLView.h" -#import -#import "tbbAppDelegate.h" // defined in macvideo.cpp extern char* window_title; @@ -30,23 +29,84 @@ extern unsigned int *g_pImg; void on_mouse_func(int x, int y, int k); void on_key_func(int x); +bool initilized = false; + +#if TARGET_OS_IPHONE + +#import "OpenGLES/ES2/gl.h" + +@implementation OpenGLView + +@synthesize timer; +@synthesize imageRect; + +- (void)drawRect:(CGRect)start +{ + if (initilized == false) { + NSLog(@"INITIALIZE"); + timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES]; + imageRect = [[UIScreen mainScreen] bounds]; + CGFloat full_height = imageRect.size.height; + const float ratio=(float)g_sizex/g_sizey; + imageRect.size.height=imageRect.size.width/ratio; + imageRect.origin.y=(full_height-imageRect.size.height)/2; + initilized = true; + } + + CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB(); + CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, g_pImg, 4*g_sizex*g_sizey, NULL); + + CGImageRef inputImage = CGImageCreate(g_sizex, g_sizey, 8, 32, g_sizex * 4, colourSpace,(CGBitmapInfo)kCGImageAlphaNoneSkipLast, dataProvider, NULL, NO, kCGRenderingIntentDefault); + UIImage *image = [UIImage imageWithCGImage:inputImage]; + + CGDataProviderRelease(dataProvider); + CGColorSpaceRelease(colourSpace); + CGImageRelease(inputImage); + + [image drawInRect:imageRect]; + +} + +- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +{ + CGPoint point = [[touches anyObject] locationInView:self]; + const int x = point.x; + const int y = point.y; + if ( (y-imageRect.origin.y) > 0 && y < (imageRect.origin.y + imageRect.size.height )) + on_mouse_func( x*g_sizex/(imageRect.size.width), (y-imageRect.origin.y)*g_sizey/imageRect.size.height,1); + [self setNeedsDisplay]; +} + +-(void) update_window{ + if( cocoa_update ) [self setNeedsDisplay]; +} + +@end + +#elif TARGET_OS_MAC + +#import + @implementation OpenGLView @synthesize timer; - (void) drawRect:(NSRect)start { + if (initilized == false) { + NSLog(@"INITIALIZE"); + timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES]; + initilized = true; + } glWindowPos2i(0, (int)self.visibleRect.size.height); glPixelZoom( (float)self.visibleRect.size.width /(float)g_sizex, -(float)self.visibleRect.size.height/(float)g_sizey); glDrawPixels(g_sizex, g_sizey, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, g_pImg); glFlush(); - - timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES]; } -(void) update_window{ - if( cocoa_update ) [self setNeedsDisplay:YES]; // TODO also clear cocoa_update? + if( cocoa_update ) [self setNeedsDisplay:YES]; if( window_title ) [_window setTitle:[NSString stringWithFormat:@"%s", window_title]]; } @@ -83,3 +143,5 @@ void on_key_func(int x); } @end + +#endif diff --git a/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib b/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib index 14faab363f3e2673119ce792392e17deca7ecb56..975382cea624da6de6b808fe1d2104a2ba013a65 100644 --- a/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib +++ b/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib @@ -1,291 +1,48 @@ - - - - 1070 - 11D50d - 2182 - 1138.32 - 568.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2182 - - - NSWindowTemplate - NSView - NSMenu - NSMenuItem - NSCustomObject - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - NSApplication - - - FirstResponder - - - NSApplication - - - AMainMenu - - - - tbbExample - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - tbbExample - - - - Quit tbbExample - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - _NSMainMenu - - - 15 - 2 - {{100, 100}, {480, 360}} - 1148718080 - tbbExample - NSWindow - - - - - 4352 - {480, 360} - - - 2 - {1, 9} - {1, 1} - - {{0, 0}, {1280, 1002}} - {10000000000000, 10000000000000} - YES - - - tbbAppDelegate - - - NSFontManager - - - - - - - terminate: - - - - 449 - - - - delegate - - - - 495 - - - - window - - - - 532 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - - - - - - 56 - - - - - - - - 57 - - - - - - - - 136 - - - - - 371 - - - - - - - - 372 - - - - - 420 - - - - - 494 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{380, 496}, {480, 360}} - - OpenGLView - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 539 - - - - - OpenGLView - NSOpenGLView - - IBProjectSource - ./Classes/OpenGLView.h - - - - tbbAppDelegate - NSObject - - saveAction: - id - - - saveAction: - - saveAction: - id - - - - window - NSWindow - - - window - - window - NSWindow - - - - IBProjectSource - ./Classes/tbbAppDelegate.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - 3 - - {11, 11} - {10, 3} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/common/gui/xcode/tbbExample/iOS.storyboard b/examples/common/gui/xcode/tbbExample/iOS.storyboard new file mode 100644 index 0000000000000000000000000000000000000000..9906441eddcad7e2a262f2ca1ebad7d8db2eae31 --- /dev/null +++ b/examples/common/gui/xcode/tbbExample/iOS.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/common/gui/xcode/tbbExample/main.m b/examples/common/gui/xcode/tbbExample/main.m index 24fea1bea76e248ff32352b194757678a9c9a61e..de79f6546f95177611e48d26aa302f8ce98ce3bc 100644 --- a/examples/common/gui/xcode/tbbExample/main.m +++ b/examples/common/gui/xcode/tbbExample/main.m @@ -1,5 +1,5 @@ /* - 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 @@ -18,9 +18,34 @@ reasons why the executable file might be covered by the GNU General Public License. */ +#import +#import + +#if TARGET_OS_IPHONE + +#import +#import "tbbAppDelegate.h" + +void get_screen_resolution(int *x, int *y) { + // Getting landscape screen resolution in any case + CGRect imageRect = [[UIScreen mainScreen] bounds]; + *x=imageRect.size.width>imageRect.size.height?imageRect.size.width:imageRect.size.height; + *y=imageRect.size.width int cocoa_main(int argc, char *argv[]) { return NSApplicationMain(argc, (const char **)argv); } +#endif diff --git a/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h b/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h index 7669ef6116e8f160f7d28d97ba71321854ec4609..3ae41765abf3bf29306642a12f2229ae8a8b7c0b 100644 --- a/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h +++ b/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h @@ -1,5 +1,5 @@ /* - 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 @@ -22,6 +22,20 @@ // Created by Xcode* 4.3.2 // +#import + +#if TARGET_OS_IPHONE + +#import + +@interface tbbAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + +#elif TARGET_OS_MAC + #import @interface tbbAppDelegate : NSObject { @@ -33,3 +47,5 @@ - (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender; @end + +#endif diff --git a/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m b/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m index 933850825507c6768f861b56b8f8782bfa919747..ecf9e32d5ebc8f5112e605428dc47b3693234d4b 100644 --- a/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m +++ b/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m @@ -1,5 +1,5 @@ /* - 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 @@ -18,12 +18,25 @@ reasons why the executable file might be covered by the GNU General Public License. */ -// -// Created by Xcode* 4.3.2 -// - #import "tbbAppDelegate.h" -#import + +#if TARGET_OS_IPHONE + +@implementation tbbAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + return YES; +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + exit(EXIT_SUCCESS); +} + +@end + +#elif TARGET_OS_MAC @implementation tbbAppDelegate @@ -49,3 +62,5 @@ extern int g_sizex, g_sizey; } @end + +#endif diff --git a/examples/common/gui/xcode/tbbExample/tbbExample-Info.ios.plist b/examples/common/gui/xcode/tbbExample/tbbExample-Info.ios.plist new file mode 100644 index 0000000000000000000000000000000000000000..80bdf4ff240daaa812119df5c4c6322c7610a108 --- /dev/null +++ b/examples/common/gui/xcode/tbbExample/tbbExample-Info.ios.plist @@ -0,0 +1,44 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + iOS + UIMainStoryboardFile + iOS + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist b/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist index 77ce710947e7ff3a23439056c36edc92aa02dc46..471a93daa0450e4be77671e2b865142a00ff0999 100644 --- a/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist +++ b/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist @@ -4,12 +4,14 @@ CFBundleDevelopmentRegion en + CFBundleDisplayName + CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier - Intel.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -20,6 +22,10 @@ 1.0 CFBundleSignature ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.business LSEnvironment DYLD_LIBRARY_PATH @@ -27,16 +33,10 @@ LIBRARY_PATH Contents/Resources:.:../:/tmp:$DYLD_LIBRARY_PATH - CFBundleDisplayName - - CFBundleVersion - 1 - LSApplicationCategoryType - public.app-category.business LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. NSMainNibFile MainMenu NSPrincipalClass diff --git a/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch b/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch index 5a809d4b5e42b4339c1ad07becc39554e3055578..01a0fb72e725d6d5c406340ea5e657af6e3bbc52 100644 --- a/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch +++ b/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch @@ -1,5 +1,5 @@ /* - 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 @@ -22,6 +22,15 @@ // Prefix header for all source files of the 'tbbExample' target in the 'tbbExample' project // +#import + +#if TARGET_OS_IPHONE +#ifdef __OBJC__ + #import + #import +#endif +#elif TARGET_OS_MAC #ifdef __OBJC__ #import #endif +#endif diff --git a/examples/common/gui/xvideo.cpp b/examples/common/gui/xvideo.cpp index 841b3c99693577b3e276d07e223049a95c8e75aa..beab0350a05db943beef9b968a138b5fd8bad1fa 100644 --- a/examples/common/gui/xvideo.cpp +++ b/examples/common/gui/xvideo.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/index.html b/examples/common/index.html index ddb9f37cdf14f5fea3caaf712de925ec53704c2e..a61a99e65edd0de59b9415877d5253ef10bd052f 100644 --- a/examples/common/index.html +++ b/examples/common/index.html @@ -58,7 +58,7 @@ tbb::task_scheduler_init::default_num_threads().
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/common/utility/fast_random.h b/examples/common/utility/fast_random.h index c360ebc24d8eed5e738b3d52cb5440c4d2f2f8ac..8be1019226f0ee48df4dba4129bf4a9ae368d0ac 100644 --- a/examples/common/utility/fast_random.h +++ b/examples/common/utility/fast_random.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/common/utility/utility.h b/examples/common/utility/utility.h index 573cb490fc779e7955a082c18ba1a98e24889cb9..80d9f4592480fd9df7209c48e8b33c1701bed2a9 100644 --- a/examples/common/utility/utility.h +++ b/examples/common/utility/utility.h @@ -1,5 +1,5 @@ /* - 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 @@ -134,9 +134,13 @@ namespace utility{ } } } + template + static bool is_null_c_str(t&){return false;} + static bool is_null_c_str(char* s){return s==NULL;} virtual std::string value()const{ std::stringstream str; - str< clone() const { diff --git a/examples/concurrent_hash_map/count_strings/Makefile b/examples/concurrent_hash_map/count_strings/Makefile index b5a4a5face9d6ffb2dd37341ac850aeffe87f301..55a27bfeee827bfc7bdac272c5db65c36c3c2213 100644 --- a/examples/concurrent_hash_map/count_strings/Makefile +++ b/examples/concurrent_hash_map/count_strings/Makefile @@ -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 @@ -34,6 +34,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/concurrent_hash_map/count_strings/Makefile.windows b/examples/concurrent_hash_map/count_strings/Makefile.windows index a2ddf82e4e2ce5197ae6cf42014219d7acc25962..ed0d9e851c25a3c9c760238c8331e98972726d39 100644 --- a/examples/concurrent_hash_map/count_strings/Makefile.windows +++ b/examples/concurrent_hash_map/count_strings/Makefile.windows @@ -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 diff --git a/examples/concurrent_hash_map/count_strings/count_strings.cpp b/examples/concurrent_hash_map/count_strings/count_strings.cpp index 203319db2ee1e25b6c92724ca9d4cc3555dd59a7..39f3f45890f4686ec40153a053374def38b22ff0 100644 --- a/examples/concurrent_hash_map/count_strings/count_strings.cpp +++ b/examples/concurrent_hash_map/count_strings/count_strings.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/concurrent_hash_map/count_strings/index.html b/examples/concurrent_hash_map/count_strings/index.html index 3ecf322e11e591caf893a347e63c254353631175..25fdcb11a8a57cc5c23f4225978588c62b7b927d 100644 --- a/examples/concurrent_hash_map/count_strings/index.html +++ b/examples/concurrent_hash_map/count_strings/index.html @@ -44,7 +44,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/concurrent_hash_map/index.html b/examples/concurrent_hash_map/index.html index 33b7ca5f97486850d683cbbb39ef515298571938..b20cda800cbb1772c746d77de3c84b384ba99582 100644 --- a/examples/concurrent_hash_map/index.html +++ b/examples/concurrent_hash_map/index.html @@ -13,7 +13,7 @@ This directory has examples of the template concurrent_hash_map.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/concurrent_priority_queue/shortpath/Makefile b/examples/concurrent_priority_queue/shortpath/Makefile index f5cdbf60669f216c7d71205ccd0b8a10e77b6a05..2b2af0ed08d379aca845e1d2f1dc4d0be23272b5 100644 --- a/examples/concurrent_priority_queue/shortpath/Makefile +++ b/examples/concurrent_priority_queue/shortpath/Makefile @@ -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 @@ -39,6 +39,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/concurrent_priority_queue/shortpath/Makefile.windows b/examples/concurrent_priority_queue/shortpath/Makefile.windows index 0fab8f67d0534ecfeed3aae0303fb80431234845..4af028147d20e18f398284295dd4c3235fd13765 100644 --- a/examples/concurrent_priority_queue/shortpath/Makefile.windows +++ b/examples/concurrent_priority_queue/shortpath/Makefile.windows @@ -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 diff --git a/examples/concurrent_priority_queue/shortpath/index.html b/examples/concurrent_priority_queue/shortpath/index.html index a3ad5515695a44bd28ca0b62483edf08f4914216..feb356886510bde2bcfc87b468be22d8bd72e4db 100644 --- a/examples/concurrent_priority_queue/shortpath/index.html +++ b/examples/concurrent_priority_queue/shortpath/index.html @@ -70,9 +70,9 @@ General build directions can be found here.
-Up to parent directory +Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/concurrent_priority_queue/shortpath/shortpath.cpp b/examples/concurrent_priority_queue/shortpath/shortpath.cpp index f90f66e6f2e355f39f81b64f8362a9da52981545..efa56d709f9ca9165167216424819fe5f60c529e 100644 --- a/examples/concurrent_priority_queue/shortpath/shortpath.cpp +++ b/examples/concurrent_priority_queue/shortpath/shortpath.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/binpack/Makefile b/examples/graph/binpack/Makefile index cce987f8c8871fcdbbc2550267097c25a550d9f8..ac20241fe348d4be0a25b72905b4e5cf1cea37e7 100644 --- a/examples/graph/binpack/Makefile +++ b/examples/graph/binpack/Makefile @@ -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 @@ -34,6 +34,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/graph/binpack/Makefile.windows b/examples/graph/binpack/Makefile.windows index ee373a2bc0f57c99a115713df76210fd015d18a1..2257733dfdce0bedcf455c995e25eaf408a356de 100644 --- a/examples/graph/binpack/Makefile.windows +++ b/examples/graph/binpack/Makefile.windows @@ -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 diff --git a/examples/graph/binpack/binpack.cpp b/examples/graph/binpack/binpack.cpp index b1d5e4f54595a80fc5295cf371397bf1920e5c84..d55b533a0a3293a702144d0e8d0938b89f1734d8 100644 --- a/examples/graph/binpack/binpack.cpp +++ b/examples/graph/binpack/binpack.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -41,7 +41,7 @@ typedef vector bin; // we use a simple vector to represent a bin // Our bin packers will be function nodes in the graph that take value_type items and // return a dummy value. They will also implicitly send packed bins to the bin_buffer // node, and unused items back to the value_pool node: -typedef function_node bin_packer; +typedef multifunction_node, rejecting> bin_packer; // Items are placed into a pool that all bin packers grab from, represent by a queue_node: typedef queue_node value_pool; // Packed bins are placed in this buffer waiting to be serially printed and/or accounted for: @@ -72,34 +72,33 @@ bin_packer **bins; // the array of bin packers // This class is the Body type for bin_packer class bin_filler { + typedef bin_packer::output_ports_type ports_type; bin my_bin; // the current bin that this bin_filler is packing size_type my_used; // capacity of bin used by current contents (not to be confused with my_bin.size()) size_type relax, relax_val; // relaxation counter for determining when to settle for a non-full bin bin_packer* my_bin_packer; // ptr to the bin packer that this body object is associated with size_type bin_index; // index of the encapsulating bin packer in the global bins array - value_pool* the_value_pool; // ptr to the pool of items to pack - bin_buffer* the_bin_buffer; // ptr to the buffer of resulting bins value_type looking_for; // the minimum size of item this bin_packer will accept + value_pool* the_value_pool; // the queue of incoming values bool done; // flag to indicate that this binpacker has been deactivated public: - bin_filler(size_t bidx, value_pool* q, bin_buffer* r) : - my_used(0), relax(0), relax_val(0), my_bin_packer(NULL), bin_index(bidx), the_value_pool(q), - the_bin_buffer(r), looking_for(V), done(false) {} - continue_msg operator()(const value_type& item) { + bin_filler(size_t bidx, value_pool* _q) : + my_used(0), relax(0), relax_val(0), my_bin_packer(NULL), bin_index(bidx), looking_for(V), the_value_pool(_q), done(false) {} + void operator()(const value_type& item, ports_type& p) { if (!my_bin_packer) my_bin_packer = bins[bin_index]; - if (done) the_value_pool->try_put(item); // this bin_packer is done packing items; put item back to pool + if (done) get<0>(p).try_put(item); // this bin_packer is done packing items; put item back to pool else if (item > V) { // signal that packed_sum has reached item_sum at some point size_type remaining = active_bins--; if (remaining == 1 && packed_sum == item_sum) { // this is the last bin and it has seen everything // this bin_packer may not have seen everything, so stay active - if (my_used>0) the_bin_buffer->try_put(my_bin); + if (my_used>0) get<1>(p).try_put(my_bin); my_bin.clear(); my_used = 0; looking_for = V; ++active_bins; } else if (remaining == 1) { // this is the last bin, but there are remaining items - the_value_pool->try_put(V+1); // send out signal + get<0>(p).try_put(V+1); // send out signal ++active_bins; } else if (remaining > 1) { // this is not the last bin; deactivate @@ -107,16 +106,16 @@ class bin_filler { packed_sum -= my_used; packed_items -= my_bin.size(); for (size_type i=0; itry_put(my_bin[i]); + get<0>(p).try_put(my_bin[i]); the_value_pool->remove_successor(*my_bin_packer); // deactivate done = true; - the_value_pool->try_put(V+1); // send out signal + get<0>(p).try_put(V+1); // send out signal } else { // this bin is well-utilized; send out bin and deactivate the_value_pool->remove_successor(*my_bin_packer); // build no more bins done = true; - if (my_used>0) the_bin_buffer->try_put(my_bin); - the_value_pool->try_put(V+1); // send out signal + if (my_used>0) get<1>(p).try_put(my_bin); + get<0>(p).try_put(V+1); // send out signal } } } @@ -128,10 +127,10 @@ class bin_filler { looking_for = V-my_used; relax = 0; if (packed_sum == item_sum) { - the_value_pool->try_put(V+1); // send out signal + get<0>(p).try_put(V+1); // send out signal } if (my_used == V) { - the_bin_buffer->try_put(my_bin); + get<1>(p).try_put(my_bin); my_bin.clear(); my_used = 0; looking_for = V; @@ -153,21 +152,20 @@ class bin_filler { packed_sum -= my_used; packed_items -= my_bin.size(); for (size_type i=0; itry_put(my_bin[i]); + get<0>(p).try_put(my_bin[i]); my_bin.clear(); my_used = 0; } else if (looking_for == 0 && (my_used >= V/(1+optimality*.1) || active_bins == 1)) { // this bin_packer can't find items but is well-utilized, so send it out and reset - the_bin_buffer->try_put(my_bin); + get<1>(p).try_put(my_bin); my_bin.clear(); my_used = 0; looking_for = V; } } - the_value_pool->try_put(item); // put unused item back to pool + get<0>(p).try_put(item); // put unused item back to pool } - return continue_msg(); // need to return something } }; @@ -226,7 +224,7 @@ public: int get_default_num_threads() { static int threads = 0; if (threads == 0) - threads = tbb::task_scheduler_init::default_num_threads(); + threads = task_scheduler_init::default_num_threads(); return threads; } @@ -277,8 +275,10 @@ int main(int argc, char *argv[]) { bin_buffer the_bin_buffer(g); bins = new bin_packer*[num_bin_packers]; for (int i=0; i(*(bins[i])), the_value_pool); + make_edge(output_port<1>(*(bins[i])), the_bin_buffer); } bin_writer the_writer(g, 1, bin_printer()); make_edge(the_bin_buffer, the_writer); @@ -289,7 +289,7 @@ int main(int argc, char *argv[]) { } delete[] bins; } - utility::report_elapsed_time((tbb::tick_count::now() - start).seconds()); + utility::report_elapsed_time((tick_count::now() - start).seconds()); delete[] input_array; return 0; } catch(std::exception& e) { diff --git a/examples/graph/binpack/index.html b/examples/graph/binpack/index.html index 16e0ab97e58a6e894bcb638b4cfd6869bf4d656d..257d7ff0ff7696f4c8b2035a6d1e51c40934e403 100644 --- a/examples/graph/binpack/index.html +++ b/examples/graph/binpack/index.html @@ -62,7 +62,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/cholesky/Makefile b/examples/graph/cholesky/Makefile index fa66bc75c1aafdbb14d209fedb781fb01aaa52f9..b16b00282b08a0f93fa32ca30ad93463fa61bb4a 100644 --- a/examples/graph/cholesky/Makefile +++ b/examples/graph/cholesky/Makefile @@ -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 @@ -28,6 +28,8 @@ endif # which icpc ifeq ($(shell uname), Linux) LIBS+= -lrt +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif # MKL support diff --git a/examples/graph/cholesky/Makefile.windows b/examples/graph/cholesky/Makefile.windows index a084c9fd5b198754880744b454de21fe5d89dda6..c1d857f91fe3e912480640aab6dc3648443e46ad 100644 --- a/examples/graph/cholesky/Makefile.windows +++ b/examples/graph/cholesky/Makefile.windows @@ -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 diff --git a/examples/graph/cholesky/cholesky.cpp b/examples/graph/cholesky/cholesky.cpp index 2207c498ad7f7f42bf50e02b99a1f671ae2ef7b6..2290d2ff21ff05df23e77563e95029e934286af4 100644 --- a/examples/graph/cholesky/cholesky.cpp +++ b/examples/graph/cholesky/cholesky.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/cholesky/index.html b/examples/graph/cholesky/index.html index b41a4abccc9ef584fbaa40f78a0d65e87c9cf9e8..c715d6fc257580e4914816f163f83c9d2f4932d6 100644 --- a/examples/graph/cholesky/index.html +++ b/examples/graph/cholesky/index.html @@ -59,7 +59,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/cholesky/init.cpp b/examples/graph/cholesky/init.cpp index b9095fedce82752917cfb17f2d5124d36ef43fe8..9b6e0abe54e68a0f0ad72c2badc921ffeae723fe 100644 --- a/examples/graph/cholesky/init.cpp +++ b/examples/graph/cholesky/init.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/dining_philosophers/Makefile b/examples/graph/dining_philosophers/Makefile index 334d3812a34ba729d5c8ce80917ca7a5f736bd2d..cbe8f005a24a1a90e47a5696f2a3ed017b8f2210 100644 --- a/examples/graph/dining_philosophers/Makefile +++ b/examples/graph/dining_philosophers/Makefile @@ -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 @@ -33,6 +33,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/graph/dining_philosophers/Makefile.windows b/examples/graph/dining_philosophers/Makefile.windows index 1776ade24eb5811dac8ae33054a707908eaa8247..080051380b1dc58815a3cf393b17bd6d52fde490 100644 --- a/examples/graph/dining_philosophers/Makefile.windows +++ b/examples/graph/dining_philosophers/Makefile.windows @@ -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 diff --git a/examples/graph/dining_philosophers/dining_philosophers.cpp b/examples/graph/dining_philosophers/dining_philosophers.cpp index c9a3a70d0fc394749a02222dd951122d240a71d6..1610faae27f64579479b6d5f1896490eee81c8b7 100644 --- a/examples/graph/dining_philosophers/dining_philosophers.cpp +++ b/examples/graph/dining_philosophers/dining_philosophers.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/dining_philosophers/index.html b/examples/graph/dining_philosophers/index.html index 82e6a8be4af9aff8b66ebb272932fc886c2b73bf..922ec0a98c7ce7e4e73fb1801666abe0b0f405cf 100644 --- a/examples/graph/dining_philosophers/index.html +++ b/examples/graph/dining_philosophers/index.html @@ -9,7 +9,7 @@ to be available before eating. Eating and thinking are implemented with sleep()

Source Files

-
dining_philosophers.cpp +
dining_philosophers.cpp
Source code for the example.
Makefile, Makefile.windows
Makefiles for building example. @@ -17,7 +17,7 @@ to be available before eating. Eating and thinking are implemented with sleep()

Directories

-
src +
src
Contains source file mentioned above.
msvs
Contains Microsoft* Visual Studio* 2010 workspace for building and running the @@ -32,7 +32,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/fgbzip2/Makefile b/examples/graph/fgbzip2/Makefile index e03e298fb5be5ab4807c125945cf36fd05b26c7d..a163bb93ef643b688107842d2c18ef1b235ffa18 100644 --- a/examples/graph/fgbzip2/Makefile +++ b/examples/graph/fgbzip2/Makefile @@ -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 @@ -30,6 +30,8 @@ endif # which icc ifeq ($(shell uname), Linux) LIBS+= -lrt -lpthread +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif CXXFLAGS += -std=c++0x -DTBB_PREVIEW_FLOW_GRAPH_NODES=1 $(CXX0XFLAGS) diff --git a/examples/graph/fgbzip2/Makefile.windows b/examples/graph/fgbzip2/Makefile.windows index cd79caea33c6dee7ee669a4d5169ff6d839bba6a..de43943cafd58bc1251b126469d8ef7a950ff4de 100644 --- a/examples/graph/fgbzip2/Makefile.windows +++ b/examples/graph/fgbzip2/Makefile.windows @@ -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 diff --git a/examples/graph/fgbzip2/blocksort.cpp b/examples/graph/fgbzip2/blocksort.cpp index c75bf1b161fa7c2e0eed8937e8e613988eb3a2f5..0766014c48d999be9011bdfc150bcdac9f59ae57 100644 --- a/examples/graph/fgbzip2/blocksort.cpp +++ b/examples/graph/fgbzip2/blocksort.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/bzlib.cpp b/examples/graph/fgbzip2/bzlib.cpp index a80426c4567193c0f2edec07e8a807c5431fe41f..376737e6de17136b67133a96fc94ed164542f0c2 100644 --- a/examples/graph/fgbzip2/bzlib.cpp +++ b/examples/graph/fgbzip2/bzlib.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/bzlib.h b/examples/graph/fgbzip2/bzlib.h index a83a204f31212b5c8937768b161a30f2a8583c77..99390c1a93d31520f7ddde09c5b3e280eab35da4 100644 --- a/examples/graph/fgbzip2/bzlib.h +++ b/examples/graph/fgbzip2/bzlib.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/bzlib_private.h b/examples/graph/fgbzip2/bzlib_private.h index 639b7806874f3765babd02fd84dc7b6b4ef9facf..2d7c9a77165f48a0892f85a64a7559b2e5774c1c 100644 --- a/examples/graph/fgbzip2/bzlib_private.h +++ b/examples/graph/fgbzip2/bzlib_private.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/compress.cpp b/examples/graph/fgbzip2/compress.cpp index 4c8b5f3934cd43bc1c57347803d3346b8dbfe471..a297ffe788df41074c2814ee24428300c72f872c 100644 --- a/examples/graph/fgbzip2/compress.cpp +++ b/examples/graph/fgbzip2/compress.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/crctable.cpp b/examples/graph/fgbzip2/crctable.cpp index c6865733cce48789df0af04de4b1dd604d74768e..cc7814460f8a17bcf1b6779a250ce013d09c402e 100644 --- a/examples/graph/fgbzip2/crctable.cpp +++ b/examples/graph/fgbzip2/crctable.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/decompress.cpp b/examples/graph/fgbzip2/decompress.cpp index 801220455761af82703cdc43a6492217b7ab3d34..54417c30ca283526fb46dde5d7ac292ad3c40ad1 100644 --- a/examples/graph/fgbzip2/decompress.cpp +++ b/examples/graph/fgbzip2/decompress.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/fgbzip2.cpp b/examples/graph/fgbzip2/fgbzip2.cpp index 01245a083b0e6b82d812c3c60495e89409140463..549a0f99af1d233f0f6a58b52742ca930fc5f08e 100644 --- a/examples/graph/fgbzip2/fgbzip2.cpp +++ b/examples/graph/fgbzip2/fgbzip2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/huffman.cpp b/examples/graph/fgbzip2/huffman.cpp index e9d7f1070a61b6e7db4d4966f27a519d68b18dde..91cd98f10b828bf79a101fd9d2262b07667742c0 100644 --- a/examples/graph/fgbzip2/huffman.cpp +++ b/examples/graph/fgbzip2/huffman.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/fgbzip2/index.html b/examples/graph/fgbzip2/index.html index 0a517c249e028886efe1de3e32cca29ff784fc83..dabe8a02b995b3830e2990244e7e710331e44d9c 100644 --- a/examples/graph/fgbzip2/index.html +++ b/examples/graph/fgbzip2/index.html @@ -83,7 +83,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/fgbzip2/randtable.cpp b/examples/graph/fgbzip2/randtable.cpp index 6210d0fea78ddeaae6f27bf6b07cfae4da548dcd..444d694758385e6c41daf2d24acae17be0ad1609 100644 --- a/examples/graph/fgbzip2/randtable.cpp +++ b/examples/graph/fgbzip2/randtable.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/index.html b/examples/graph/index.html index b1b804233bcc68472c4005aec7de676eb1557b48..6a8a1d1aa388ac2fa111810e901d2dff43d0786f 100644 --- a/examples/graph/index.html +++ b/examples/graph/index.html @@ -23,7 +23,7 @@ This directory has examples of tbb::flow.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/logic_sim/D_latch.h b/examples/graph/logic_sim/D_latch.h index bbe056a7d51dc89e821b5546ffae926c11c02010..c4ced20bb6f423ead2df9f8a8eabf9a361f86a03 100644 --- a/examples/graph/logic_sim/D_latch.h +++ b/examples/graph/logic_sim/D_latch.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/logic_sim/Makefile b/examples/graph/logic_sim/Makefile index e5a985a5019e7d42c816fca2758aa44eb9d34357..3841fd618b29a23897f9e43cc62a72fe04e72edb 100644 --- a/examples/graph/logic_sim/Makefile +++ b/examples/graph/logic_sim/Makefile @@ -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 @@ -34,6 +34,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/graph/logic_sim/Makefile.windows b/examples/graph/logic_sim/Makefile.windows index 5c162b63d3609b695e03772e676eccbe20edb265..971c2273c0c01930055876499ae20491afd927f1 100644 --- a/examples/graph/logic_sim/Makefile.windows +++ b/examples/graph/logic_sim/Makefile.windows @@ -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 diff --git a/examples/graph/logic_sim/basics.h b/examples/graph/logic_sim/basics.h index eeced8e222ed9b035fec44363a68e6d91f4c326c..60b2bcebbe343642f4a399b5eb7171f2fedd8f05 100644 --- a/examples/graph/logic_sim/basics.h +++ b/examples/graph/logic_sim/basics.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/logic_sim/four_bit_adder.h b/examples/graph/logic_sim/four_bit_adder.h index 026a3656e0fa155808d50f1bdbd8f2287caa1f68..7a5c0f6a96aab6ba1f1fe5b0d735f996808fe3ea 100644 --- a/examples/graph/logic_sim/four_bit_adder.h +++ b/examples/graph/logic_sim/four_bit_adder.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/logic_sim/index.html b/examples/graph/logic_sim/index.html index 56ed19fd3137a9dabecee12860e7ae5b6a02859b..65817cd490dadb6bd63eb78724cf0f6ba0727128 100644 --- a/examples/graph/logic_sim/index.html +++ b/examples/graph/logic_sim/index.html @@ -57,7 +57,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/logic_sim/one_bit_adder.h b/examples/graph/logic_sim/one_bit_adder.h index 5fc8703dde3b8e08c9bd213ebe7c792afcc60917..e9ca4cde72544879fb295235211d6e907d9a48f8 100644 --- a/examples/graph/logic_sim/one_bit_adder.h +++ b/examples/graph/logic_sim/one_bit_adder.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/logic_sim/test_all.cpp b/examples/graph/logic_sim/test_all.cpp index d81d55dfb349f9c1064477aca9e3ea140a495910..bbe13e68d3d3c5e4dbacdccfdd29b027a3788384 100644 --- a/examples/graph/logic_sim/test_all.cpp +++ b/examples/graph/logic_sim/test_all.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -51,7 +51,8 @@ int get_default_num_threads() { threads = tbb::task_scheduler_init::default_num_threads(); return threads; } -#endif + +#endif // __TBB_FLOW_GRAPH_CPP11_FEATURES int main(int argc, char *argv[]) { #if __TBB_FLOW_GRAPH_CPP11_FEATURES diff --git a/examples/graph/logic_sim/two_bit_adder.h b/examples/graph/logic_sim/two_bit_adder.h index ae86cd2a664255a9706f9bce45f8a989d57cd504..e1114047cd798dee2ccecb24931c350c48bba8fe 100644 --- a/examples/graph/logic_sim/two_bit_adder.h +++ b/examples/graph/logic_sim/two_bit_adder.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/som/Makefile b/examples/graph/som/Makefile index da4954c19c2a532b431bc82a92d3217a00f49d77..bc034d9ef58f5039f844d91a0e9a06cc6a21bdc2 100644 --- a/examples/graph/som/Makefile +++ b/examples/graph/som/Makefile @@ -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 @@ -33,6 +33,8 @@ SRCFILES = som_graph.cpp som.cpp ifeq ($(shell uname), Linux) LIBS+= -lrt +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/graph/som/Makefile.windows b/examples/graph/som/Makefile.windows index 06c4a640d7f74df73ec0c9f3a11e7cbd68c4788c..d3620768703e63ec3229a0314797125b6323d206 100644 --- a/examples/graph/som/Makefile.windows +++ b/examples/graph/som/Makefile.windows @@ -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 diff --git a/examples/graph/som/index.html b/examples/graph/som/index.html index fed4681e68551737d32e441a44842c9f7db6d8cf..0454e4227ecd11b457bc277e49d82241f87f1222 100644 --- a/examples/graph/som/index.html +++ b/examples/graph/som/index.html @@ -42,7 +42,7 @@ General build directions can be found here.
Up to parent directory

-Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/graph/som/som.cpp b/examples/graph/som/som.cpp index 895801f731161472b00c20d7c437e9189d838d52..9a787d8737ccc860fd289bee201008a9c090ee83 100644 --- a/examples/graph/som/som.cpp +++ b/examples/graph/som/som.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/som/som.h b/examples/graph/som/som.h index 1590db3af961aa562bb12aae539938c1b99a4efa..d8a426e44148be5988173acb0e68988238fc5bd3 100644 --- a/examples/graph/som/som.h +++ b/examples/graph/som/som.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/graph/som/som_graph.cpp b/examples/graph/som/som_graph.cpp index bf5e13f7e3f1f2bc858b0bdb89e0476fcf59e1d8..6515940bc803b949e136bf135ebc2fba9a914b72 100644 --- a/examples/graph/som/som_graph.cpp +++ b/examples/graph/som/som_graph.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/index.html b/examples/index.html index b947bcd138b0d2714481e2cbd67e70008a88d8d9..37f9e886d88c90248fcc673e4e4c2579b98b7f5e 100644 --- a/examples/index.html +++ b/examples/index.html @@ -41,6 +41,8 @@ method can be found below.
  • Build by using a Microsoft* Visual Studio* project (Windows* systems only).
  • Build by using a Xcode* IDE project (OS X* systems only).
  • Build by using a Makefile (Windows*, Linux* or OS X* systems). +
  • Build by using a Eclipse* IDE project (Windows* systems only). +
  • Build by using a Android* Studio* project (Windows* systems only).

    @@ -61,7 +63,7 @@ Perform the following steps:

  • Press <ctrl-F5> to build and run the example.
  • -
  • If you copied an example to another place separately from libraries you need to +
  • If you copied an example to another place separately from libraries you need to set %TBBROOT% variable pointing to <installdir> folder.
  • @@ -87,11 +89,11 @@ Perform the following steps: Perform the following steps:
    1. Open a shell window. For Windows* systems, make sure this shell window has the proper environment - defined for use with Microsoft* Visual Studio* (2005, 2008, 2010 or 2012); such a shell can be invoked + defined for use with Microsoft* Visual Studio* (2010, 2012, 2013 or 2015); such a shell can be invoked from the Start menu, under Visual Studio, Visual Studio Tools, Visual Studio Command Prompt.
    2. Set up the environment in this shell window for use with Intel TBB.
      See below for how to set up the environment for Windows*, Linux* or OS X* systems. -
    3. Unless you installed Intel TBB yourself, you may not have write permissions to the directory +
    4. Unless you installed Intel TBB yourself, you may not have write permissions to the directory containing the example. In this case, make a copy of the example, and use the copy for the following steps.
    5. In the shell window, navigate to the directory for the example (or to the directory for the copy of the example if you made one in the previous step). @@ -117,6 +119,43 @@ Perform the following steps:
    +

    To build by using a Eclipse* IDE project (Windows* systems only):

    +Perform the following steps: +
      +
    1. Launch Eclipse* IDE. Create a new Eclipse* workspace located in the Intel TBB root directory.
    2. +
    3. Perform the following steps to open a project you wish to build and run: +
        +
      1. Go to the "File -> Import" dialog and choose "Android -> Existing Android Code Into Workspace".
      2. +
      3. Fill in the "Root directory" field with the project folder path. +
        Note: To be built and run correctly, Intel TBB example project for Eclipse* IDE has to be located in %TBBROOT%\examples\<feature_name>\<example_name>\android folder.
      4. +
      5. Make sure the "Copy projects into workspace" option is unchecked.
      6. +
      7. Click "Finish".
      8. +
      +
    4. +
    5. Press <Ctrl-B> or use "Project -> Build All" or "Project -> Build Project" to build the example. +
      Note: Do not forget to set the "NDK location" in "Window -> Preferences -> Android -> NDK".
    6. +
    7. Use "Run -> Run Configurations" to create a new deployment configuration for your project. Choose "Android Application" configuration type and "Always prompt to pick device" target selection mode.
    8. +
    9. To run the example, press <Ctrl-F11> or use "Run -> Run" and select any compatible Android device.
    10. +
    + +

    To build by using a Android* Studio* project (Windows* systems only):

    +Perform the following steps: +
      +
    1. Launch Android* Studio* and open a project you wish to build and run by using one of the following methods: +
        +
      • In the "Welcome to Android Studio" window choose "Open an existing Android* Studio* Project" and navigate to the project folder;
      • +
      • In the IDE window use "File -> Open" dialog to navigate to and open the project.
      • +
      + Note: To be built and run correctly, Intel TBB example project for Android* Studio* has to be located in %TBBROOT%\examples\<feature_name>\<example_name>\android_as folder; +
      Also note that source files for Intel TBB example project for Android* Studio* are located in %TBBROOT%\examples\<feature_name>\<example_name>\android folder. +
    2. +
    3. Use "Tools -> Android -> Sync Project with Gradle Files" to synchronize your project with Gradle* build scripts. +
    4. Press <Shift-F9>, or use "Build -> Make project" to build the example. +
    5. Start any compatible Android* Virtual Device or plug in a real Android* device with the appropriate architecture. +
    6. Press <Shift-F10>, or use "Run -> Run 'app'" to run the example. +
    7. +
    +

    To set up the environment (Windows* systems):

    It is strongly recommended that the environment be set up when installing Intel TBB. Do this by selecting the appropriate check-box during the install. However, if the environment is not set up @@ -127,36 +166,40 @@ it may be set up, for a given type of shell window, by using one of the followin
    <installdir>\bin\tbbvars.bat (arch) (vs)
         where (arch) must be is one of the following
    -       ia32         : Set up for IA-32  architecture
    -       intel64      : Set up for Intel® 64  architecture
    -   (vs) should be one of the following
    -       vs2010      : Set to use with Microsoft Visual Studio 2010 runtime DLLs
    -       vs2012      : Set to use with Microsoft Visual Studio 2012 runtime DLLs
    -       vs2013      : Set to use with Microsoft Visual Studio 2013 runtime DLLs
    -       all         : Set to use TBB statically linked with Microsoft Visual C++ runtime
    -   if (vs) is not set TBB statically linked with Microsoft Visual C++ runtime will be used.
    +        ia32         : Set up for IA-32  architecture
    +        intel64      : Set up for Intel® 64  architecture
    +    (vs) should be one of the following
    +        vs2010       : Set to use with Microsoft Visual Studio 2010 runtime DLLs
    +        vs2012       : Set to use with Microsoft Visual Studio 2012 runtime DLLs
    +        vs2013       : Set to use with Microsoft Visual Studio 2013 runtime DLLs
    +        vs2015       : Set to use with Microsoft Visual Studio 2015 runtime DLLs
    +        all          : Set to use TBB statically linked with Microsoft Visual C++ runtime
    +    if (vs) is not set TBB statically linked with Microsoft Visual C++ runtime will be used.
     

    To set up the environment (Linux* or OS X* systems):

    The environment may be set up, for a given type of shell window, by using one of the following commands:
    -
    For sh, bash, ksh (or compatibles): -
    . <installdir>/bin/tbbvars.sh (arch) +
    For sh, bash, ksh, dash (or compatibles): +
    . <installdir>/bin/tbbvars.sh (arch) [platform [TBBROOT_detection_mode]]
    For csh (or compatibles): -
    source <installdir>/bin/tbbvars.csh (arch) +
    source <installdir>/bin/tbbvars.csh (arch) [platform [TBBROOT_detection_mode]]
    Notes:
    -
  • Choose one of {ia32,intel64} depending on the architecture to be used. +
  • (arch) argument represents target architecture. Its possible values are 'ia32' or 'intel64'. +
  • [platform] argument represents target platform. Its possible values are 'linux' or 'android'. +
  • [TBBROOT_detection_mode] argument represents TBBROOT path detection method. Its only possible value is 'auto_tbbroot'. In this case the environment variable TBBROOT is detected automatically by using the tbbvars script directory path.
  • Environment setup need only be performed once per shell window to be used.
  • Always source tbbvars.sh or tbbvars.csh rather than executing them directly. +
  • If the arguments to the sourced script are ignored (consult docs for your shell) the alternative way to specify target is environment variables COMPILERVARS_ARCHITECTURE to pass to the script and COMPILERVARS_PLATFORM to pass .

  • Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_do/index.html b/examples/parallel_do/index.html index ef1c3b540169a0c8b231cb74892071946686ae6b..f1179e1ac8bb669aef1a76ffaac282707481e779 100644 --- a/examples/parallel_do/index.html +++ b/examples/parallel_do/index.html @@ -13,7 +13,7 @@ This directory has examples of the template parallel_do.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_do/parallel_preorder/Graph.cpp b/examples/parallel_do/parallel_preorder/Graph.cpp index 8729a1c36815a8b742940dcff6192d3cf4ab4ebe..35c6955c23c01cf50961329b51b9ad5d941a6d5a 100644 --- a/examples/parallel_do/parallel_preorder/Graph.cpp +++ b/examples/parallel_do/parallel_preorder/Graph.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_do/parallel_preorder/Graph.h b/examples/parallel_do/parallel_preorder/Graph.h index 1369c3335af73a3f8686c608d39a50c5fffd2741..d9b385512617a3be97aa9562b8c724d226d42e63 100644 --- a/examples/parallel_do/parallel_preorder/Graph.h +++ b/examples/parallel_do/parallel_preorder/Graph.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_do/parallel_preorder/Makefile b/examples/parallel_do/parallel_preorder/Makefile index b76ece9a3c0992c6b07b621eea107fedfd165878..b51429697c3db819a8a83bbd151eebad9cb55fe9 100644 --- a/examples/parallel_do/parallel_preorder/Makefile +++ b/examples/parallel_do/parallel_preorder/Makefile @@ -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 @@ -35,6 +35,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/parallel_do/parallel_preorder/Makefile.windows b/examples/parallel_do/parallel_preorder/Makefile.windows index e0cb7ab487dfb4ccaad4d57e3e82117c92dcf759..a038368bbbe72368b6f5c8ae3a00c084bdefb854 100644 --- a/examples/parallel_do/parallel_preorder/Makefile.windows +++ b/examples/parallel_do/parallel_preorder/Makefile.windows @@ -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 diff --git a/examples/parallel_do/parallel_preorder/Matrix.h b/examples/parallel_do/parallel_preorder/Matrix.h index 9576512a67be7e7a7fdb929b7db786a55bc79fa6..8538e9b3511da88cc94b93d14ea35c76fa2f3739 100644 --- a/examples/parallel_do/parallel_preorder/Matrix.h +++ b/examples/parallel_do/parallel_preorder/Matrix.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_do/parallel_preorder/index.html b/examples/parallel_do/parallel_preorder/index.html index e94f16f6300fd5244a5d9b40d6dc94188d0dc419..ee849878abd3a0d7d88db5df9511e6f32dc160d9 100644 --- a/examples/parallel_do/parallel_preorder/index.html +++ b/examples/parallel_do/parallel_preorder/index.html @@ -88,7 +88,7 @@ General build directions can be found here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_do/parallel_preorder/main.cpp b/examples/parallel_do/parallel_preorder/main.cpp index 0fe20b289e06e8a1d9660fd0b16899dfed633cf8..9fe983dddf1ff05cb20e42f1e745f1f07e403410 100644 --- a/examples/parallel_do/parallel_preorder/main.cpp +++ b/examples/parallel_do/parallel_preorder/main.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp index 197e691fc48ece2881a899507d25122a1a80f17d..edeb3d789e115e9c449d67a9c8940f7f859a7812 100644 --- a/examples/parallel_do/parallel_preorder/parallel_preorder.cpp +++ b/examples/parallel_do/parallel_preorder/parallel_preorder.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/Makefile b/examples/parallel_for/game_of_life/Makefile index df52391f47749cdaec2334837275aa8bc20ddd56..7cc387a3334c3dd2c81a66287f4ace0449f927e1 100644 --- a/examples/parallel_for/game_of_life/Makefile +++ b/examples/parallel_for/game_of_life/Makefile @@ -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 @@ -32,6 +32,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/parallel_for/game_of_life/Makefile.windows b/examples/parallel_for/game_of_life/Makefile.windows index d22cb6fd5843af29822d312c46785f4822a99ade..431f5a670d4b68e32a8f1784b10a1a2393322915 100644 --- a/examples/parallel_for/game_of_life/Makefile.windows +++ b/examples/parallel_for/game_of_life/Makefile.windows @@ -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 diff --git a/examples/parallel_for/game_of_life/index.html b/examples/parallel_for/game_of_life/index.html index 7fb36bdd87d491c99d18adb6aa67f44de6727b66..33cb733edebc3a8bdb6873f1bb3571b3318aef39 100644 --- a/examples/parallel_for/game_of_life/index.html +++ b/examples/parallel_for/game_of_life/index.html @@ -43,7 +43,7 @@ For Windows* systems, Microsoft* Visual Studio* projects are provided for each o
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp b/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp index 7f3c96067d37d7187fe868d74559d8453528b618..beb99f7a46a5cd8dbb74282697d18c05d1d8d898 100644 --- a/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp +++ b/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Board.h b/examples/parallel_for/game_of_life/src/Board.h index aff6b562efc369ce32f5c33e7bc12f244075334c..4d2c19f2b4167ba93bc3c0967df3452d1bf39d8e 100644 --- a/examples/parallel_for/game_of_life/src/Board.h +++ b/examples/parallel_for/game_of_life/src/Board.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Evolution.cpp b/examples/parallel_for/game_of_life/src/Evolution.cpp index 603dceaef4294efa5a0c3ebb5bc2973f09e10c72..1e3b2c18933102092959060aaa04880d3b6124f6 100644 --- a/examples/parallel_for/game_of_life/src/Evolution.cpp +++ b/examples/parallel_for/game_of_life/src/Evolution.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Evolution.h b/examples/parallel_for/game_of_life/src/Evolution.h index 99280b8d9aca22739d5d68656694ffe5a01f958e..d03cc1639109e330c522d8c456e2f6fe8a9a1a5d 100644 --- a/examples/parallel_for/game_of_life/src/Evolution.h +++ b/examples/parallel_for/game_of_life/src/Evolution.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Form1.h b/examples/parallel_for/game_of_life/src/Form1.h index 976b05333fb47b497193914b9339c8c431c489f4..4add8dbab31f24281df1ce03f8a4bd954d4774b7 100644 --- a/examples/parallel_for/game_of_life/src/Form1.h +++ b/examples/parallel_for/game_of_life/src/Form1.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Game_of_life.cpp b/examples/parallel_for/game_of_life/src/Game_of_life.cpp index 80b86ed8eeba128e78712da4ff930110f4ae9c18..296f5771417cc61f81db691cd745e84503f420c1 100644 --- a/examples/parallel_for/game_of_life/src/Game_of_life.cpp +++ b/examples/parallel_for/game_of_life/src/Game_of_life.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/game_of_life/src/Update_state.cpp b/examples/parallel_for/game_of_life/src/Update_state.cpp index e64056717aba91a8349367749137b53f2361249a..9b10e15c054a33a58c810668ea5ba12f21f91633 100644 --- a/examples/parallel_for/game_of_life/src/Update_state.cpp +++ b/examples/parallel_for/game_of_life/src/Update_state.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/index.html b/examples/parallel_for/index.html index 8df0cd140642b5d64d6d8a2a9c86ab0846e93627..ee842ddd6d9f0170e646dfe0384016d79c86a343 100644 --- a/examples/parallel_for/index.html +++ b/examples/parallel_for/index.html @@ -19,7 +19,7 @@ This directory has examples of the template parallel_for.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_for/polygon_overlay/Makefile b/examples/parallel_for/polygon_overlay/Makefile index 76ada47d153a643a9326da75b2b55c62465e28cf..549a723b45f7fa99c8c47c85119645e4314b9823 100644 --- a/examples/parallel_for/polygon_overlay/Makefile +++ b/examples/parallel_for/polygon_overlay/Makefile @@ -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 @@ -38,6 +38,8 @@ SRCFILES = ../../common/gui/$(UI)video.cpp pover_video.cpp polymain.cpp polyover ifeq ($(shell uname), Linux) LIBS+= -lrt +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test @@ -45,7 +47,7 @@ all: release test resources: ifeq ($(UI),mac) mkdir -p $(APPRES)/en.lproj $(NAME).app/Contents/MacOS - cp ../../common/gui/xcode/tbbExample/Info.plist $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/tbbExample-Info.plist $(NAME).app/Contents/Info.plist cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME).app/Contents cp ../../common/gui/xcode/tbbExample/en.lproj/* $(APPRES)/en.lproj endif # OS X* diff --git a/examples/parallel_for/polygon_overlay/Makefile.windows b/examples/parallel_for/polygon_overlay/Makefile.windows index 972d9c1fdc754df59feb0bc7a5d360c3d362eaca..a77f46244757252714ae11bbcb80f8cedd79d16e 100644 --- a/examples/parallel_for/polygon_overlay/Makefile.windows +++ b/examples/parallel_for/polygon_overlay/Makefile.windows @@ -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 diff --git a/examples/parallel_for/polygon_overlay/index.html b/examples/parallel_for/polygon_overlay/index.html index 262eaa10b580f2a4d45635ddda06f72d444338ef..c1b2b66528c3cb0a3b9ba806ef0acaad81610d06 100644 --- a/examples/parallel_for/polygon_overlay/index.html +++ b/examples/parallel_for/polygon_overlay/index.html @@ -111,7 +111,7 @@ named pover.exe. To run these executables directly, use one or more of the foll
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_for/polygon_overlay/polymain.cpp b/examples/parallel_for/polygon_overlay/polymain.cpp index 60f8ec446e44aa1735d9d1f807bbc57f79b3bca8..75a9f624e1d81dcfed59033738efe76f38af8a12 100644 --- a/examples/parallel_for/polygon_overlay/polymain.cpp +++ b/examples/parallel_for/polygon_overlay/polymain.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/polymain.h b/examples/parallel_for/polygon_overlay/polymain.h index 86e4b50b882538f07b884f0a01a574b29e316510..aad9285a2207f82ca311c36477a7206466379575 100644 --- a/examples/parallel_for/polygon_overlay/polymain.h +++ b/examples/parallel_for/polygon_overlay/polymain.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/polyover.cpp b/examples/parallel_for/polygon_overlay/polyover.cpp index 8f9c6dd7978866376deb99ea42eb256daa920e32..71232ad8466a74dd423ee51a96a6fd1b2156dba6 100644 --- a/examples/parallel_for/polygon_overlay/polyover.cpp +++ b/examples/parallel_for/polygon_overlay/polyover.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/polyover.h b/examples/parallel_for/polygon_overlay/polyover.h index 477f141ee7d84a52fe26d3e550667d85bd5a61c3..12feba71824e1a706cbe35384c4b59ef2835c68b 100644 --- a/examples/parallel_for/polygon_overlay/polyover.h +++ b/examples/parallel_for/polygon_overlay/polyover.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/pover_global.h b/examples/parallel_for/polygon_overlay/pover_global.h index bbf30ffc36e9ac21746dec7d3f6abc15a5658534..ad72e73905966404eb732276daa77c13538b802d 100644 --- a/examples/parallel_for/polygon_overlay/pover_global.h +++ b/examples/parallel_for/polygon_overlay/pover_global.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/pover_video.cpp b/examples/parallel_for/polygon_overlay/pover_video.cpp index fb1d2050a614e468df87f38a1277724d94c30baa..d306f713f562e804b0a4b5d9a94fe4e96150d2dc 100644 --- a/examples/parallel_for/polygon_overlay/pover_video.cpp +++ b/examples/parallel_for/polygon_overlay/pover_video.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/pover_video.h b/examples/parallel_for/polygon_overlay/pover_video.h index 7906359f459737fbd2f1b744c29125965703acba..587d4be0ab20a79d316fe0940a3615173220db0f 100644 --- a/examples/parallel_for/polygon_overlay/pover_video.h +++ b/examples/parallel_for/polygon_overlay/pover_video.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/rpolygon.h b/examples/parallel_for/polygon_overlay/rpolygon.h index f34ab7d16e62cd68ab3272e6d75dd497aa166407..2d62c211c0d624eea5d3ca6988967985ab7ba9c2 100644 --- a/examples/parallel_for/polygon_overlay/rpolygon.h +++ b/examples/parallel_for/polygon_overlay/rpolygon.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj index 4ada99960b8c0ab1396bb048ca04d21d7870da49..1b4eca95fb8221a198364ffe3eab3e9abc3884e6 100644 --- a/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj +++ b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj @@ -7,8 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 84011603152CB4AD00B07E4D /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */; }; - 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; @@ -21,11 +19,23 @@ 84B8DAAE152CB05200D59B95 /* pover_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA9152CB05200D59B95 /* pover_video.cpp */; }; 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; + D31F32621C11DEE000A77D54 /* polymain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA4152CB05200D59B95 /* polymain.cpp */; }; + D31F32631C11DEE300A77D54 /* polyover.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA6152CB05200D59B95 /* polyover.cpp */; }; + D31F32641C11DEE700A77D54 /* pover_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA9152CB05200D59B95 /* pover_video.cpp */; }; + D31F32651C11DEEC00A77D54 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + D31F32661C11DEF000A77D54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + D31F32671C11DEF300A77D54 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + D31F32681C11DEF600A77D54 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + D31F326B1C11DF6000A77D54 /* iOS.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D31F32691C11DF1600A77D54 /* iOS.storyboard */; }; + D31F32881C12DFFA00A77D54 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F326C1C11DF7C00A77D54 /* libtbb.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F32891C12E00100A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F326D1C11DF7C00A77D54 /* libtbbmalloc.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F328A1C12E07100A77D54 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32821C12DFDD00A77D54 /* libtbb.dylib */; }; + D31F328B1C12E07100A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32831C12DFDD00A77D54 /* libtbbmalloc.dylib */; }; + D31F328C1C12E08200A77D54 /* libtbb.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32821C12DFDD00A77D54 /* libtbb.dylib */; }; + D31F328D1C12E08900A77D54 /* libtbbmalloc.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32831C12DFDD00A77D54 /* libtbbmalloc.dylib */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = ""; }; - 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; @@ -49,6 +59,12 @@ 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + D31F324B1C11DEC100A77D54 /* tbbExample.ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.ios.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D31F32691C11DF1600A77D54 /* iOS.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = iOS.storyboard; path = ../iOS.storyboard; sourceTree = ""; }; + D31F326C1C11DF7C00A77D54 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + D31F326D1C11DF7C00A77D54 /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = ""; }; + D31F32821C12DFDD00A77D54 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/ios/libtbb.dylib; sourceTree = ""; }; + D31F32831C12DFDD00A77D54 /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/ios/libtbbmalloc.dylib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,9 +73,18 @@ buildActionMask = 2147483647; files = ( 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, + D31F32891C12E00100A77D54 /* libtbbmalloc.dylib in Frameworks */, 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, - 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, - 84011603152CB4AD00B07E4D /* libtbbmalloc.dylib in Frameworks */, + D31F32881C12DFFA00A77D54 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D31F32481C11DEC100A77D54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F328A1C12E07100A77D54 /* libtbb.dylib in Frameworks */, + D31F328B1C12E07100A77D54 /* libtbbmalloc.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,6 +111,7 @@ 84B8DA7B152CA97B00D59B95 /* Resources */ = { isa = PBXGroup; children = ( + D31F32691C11DF1600A77D54 /* iOS.storyboard */, 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, ); @@ -120,6 +146,7 @@ isa = PBXGroup; children = ( 84D017511527431F0008A4E0 /* tbbExample.app */, + D31F324B1C11DEC100A77D54 /* tbbExample.ios.app */, ); name = Products; sourceTree = ""; @@ -127,6 +154,10 @@ 84D017541527431F0008A4E0 /* Frameworks */ = { isa = PBXGroup; children = ( + D31F326C1C11DF7C00A77D54 /* libtbb.dylib */, + D31F326D1C11DF7C00A77D54 /* libtbbmalloc.dylib */, + D31F32821C12DFDD00A77D54 /* libtbb.dylib */, + D31F32831C12DFDD00A77D54 /* libtbbmalloc.dylib */, 84D01775152744BD0008A4E0 /* OpenGL.framework */, 84D017551527431F0008A4E0 /* Cocoa.framework */, 84D017571527431F0008A4E0 /* Other Frameworks */, @@ -137,8 +168,6 @@ 84D017571527431F0008A4E0 /* Other Frameworks */ = { isa = PBXGroup; children = ( - 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */, - 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, 84D017581527431F0008A4E0 /* AppKit.framework */, 84D017591527431F0008A4E0 /* CoreData.framework */, 84D0175A1527431F0008A4E0 /* Foundation.framework */, @@ -166,6 +195,23 @@ productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; productType = "com.apple.product-type.application"; }; + D31F324A1C11DEC100A77D54 /* tbbExample.ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = D31F325F1C11DEC100A77D54 /* Build configuration list for PBXNativeTarget "tbbExample.ios" */; + buildPhases = ( + D31F32471C11DEC100A77D54 /* Sources */, + D31F32481C11DEC100A77D54 /* Frameworks */, + D31F32491C11DEC100A77D54 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample.ios; + productName = tbbExample.ios; + productReference = D31F324B1C11DEC100A77D54 /* tbbExample.ios.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -173,7 +219,13 @@ isa = PBXProject; attributes = { CLASSPREFIX = tbb; - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0710; + TargetAttributes = { + D31F324A1C11DEC100A77D54 = { + CreatedOnToolsVersion = 7.1.1; + DevelopmentTeam = 7J8M3RM94C; + }; + }; }; buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "polygon_overlay" */; compatibilityVersion = "Xcode 3.2"; @@ -181,6 +233,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 84D017461527431F0008A4E0; productRefGroup = 84D017521527431F0008A4E0 /* Products */; @@ -188,6 +241,7 @@ projectRoot = ""; targets = ( 84D017501527431F0008A4E0 /* tbbExample */, + D31F324A1C11DEC100A77D54 /* tbbExample.ios */, ); }; /* End PBXProject section */ @@ -203,6 +257,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D31F32491C11DEC100A77D54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F328D1C12E08900A77D54 /* libtbbmalloc.dylib in Resources */, + D31F328C1C12E08200A77D54 /* libtbb.dylib in Resources */, + D31F326B1C11DF6000A77D54 /* iOS.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -220,6 +284,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D31F32471C11DEC100A77D54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F32641C11DEE700A77D54 /* pover_video.cpp in Sources */, + D31F32631C11DEE300A77D54 /* polyover.cpp in Sources */, + D31F32651C11DEEC00A77D54 /* macvideo.cpp in Sources */, + D31F32681C11DEF600A77D54 /* tbbAppDelegate.m in Sources */, + D31F32621C11DEE000A77D54 /* polymain.cpp in Sources */, + D31F32661C11DEF000A77D54 /* main.m in Sources */, + D31F32671C11DEF300A77D54 /* OpenGLView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -246,12 +324,21 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -261,9 +348,10 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -273,18 +361,27 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; SDKROOT = macosx; }; name = Release; @@ -293,6 +390,8 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; + COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -311,6 +410,8 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; + COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -328,6 +429,68 @@ }; name = Release; }; + D31F32601C11DEC100A77D54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "__TBB_IOS=1", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + D31F32611C11DEC100A77D54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + GCC_PREPROCESSOR_DEFINITIONS = "__TBB_IOS=1"; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -349,6 +512,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D31F325F1C11DEC100A77D54 /* Build configuration list for PBXNativeTarget "tbbExample.ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D31F32601C11DEC100A77D54 /* Debug */, + D31F32611C11DEC100A77D54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 84D017481527431F0008A4E0 /* Project object */; diff --git a/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..5516b613983ca3b3e550471be9d5f1ea50d02259 --- /dev/null +++ b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme index 37d4ac6bf59451ae9fbf58efb7e22e675e1182a4..5c1312f40a8b56626f859008466c8f2f921c871e 100644 --- a/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme +++ b/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme @@ -1,5 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -37,18 +38,22 @@ ReferencedContainer = "container:polygon_overlay.xcodeproj"> + + - + - + Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_for/seismic/main.cpp b/examples/parallel_for/seismic/main.cpp index f776a6df5a2190cc713a9be05bdf9f54d7a546dd..fe03241197de0c13e994ecbdfa03d2433d7f3dca 100644 --- a/examples/parallel_for/seismic/main.cpp +++ b/examples/parallel_for/seismic/main.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/seismic/seismic_video.cpp b/examples/parallel_for/seismic/seismic_video.cpp index 50c978f9cabfea7ec9ef61e6c07907fdfdbf4b26..d22c0bc1ffe5c2b3309511bf21fbb30fc3ef60a1 100644 --- a/examples/parallel_for/seismic/seismic_video.cpp +++ b/examples/parallel_for/seismic/seismic_video.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/seismic/seismic_video.h b/examples/parallel_for/seismic/seismic_video.h index 4197cd71154714fc04e45dd81c56b7008e8f4277..6849976622058f22d5166376c54aa8cc761bee5d 100644 --- a/examples/parallel_for/seismic/seismic_video.h +++ b/examples/parallel_for/seismic/seismic_video.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/seismic/universe.cpp b/examples/parallel_for/seismic/universe.cpp index dc5e27acba1ecd678108a273acbbc3da12418fc2..e08b5f06c13bb6146fa7e87633bde0d094db7f3c 100644 --- a/examples/parallel_for/seismic/universe.cpp +++ b/examples/parallel_for/seismic/universe.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/seismic/universe.h b/examples/parallel_for/seismic/universe.h index ff1a79ac9351faeb8a2df333f29f3e77db73bd45..3a8ec3fa9617ae50cc9ab1d5db682daaba762b58 100644 --- a/examples/parallel_for/seismic/universe.h +++ b/examples/parallel_for/seismic/universe.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj index ff394654c24038fa3011aae6ec2ecc8942fc2c28..c0ba5eb9042ad71f8df441846f9690213092ff40 100644 --- a/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj +++ b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj @@ -7,8 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; - 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; 84B8DA7A152CA90100D59B95 /* (null) in Resources */ = {isa = PBXBuildFile; }; @@ -17,14 +16,29 @@ 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA82152CA99C00D59B95 /* main.cpp */; }; 84B8DA88152CA99C00D59B95 /* seismic_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */; }; 84B8DA89152CA99C00D59B95 /* universe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA85152CA99C00D59B95 /* universe.cpp */; }; - 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; + D31F32771C12DEA300A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3BD96991C0DDB8700163D8B /* libtbbmalloc.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F327E1C12DF3D00A77D54 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32781C12DEE000A77D54 /* libtbb.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F327F1C12DF3D00A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32791C12DEE000A77D54 /* libtbbmalloc.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F32801C12DF5200A77D54 /* libtbb.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32781C12DEE000A77D54 /* libtbb.dylib */; }; + D31F32811C12DF5900A77D54 /* libtbbmalloc.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32791C12DEE000A77D54 /* libtbbmalloc.dylib */; }; + D3BD96921C0DD55E00163D8B /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA82152CA99C00D59B95 /* main.cpp */; }; + D3BD96931C0DD56900163D8B /* seismic_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */; }; + D3BD96941C0DD57600163D8B /* universe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA85152CA99C00D59B95 /* universe.cpp */; }; + D3BD96951C0DD59200163D8B /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + D3BD96961C0DD5A000163D8B /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + D3BD96971C0DD5A900163D8B /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + D3BD96A31C0DE2BB00163D8B /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + D3BD96A61C0DE3DE00163D8B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D3BD96A51C0DE3DE00163D8B /* main.m */; }; + D3BD96AB1C0E08E500163D8B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D3BD96A51C0DE3DE00163D8B /* main.m */; }; + D3BD96B31C0E0AFE00163D8B /* tbbExample-Info.ios.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3BD966D1C0DD00400163D8B /* tbbExample-Info.ios.plist */; }; + D3BD96B51C0E0B2200163D8B /* tbbExample-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = D3BD96B41C0E0B2200163D8B /* tbbExample-Info.plist */; }; + D3BD96B81C0E11CE00163D8B /* iOS.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D3BD96B61C0E11C600163D8B /* iOS.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; - 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbbAppDelegate.h; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.h; sourceTree = ""; }; @@ -44,6 +58,14 @@ 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + D31F32781C12DEE000A77D54 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/ios/libtbb.dylib; sourceTree = ""; }; + D31F32791C12DEE000A77D54 /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/ios/libtbbmalloc.dylib; sourceTree = ""; }; + D3BD966D1C0DD00400163D8B /* tbbExample-Info.ios.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "tbbExample-Info.ios.plist"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; sourceTree = ""; }; + D3BD96991C0DDB8700163D8B /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = ""; }; + D3BD96A51C0DE3DE00163D8B /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; + D3BD96B41C0E0B2200163D8B /* tbbExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "tbbExample-Info.plist"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; sourceTree = ""; }; + D3BD96B61C0E11C600163D8B /* iOS.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = iOS.storyboard; path = ../iOS.storyboard; sourceTree = ""; }; + D3BD96BB1C0E19E700163D8B /* tbbExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,29 +76,40 @@ 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + D31F32771C12DEA300A77D54 /* libtbbmalloc.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D3BD96571C0DD00400163D8B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F327E1C12DF3D00A77D54 /* libtbb.dylib in Frameworks */, + D31F327F1C12DF3D00A77D54 /* libtbbmalloc.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 84B8DA6C152CA8D900D59B95 /* tbbExample */ = { + 84B8DA6C152CA8D900D59B95 /* tbbExample Sources */ = { isa = PBXGroup; children = ( - 84B8DA98152CAD8600D59B95 /* Gui layer */, 84B8DA7B152CA97B00D59B95 /* Resources */, 84B8DA82152CA99C00D59B95 /* main.cpp */, + D3BD96A51C0DE3DE00163D8B /* main.m */, 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */, 84B8DA84152CA99C00D59B95 /* seismic_video.h */, 84B8DA85152CA99C00D59B95 /* universe.cpp */, 84B8DA86152CA99C00D59B95 /* universe.h */, ); - name = tbbExample; + name = "tbbExample Sources"; sourceTree = ""; }; 84B8DA7B152CA97B00D59B95 /* Resources */ = { isa = PBXGroup; children = ( + D3BD96B61C0E11C600163D8B /* iOS.storyboard */, 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, ); @@ -88,7 +121,6 @@ isa = PBXGroup; children = ( 84B8DA99152CADF400D59B95 /* macvideo.cpp */, - 84B8DA6F152CA90100D59B95 /* main.m */, 84B8DA70152CA90100D59B95 /* OpenGLView.h */, 84B8DA71152CA90100D59B95 /* OpenGLView.m */, 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */, @@ -101,7 +133,10 @@ 84D017461527431F0008A4E0 = { isa = PBXGroup; children = ( - 84B8DA6C152CA8D900D59B95 /* tbbExample */, + D3BD96B41C0E0B2200163D8B /* tbbExample-Info.plist */, + D3BD966D1C0DD00400163D8B /* tbbExample-Info.ios.plist */, + 84B8DA98152CAD8600D59B95 /* Gui layer */, + 84B8DA6C152CA8D900D59B95 /* tbbExample Sources */, 84D017541527431F0008A4E0 /* Frameworks */, 84D017521527431F0008A4E0 /* Products */, ); @@ -111,6 +146,7 @@ isa = PBXGroup; children = ( 84D017511527431F0008A4E0 /* tbbExample.app */, + D3BD96BB1C0E19E700163D8B /* tbbExample.app */, ); name = Products; sourceTree = ""; @@ -118,24 +154,19 @@ 84D017541527431F0008A4E0 /* Frameworks */ = { isa = PBXGroup; children = ( + 84D017591527431F0008A4E0 /* CoreData.framework */, + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, + D3BD96991C0DDB8700163D8B /* libtbbmalloc.dylib */, + D31F32781C12DEE000A77D54 /* libtbb.dylib */, + D31F32791C12DEE000A77D54 /* libtbbmalloc.dylib */, + 84D0175A1527431F0008A4E0 /* Foundation.framework */, + 84D017581527431F0008A4E0 /* AppKit.framework */, 84D01775152744BD0008A4E0 /* OpenGL.framework */, 84D017551527431F0008A4E0 /* Cocoa.framework */, - 84D017571527431F0008A4E0 /* Other Frameworks */, ); name = Frameworks; sourceTree = ""; }; - 84D017571527431F0008A4E0 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, - 84D017581527431F0008A4E0 /* AppKit.framework */, - 84D017591527431F0008A4E0 /* CoreData.framework */, - 84D0175A1527431F0008A4E0 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -156,6 +187,23 @@ productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; productType = "com.apple.product-type.application"; }; + D3BD96591C0DD00400163D8B /* tbbExample_ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = D3BD96841C0DD00500163D8B /* Build configuration list for PBXNativeTarget "tbbExample_ios" */; + buildPhases = ( + D3BD96561C0DD00400163D8B /* Sources */, + D3BD96571C0DD00400163D8B /* Frameworks */, + D3BD96581C0DD00400163D8B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample_ios; + productName = tbbExample_ios; + productReference = D3BD96BB1C0E19E700163D8B /* tbbExample.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -163,14 +211,21 @@ isa = PBXProject; attributes = { CLASSPREFIX = tbb; - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0710; + TargetAttributes = { + D3BD96591C0DD00400163D8B = { + CreatedOnToolsVersion = 7.1.1; + DevelopmentTeam = 7J8M3RM94C; + }; + }; }; - buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tbbExample" */; + buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "seismic" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 84D017461527431F0008A4E0; productRefGroup = 84D017521527431F0008A4E0 /* Products */; @@ -178,6 +233,7 @@ projectRoot = ""; targets = ( 84D017501527431F0008A4E0 /* tbbExample */, + D3BD96591C0DD00400163D8B /* tbbExample_ios */, ); }; /* End PBXProject section */ @@ -187,12 +243,24 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + D3BD96B51C0E0B2200163D8B /* tbbExample-Info.plist in Resources */, 84B8DA7A152CA90100D59B95 /* (null) in Resources */, 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */, 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; + D3BD96581C0DD00400163D8B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F32811C12DF5900A77D54 /* libtbbmalloc.dylib in Resources */, + D31F32801C12DF5200A77D54 /* libtbb.dylib in Resources */, + D3BD96B81C0E11CE00163D8B /* iOS.storyboard in Resources */, + D3BD96B31C0E0AFE00163D8B /* tbbExample-Info.ios.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -200,13 +268,27 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 84B8DA77152CA90100D59B95 /* main.m in Sources */, 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */, 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */, 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */, + D3BD96A31C0DE2BB00163D8B /* macvideo.cpp in Sources */, 84B8DA88152CA99C00D59B95 /* seismic_video.cpp in Sources */, + D3BD96A61C0DE3DE00163D8B /* main.m in Sources */, 84B8DA89152CA99C00D59B95 /* universe.cpp in Sources */, - 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D3BD96561C0DD00400163D8B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D3BD96941C0DD57600163D8B /* universe.cpp in Sources */, + D3BD96921C0DD55E00163D8B /* main.cpp in Sources */, + D3BD96951C0DD59200163D8B /* macvideo.cpp in Sources */, + D3BD96931C0DD56900163D8B /* seismic_video.cpp in Sources */, + D3BD96971C0DD5A900163D8B /* tbbAppDelegate.m in Sources */, + D3BD96AB1C0E08E500163D8B /* main.m in Sources */, + D3BD96961C0DD5A000163D8B /* OpenGLView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -235,13 +317,23 @@ 84D01770152743200008A4E0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -251,9 +343,12 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; }; @@ -262,19 +357,31 @@ 84D01771152743200008A4E0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; SDKROOT = macosx; }; name = Release; @@ -283,12 +390,15 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; + COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = "Intel.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; RUN_CLANG_STATIC_ANALYZER = YES; USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -301,6 +411,8 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; + COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -309,7 +421,8 @@ "\"$(SRCROOT)/../../../../lib\"", "\"$(SRCROOT)\"", ); - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = "Intel.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; RUN_CLANG_STATIC_ANALYZER = YES; USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -318,10 +431,91 @@ }; name = Release; }; + D3BD96851C0DD00500163D8B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "__TBB_IOS=1", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = tbbExample; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + D3BD96861C0DD00500163D8B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "__TBB_IOS=1"; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = tbbExample; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tbbExample" */ = { + 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "seismic" */ = { isa = XCConfigurationList; buildConfigurations = ( 84D01770152743200008A4E0 /* Debug */, @@ -339,6 +533,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D3BD96841C0DD00500163D8B /* Build configuration list for PBXNativeTarget "tbbExample_ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D3BD96851C0DD00500163D8B /* Debug */, + D3BD96861C0DD00500163D8B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 84D017481527431F0008A4E0 /* Project object */; diff --git a/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..9975c8e38b50399d5fe4a9d1a42e91299a555ec1 --- /dev/null +++ b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme index 1dd33ab334cad0d622c275e4a98549e1d0378e97..21b8d6481b2e47fc7fea9d8cd823d511e0771f25 100644 --- a/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme +++ b/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme @@ -1,5 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -37,18 +38,22 @@ ReferencedContainer = "container:seismic.xcodeproj">
    + + - + - + - + \ No newline at end of file diff --git a/examples/parallel_for/tachyon/android/jni/Android.mk b/examples/parallel_for/tachyon/android/jni/Android.mk index 660c0d4b1efb5593df22f69ca9838662a4eab02e..748fccf887a8d9bc90d63fe3df6ff695f69430c6 100644 --- a/examples/parallel_for/tachyon/android/jni/Android.mk +++ b/examples/parallel_for/tachyon/android/jni/Android.mk @@ -1,4 +1,4 @@ -# Copyright 2005-2015 Intel Corporation. All Rights Reserved. +# Copyright 2005-2016 Intel Corporation. All Rights Reserved. # # The source code contained or described herein and all documents related # to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/android/jni/Application.mk b/examples/parallel_for/tachyon/android/jni/Application.mk index 0e24355d86e877e0409d3d4d5876cf3370ec37c5..e697b2d5dae2ed4ac988378afc12a832e35422eb 100644 --- a/examples/parallel_for/tachyon/android/jni/Application.mk +++ b/examples/parallel_for/tachyon/android/jni/Application.mk @@ -1,4 +1,4 @@ -# Copyright 2005-2015 Intel Corporation. All Rights Reserved. +# Copyright 2005-2016 Intel Corporation. All Rights Reserved. # # The source code contained or described herein and all documents related # to the source code ("Material") are owned by Intel Corporation or its @@ -19,5 +19,5 @@ APP_ABI:= all APP_STL:=gnustl_shared APP_GNUSTL_FORCE_CPP_FEATURES := exceptions rtti -APP_PLATFORM:=android-15 -NDK_TOOLCHAIN_VERSION:=4.6 +APP_PLATFORM:=android-19 +NDK_TOOLCHAIN_VERSION:=4.9 diff --git a/examples/parallel_for/tachyon/android/jni/jni-engine.cpp b/examples/parallel_for/tachyon/android/jni/jni-engine.cpp index 8a5df560a3e0bada2081e9f5f31e3291b395550f..ce55c7360e1f13f5504c1bafc57c505f4770a7e3 100644 --- a/examples/parallel_for/tachyon/android/jni/jni-engine.cpp +++ b/examples/parallel_for/tachyon/android/jni/jni-engine.cpp @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/android/project.properties b/examples/parallel_for/tachyon/android/project.properties index a3ee5ab64f5e1901414e83e26717725e035b2aae..4ab125693c7c484a0252ee7eca9616e0f9b1ac67 100644 --- a/examples/parallel_for/tachyon/android/project.properties +++ b/examples/parallel_for/tachyon/android/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-17 +target=android-19 diff --git a/examples/parallel_for/tachyon/android/src/com/intel/tbb/example/tachyon/tachyon.java b/examples/parallel_for/tachyon/android/src/com/intel/tbb/example/tachyon/tachyon.java index 9a3db5255d8caeebfcc8a83df4790ea38372a8e7..df6850bb9d43e6da2b584c233f96a1d501c8ef83 100644 --- a/examples/parallel_for/tachyon/android/src/com/intel/tbb/example/tachyon/tachyon.java +++ b/examples/parallel_for/tachyon/android/src/com/intel/tbb/example/tachyon/tachyon.java @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/android_as/app/build.gradle b/examples/parallel_for/tachyon/android_as/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..f64a2c96f57c164169a3777fe2b1d29291687111 --- /dev/null +++ b/examples/parallel_for/tachyon/android_as/app/build.gradle @@ -0,0 +1,67 @@ +/* + 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. +*/ + +apply plugin: 'com.android.model.application' + +model { + android { + compileSdkVersion = 23 + buildToolsVersion = "23.0.2" + + defaultConfig.with { + applicationId = "com.intel.tbb.example.tachyon" + minSdkVersion.apiLevel = 19 + targetSdkVersion.apiLevel = 23 + } + } + + android.sources { + main { + java { source { srcDir "../../android/src" } } + jniLibs { source { srcDir "../../android/libs" } } + assets { source { srcDir '../../android/assets' } } + res { source { srcDir "../../android/res" } } + manifest { source { srcDir "../../android" } } + } + } + + android.productFlavors { + create("x86") { + ndk.abiFilters.add("x86") + } + create("x86_64") { + ndk.abiFilters.add("x86_64") + } + } +} + +// to build native part of the project with a custom Android.mk call ndk-build.cmd +task ndkBuild(type: Exec) { + commandLine 'ndk-build.cmd', '-C', file('../../android').absolutePath +} + +// to automatically execute ndkBuild task add it to a common Java build task +tasks.withType(JavaCompile) { + compileTask -> compileTask.dependsOn ndkBuild +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) +} diff --git a/examples/parallel_for/tachyon/android_as/build.gradle b/examples/parallel_for/tachyon/android_as/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..c3a8a8680179a54efafef74963f16226e2dfea58 --- /dev/null +++ b/examples/parallel_for/tachyon/android_as/build.gradle @@ -0,0 +1,43 @@ +/* + 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. +*/ + +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle-experimental:0.4.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/examples/parallel_for/tachyon/android_as/settings.gradle b/examples/parallel_for/tachyon/android_as/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..6a157ca4849ea8442a664d24dc171be6a7b40b19 --- /dev/null +++ b/examples/parallel_for/tachyon/android_as/settings.gradle @@ -0,0 +1,21 @@ +/* + 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. +*/ + +include ':app' diff --git a/examples/parallel_for/tachyon/index.html b/examples/parallel_for/tachyon/index.html index b693f90739761dd5dde06f31bee8359d21f7224f..c16648d79e26fc59572cbf0717937e2eae0cf87e 100644 --- a/examples/parallel_for/tachyon/index.html +++ b/examples/parallel_for/tachyon/index.html @@ -5,7 +5,7 @@ Parallel raytracer / renderer that demonstrates the use of parallel_for.

    -This example includes software developed by John E. Stone. See +This example includes software developed by John E. Stone. See here for copyright information.

    @@ -27,11 +27,11 @@ The following versions of the example are provided:
    Parallel version that uses Intel® Threading Building Blocks (Intel® TBB) and blocked_range to parallelize over tasks that are groups of scan-lines.
      -
    • By default, this version uses one thread per available processor. To change this +
    • By default, this version uses one thread per available processor. To change this default, set the TBB_NUM_THREADS environment variable to the desired number of threads before running.
    • This version uses the preview feature: auto_range_partitioner. No grain size is provided to blocked_range. - The blocked_range class uses a default grain size of 1 when none is provided. However, the auto_range_partitioner - controls the amount of range splitting dynamically at runtime, resulting in sub-ranges of varying sizes. + The blocked_range class uses a default grain size of 1 when none is provided. However, the auto_range_partitioner + controls the amount of range splitting dynamically at runtime, resulting in sub-ranges of varying sizes.
    tbb
    Parallel version that uses Intel TBB and blocked_range2d to parallelize @@ -74,19 +74,21 @@ The following versions of the example are provided:
    dat
    Contains data sets for running the example.
    msvs -
    Contains Microsoft* Visual Studio* 2010 workspace for building and running the +
    Contains Microsoft* Visual Studio* 2010 workspace for building and running the example (Windows* systems only).
    xcode -
    Contains Xcode* IDE workspace for building and running the example (OS X* +
    Contains Xcode* IDE workspace for building and running the example (OS X* systems only). -android -
    Contains Eclipse* IDE workspace for building and running the example on Android* system. JNI part needs to be compiled by Android NDK. - +
    android +
    Contains Eclipse* IDE workspace for building and running the example on Android* system. JNI part needs to be compiled by Android NDK. +
    android_as +
    Contains project for building and running the example using Android* Studio* 1.5 and higher + with Android* NDK bundle and experimental Gradle* plugin 0.4.0.

    To Build

    General build directions can be found here.

    -For Windows* systems Microsoft* Visual Studio* projects are provided for each of the above +For Windows* systems Microsoft* Visual Studio* projects are provided for each of the above example versions.

    @@ -132,7 +134,7 @@ named tachyon.<version>.exe. To run these executables dir
    tachyon.<version> -h
    Prints the help for command line options
    tachyon.<version> [dataset=value] [boundthresh=value] [no-display-updating] [nobounding] [silent] -
    tachyon.<version> [dataset [boundthresh]] [no-display-updating] [nobounding] [silent] +
    tachyon.<version> [dataset [boundthresh]] [no-display-updating] [nobounding] [silent]
    dataset is the path/name of one of the *.dat files in the dat directory for the example.
    boundthresh is a bounding threshold value.
    no-display-updating - disable run-time display updating.
    @@ -172,7 +174,7 @@ While running with the GUI display turned on the following keyboard keys can be
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp b/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp index c07773aa3d7a207b3d401837258eeae9922145c7..0450c3c462512e712cbd538ed8053216fa81dc47 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp +++ b/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h b/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h index 3cafe318a484750e736c147ac3da6475088fab48..0d1352de767e158c5e80bad789c0ba736611326c 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h +++ b/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.cpp b/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.cpp index b97f3bafe73f2043ce42c3025309d3b0efc6bb39..619db14ddc273be29c61802be17aef15a61f66a9 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.cpp +++ b/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.cpp @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.h b/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.h index 26807ca514509145e6ab4fd88d4e9600cb910887..6cb077647ad78a806b9c4cf72ff64a8bd56aaac4 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.h +++ b/examples/parallel_for/tachyon/msvs/win8ui/DirectXBase.h @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp b/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp index 2729d6932c14978706787278a3584244e775d909..3c08ffa63d77d2bae731946232e25a3369eef8cf 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp +++ b/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h b/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h index 2c42581486d2b60112e72bd3320f768bde93dfec..d16f1642df9ec3dd7ad4485a801ab6d41e1c7abd 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h +++ b/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/copy_libraries_and_assets.bat b/examples/parallel_for/tachyon/msvs/win8ui/copy_libraries_and_assets.bat index ef2aa7c8cf9552c026f2f5b5831a58a0057a5778..dc90411917282eba719eaf58a15b4340c3dfb586 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/copy_libraries_and_assets.bat +++ b/examples/parallel_for/tachyon/msvs/win8ui/copy_libraries_and_assets.bat @@ -1,6 +1,6 @@ @echo on REM -REM Copyright 2005-2015 Intel Corporation. All Rights Reserved. +REM Copyright 2005-2016 Intel Corporation. All Rights Reserved. REM REM The source code contained or described herein and all documents related REM to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/pch.h b/examples/parallel_for/tachyon/msvs/win8ui/pch.h index 9140a8f66b9f8970c3a3438c39ed3a325e832294..59cde67465df05dd06a94c2de2343aad18425e82 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/pch.h +++ b/examples/parallel_for/tachyon/msvs/win8ui/pch.h @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.cpp b/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.cpp index 0949ea69ab49e0658dff21e92cf258ebf4e9e94e..4c2093c9ee3a9510a8b5ffd294f8f21087222a2b 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.cpp +++ b/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.cpp @@ -1,5 +1,5 @@ /* -Copyright 2005-2015 Intel Corporation. All Rights Reserved. +Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h b/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h index 443138e1c38d0fd138a7355cd5d6471aa1dbbc74..58663bc7d8e74fed76f4f76028e382171080676f 100644 --- a/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h +++ b/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h @@ -1,5 +1,5 @@ /* - Copyright 2005-2015 Intel Corporation. All Rights Reserved. + Copyright 2005-2016 Intel Corporation. All Rights Reserved. The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its diff --git a/examples/parallel_for/tachyon/src/api.cpp b/examples/parallel_for/tachyon/src/api.cpp index ea2f57ccd07ec169bac1e30b0544381c46ec7260..1adb7c16447b4439bef8ac7473ee1bdf4f45f693 100644 --- a/examples/parallel_for/tachyon/src/api.cpp +++ b/examples/parallel_for/tachyon/src/api.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/api.h b/examples/parallel_for/tachyon/src/api.h index b27ead221a595a09b213a9ea7fe763bbe8725fef..70f9aab29a55b2e98ad2709fb393a57b954dd674 100644 --- a/examples/parallel_for/tachyon/src/api.h +++ b/examples/parallel_for/tachyon/src/api.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/apigeom.cpp b/examples/parallel_for/tachyon/src/apigeom.cpp index 12fd8c37536fbbdab6540148e0f2370ed7e7f501..db1839243d9149318b2d67641c6d69dd7de77d9b 100644 --- a/examples/parallel_for/tachyon/src/apigeom.cpp +++ b/examples/parallel_for/tachyon/src/apigeom.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/apitrigeom.cpp b/examples/parallel_for/tachyon/src/apitrigeom.cpp index 1d79ec039c5428996f5eea91831f9ba83c5d8fe2..62b0e7bc640a687acbef5e2946371a400eca8239 100644 --- a/examples/parallel_for/tachyon/src/apitrigeom.cpp +++ b/examples/parallel_for/tachyon/src/apitrigeom.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/apitrigeom.h b/examples/parallel_for/tachyon/src/apitrigeom.h index 48f0fd6e7a30523c3e98ce58042f2a14ee5acdd1..68148c8989dcd9993bde70df96d25268af72d59a 100644 --- a/examples/parallel_for/tachyon/src/apitrigeom.h +++ b/examples/parallel_for/tachyon/src/apitrigeom.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/bndbox.cpp b/examples/parallel_for/tachyon/src/bndbox.cpp index 2ef12ba1790d900352a9543729ec745f34d5aa2b..3529e5a557b7b986eebe9a91cfd999c1c6bf2c4b 100644 --- a/examples/parallel_for/tachyon/src/bndbox.cpp +++ b/examples/parallel_for/tachyon/src/bndbox.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/bndbox.h b/examples/parallel_for/tachyon/src/bndbox.h index 488e9bbf62963833250e8ea1c62043951c8124be..b48d7011e7be954fe15927fec0c2c0073cabe586 100644 --- a/examples/parallel_for/tachyon/src/bndbox.h +++ b/examples/parallel_for/tachyon/src/bndbox.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/box.cpp b/examples/parallel_for/tachyon/src/box.cpp index 70e28c32521a8c159b73f0b1f90ba5b5ac4ba24d..e116067f19017e7d6cc4c1a34f25dc525bd7a991 100644 --- a/examples/parallel_for/tachyon/src/box.cpp +++ b/examples/parallel_for/tachyon/src/box.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/box.h b/examples/parallel_for/tachyon/src/box.h index 607479064702a5e4b9cb36a83882b0ff93a13c31..35f8650a1938c2b6813bde020ecdfb235b978bf2 100644 --- a/examples/parallel_for/tachyon/src/box.h +++ b/examples/parallel_for/tachyon/src/box.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/camera.cpp b/examples/parallel_for/tachyon/src/camera.cpp index 60dcbc4c4b30cdb6469698ee16aee9924013b731..053175a684d0faf92b7409d255e03ea7fe74c6b0 100644 --- a/examples/parallel_for/tachyon/src/camera.cpp +++ b/examples/parallel_for/tachyon/src/camera.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/camera.h b/examples/parallel_for/tachyon/src/camera.h index 6b235bcef222ff2e746b0c58be1b9ecb3ce48366..dfb8a94e4b19036e2a72c15c913f2d4f0c059ee9 100644 --- a/examples/parallel_for/tachyon/src/camera.h +++ b/examples/parallel_for/tachyon/src/camera.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/coordsys.cpp b/examples/parallel_for/tachyon/src/coordsys.cpp index 537288b0e871e7056880bb9980d56be94e605168..c7e514e32e5535d64f8aa4763d491db2fb30cf5a 100644 --- a/examples/parallel_for/tachyon/src/coordsys.cpp +++ b/examples/parallel_for/tachyon/src/coordsys.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/coordsys.h b/examples/parallel_for/tachyon/src/coordsys.h index 3668d12a04f2cc2df29671a3e1ae75fa2a626e1b..0fb5f09d596f170d84b234f8e43a76c4af13d36a 100644 --- a/examples/parallel_for/tachyon/src/coordsys.h +++ b/examples/parallel_for/tachyon/src/coordsys.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/cylinder.cpp b/examples/parallel_for/tachyon/src/cylinder.cpp index 3590ee08b1da78652b7cd285977e8782e177d797..5423d97c799451f707488ff2ec7c56d90be50358 100644 --- a/examples/parallel_for/tachyon/src/cylinder.cpp +++ b/examples/parallel_for/tachyon/src/cylinder.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/cylinder.h b/examples/parallel_for/tachyon/src/cylinder.h index 4120ce5886d505a4c957aada3de6a74fca4c38a4..a3eba298235cb4ed7424c9ff73a0240394793b51 100644 --- a/examples/parallel_for/tachyon/src/cylinder.h +++ b/examples/parallel_for/tachyon/src/cylinder.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/extvol.cpp b/examples/parallel_for/tachyon/src/extvol.cpp index f9effd32a13b79abd348fbef6bcbbe2ddf8aa8cb..3e484e83d2ec2882e9d706d07b495ef4ef31817b 100644 --- a/examples/parallel_for/tachyon/src/extvol.cpp +++ b/examples/parallel_for/tachyon/src/extvol.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/extvol.h b/examples/parallel_for/tachyon/src/extvol.h index 66f83c0cd890bf95f46a66c2cb95bf1895ede60c..459c083a7ef4d18632fefabc7858417007f44148 100644 --- a/examples/parallel_for/tachyon/src/extvol.h +++ b/examples/parallel_for/tachyon/src/extvol.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/global.cpp b/examples/parallel_for/tachyon/src/global.cpp index 6ce462d35c5ae2af8d730336b0c0979bf50daef2..d7f5908c65329c2c7c042d6f8c12678fe1eba5ac 100644 --- a/examples/parallel_for/tachyon/src/global.cpp +++ b/examples/parallel_for/tachyon/src/global.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/global.h b/examples/parallel_for/tachyon/src/global.h index 847fb1d42324e6defcbbf211cb0c459e479cad0c..6337dc889fc7e87c8d994d30e96da3f127a9ac63 100644 --- a/examples/parallel_for/tachyon/src/global.h +++ b/examples/parallel_for/tachyon/src/global.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/grid.cpp b/examples/parallel_for/tachyon/src/grid.cpp index 1810caa51383c7a856ff9605186b2f49b774dd9c..2d28ed7f1015e4db1aaa5923204ebadfc5ab9545 100644 --- a/examples/parallel_for/tachyon/src/grid.cpp +++ b/examples/parallel_for/tachyon/src/grid.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/grid.h b/examples/parallel_for/tachyon/src/grid.h index edc295bfeb3b6d75b8f9a5eb83757c493e7d067a..dfb71a10b163498aba3fa80204a4aa8eb9b7a4ba 100644 --- a/examples/parallel_for/tachyon/src/grid.h +++ b/examples/parallel_for/tachyon/src/grid.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/imageio.cpp b/examples/parallel_for/tachyon/src/imageio.cpp index 8b07372c2c783efee277e5860146f9b027ec58f0..c5ec5e1cec13a7ae77c7138cf046b12e41d0fb97 100644 --- a/examples/parallel_for/tachyon/src/imageio.cpp +++ b/examples/parallel_for/tachyon/src/imageio.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/imageio.h b/examples/parallel_for/tachyon/src/imageio.h index b47b8e90646ac26459e3a29033bb43dee6cc8677..120b8f9b2d8f753639f45965f199566d3526ec86 100644 --- a/examples/parallel_for/tachyon/src/imageio.h +++ b/examples/parallel_for/tachyon/src/imageio.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/imap.cpp b/examples/parallel_for/tachyon/src/imap.cpp index b27f9bdbc33e11d5aef76e3eae96103fd09af831..a275ad629a2b55eae72fdf2314bdeffbdbbe76a2 100644 --- a/examples/parallel_for/tachyon/src/imap.cpp +++ b/examples/parallel_for/tachyon/src/imap.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/imap.h b/examples/parallel_for/tachyon/src/imap.h index 4f31acc4ab9a098bda4c89b601ec21d83af529cf..c072afc0db5e6b22e1e975b089577e8456610d94 100644 --- a/examples/parallel_for/tachyon/src/imap.h +++ b/examples/parallel_for/tachyon/src/imap.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/intersect.cpp b/examples/parallel_for/tachyon/src/intersect.cpp index 6545d64b1e2ddd8bb917d1beb718968e0a63d927..a6fb9ec42aed0915a2890f78a0d68720e45086a4 100644 --- a/examples/parallel_for/tachyon/src/intersect.cpp +++ b/examples/parallel_for/tachyon/src/intersect.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/intersect.h b/examples/parallel_for/tachyon/src/intersect.h index 0ec3e1ef01f0f81c48869d1daa0fb926d7d109b3..377105e145f95bae3728d3ce30820b63b5b483e6 100644 --- a/examples/parallel_for/tachyon/src/intersect.h +++ b/examples/parallel_for/tachyon/src/intersect.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/jpeg.cpp b/examples/parallel_for/tachyon/src/jpeg.cpp index 0c635c43826261e73228d69cc429bc2a1c960dd3..8044bb991b8d0755a767f04651c308820af7c50f 100644 --- a/examples/parallel_for/tachyon/src/jpeg.cpp +++ b/examples/parallel_for/tachyon/src/jpeg.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/jpeg.h b/examples/parallel_for/tachyon/src/jpeg.h index b4f2a6a823dbc5a9455a60f764b22a9ba30a8076..665c230112fd36029ecdf36e0901388cbd5f9731 100644 --- a/examples/parallel_for/tachyon/src/jpeg.h +++ b/examples/parallel_for/tachyon/src/jpeg.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/light.cpp b/examples/parallel_for/tachyon/src/light.cpp index 39fb164c508fa2e01ab7546ac6da61a9550c551e..252b10217c0957015a0160b65123ccac57fd15f3 100644 --- a/examples/parallel_for/tachyon/src/light.cpp +++ b/examples/parallel_for/tachyon/src/light.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/light.h b/examples/parallel_for/tachyon/src/light.h index 5e7e61a70328cc7c459963650a9fe15e4f5a4299..3d164302247f528c97e4eec3233e44d50e3083b4 100644 --- a/examples/parallel_for/tachyon/src/light.h +++ b/examples/parallel_for/tachyon/src/light.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/machine.h b/examples/parallel_for/tachyon/src/machine.h index 976a46176323ad99d01d554285ad603300ee5d94..92166bad78f953f4dbef6467e0edfacece4dc4d6 100644 --- a/examples/parallel_for/tachyon/src/machine.h +++ b/examples/parallel_for/tachyon/src/machine.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/macros.h b/examples/parallel_for/tachyon/src/macros.h index 47792b516d4c99e66517d0b4ab0ba6494bbc15ee..9c1c7963a3d75462b35800c492ee94e32b46a7e3 100644 --- a/examples/parallel_for/tachyon/src/macros.h +++ b/examples/parallel_for/tachyon/src/macros.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_for/tachyon/src/main.cpp b/examples/parallel_for/tachyon/src/main.cpp index fe0291493568661150f9c64aa482488090514301..b6f164030c8e49086eb43ea99b1f564710531c07 100644 --- a/examples/parallel_for/tachyon/src/main.cpp +++ b/examples/parallel_for/tachyon/src/main.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -172,6 +172,64 @@ unsigned int __stdcall example_main(void *) } } +#elif __TBB_IOS + +#include "tbb/tbb.h" +#include "CoreFoundation/CoreFoundation.h" +extern "C" void get_screen_resolution(int *x, int *y); + +int CreateScene() { + + CFURLRef balls_dat_url = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("balls"), CFSTR("dat"),NULL); + char filename[1024]; + CFURLGetFileSystemRepresentation(balls_dat_url, true, (UInt8*)filename, (CFIndex)sizeof(filename)); + CFRelease(balls_dat_url); + + global_scene = rt_newscene(); + rt_initialize(); + + if ( readmodel(filename, global_scene) != 0 ) { + rt_finalize(); + return -1; + } + + // need these early for create_graphics_window() so grab these here... + scenedef *scene = (scenedef *) global_scene; + + get_screen_resolution(&global_xsize, &global_ysize); + + // scene->hres and scene->vres should be equal to screen resolution + scene->hres = global_xwinsize = global_xsize; + scene->vres = global_ywinsize = global_ysize; + return 0; +} + +int main (int argc, char *argv[]) { + try { + + if ( CreateScene() != 0 ) return -1; + + tachyon_video tachyon; + tachyon.threaded = true; + tachyon.init_console(); + + global_usegraphics = tachyon.init_window(global_xwinsize, global_ywinsize); + if(!tachyon.running) return -1; + + //TODO: add a demo loop. + video = &tachyon; + if (video)video->running = true; + memset(g_pImg, 0, sizeof(unsigned int) * global_xsize * global_ysize); + tachyon.main_loop(); + video->running=false; + return NULL; + + } catch ( std::exception& e ) { + std::cerr<<"error occurred. error text is :\"" < + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -37,17 +38,21 @@ ReferencedContainer = "container:tachyon.xcodeproj"> + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme b/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme index ccd129c9964c18698f685a6df61e13932286d691..35c5eab8429cb5522b7776902453752a4cc375ad 100644 --- a/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme +++ b/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme @@ -1,5 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -37,18 +38,22 @@ ReferencedContainer = "container:tachyon.xcodeproj"> + + - + - + + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -37,18 +38,22 @@ ReferencedContainer = "container:tachyon.xcodeproj"> + + - + - + here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_reduce/index.html b/examples/parallel_reduce/index.html index 06eb06d2109a50033434f8134dfeebd8434f5afe..01236fa8a3bce056561b09dfb99a737232c8b288 100644 --- a/examples/parallel_reduce/index.html +++ b/examples/parallel_reduce/index.html @@ -15,7 +15,7 @@ This directory has examples of the template parallel_reduce.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_reduce/primes/Makefile b/examples/parallel_reduce/primes/Makefile index 04b4b54ca6ab3cfc3580f95e88136f8fb8c961a7..6dc7efe3cf09ccdd61b77e8374c3c829a0f53b85 100644 --- a/examples/parallel_reduce/primes/Makefile +++ b/examples/parallel_reduce/primes/Makefile @@ -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 @@ -44,6 +44,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/parallel_reduce/primes/Makefile.windows b/examples/parallel_reduce/primes/Makefile.windows index bd6328fe1210b0301ea23957b19da8de0a0727a2..302b061012897faac27a747208bf17906a7eaedf 100644 --- a/examples/parallel_reduce/primes/Makefile.windows +++ b/examples/parallel_reduce/primes/Makefile.windows @@ -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 diff --git a/examples/parallel_reduce/primes/index.html b/examples/parallel_reduce/primes/index.html index 40cb25600030c5671c0d41061a2428dd790e2894..34093ec339aeb68064b1f2a90036c560720ca25f 100644 --- a/examples/parallel_reduce/primes/index.html +++ b/examples/parallel_reduce/primes/index.html @@ -52,7 +52,7 @@ General build directions can be found here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/parallel_reduce/primes/main.cpp b/examples/parallel_reduce/primes/main.cpp index d400cbb170d88c155e47d93c4c40822298e0f62a..f5933b011ba63be0e9947627c5f263c62da7056f 100644 --- a/examples/parallel_reduce/primes/main.cpp +++ b/examples/parallel_reduce/primes/main.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_reduce/primes/primes.cpp b/examples/parallel_reduce/primes/primes.cpp index d5595091b1c15f4239c6071abf3f2fd94bfa85f1..c8f87cfb1d69937abfb635c54cd5b6263c783de3 100644 --- a/examples/parallel_reduce/primes/primes.cpp +++ b/examples/parallel_reduce/primes/primes.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/parallel_reduce/primes/primes.h b/examples/parallel_reduce/primes/primes.h index 901923b3f5f9894603d0b2179b2c0bf82bcd4e08..cb63f8af9e10dfa847fcc886ad796446c77d28c0 100644 --- a/examples/parallel_reduce/primes/primes.h +++ b/examples/parallel_reduce/primes/primes.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/pipeline/index.html b/examples/pipeline/index.html index 30e8e88f384402149c5f1edacb6d77ae4a0f9323..1be823c8bf36cd71ed66360ce586db4feea15a47 100644 --- a/examples/pipeline/index.html +++ b/examples/pipeline/index.html @@ -13,7 +13,7 @@ This directory has examples of the template pipeline.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/pipeline/square/Makefile b/examples/pipeline/square/Makefile index 744297aa74b34d88d7d7f70d7f1fcfd391f965ff..3c873203a37381a56ab821f787954b49b9ac72c8 100644 --- a/examples/pipeline/square/Makefile +++ b/examples/pipeline/square/Makefile @@ -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 @@ -36,6 +36,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/pipeline/square/Makefile.windows b/examples/pipeline/square/Makefile.windows index 2914ce78f9741c2770004d22308498499e284282..dc790bad19ffdfde9ea07e91b31e9180901d772e 100644 --- a/examples/pipeline/square/Makefile.windows +++ b/examples/pipeline/square/Makefile.windows @@ -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 diff --git a/examples/pipeline/square/gen_input.cpp b/examples/pipeline/square/gen_input.cpp index 122cf2eef5d85cdf76c097fbaee48457bbc16b22..0fd971ce4eb1a91798d8bfc587ba2428c9f4a09b 100644 --- a/examples/pipeline/square/gen_input.cpp +++ b/examples/pipeline/square/gen_input.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/pipeline/square/index.html b/examples/pipeline/square/index.html index 021ccff53b104106ae8c178e9a8358986520a594..0102676032af861eb619be1d5983966cd23f9831 100644 --- a/examples/pipeline/square/index.html +++ b/examples/pipeline/square/index.html @@ -61,7 +61,7 @@ Two additional targets for this example:
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/pipeline/square/square.cpp b/examples/pipeline/square/square.cpp index 016ffcef40b464b20090c0447d3fc5ee86779f8a..615c5864f0d66bd843c26cd712ca5c724808a8f9 100644 --- a/examples/pipeline/square/square.cpp +++ b/examples/pipeline/square/square.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/index.html b/examples/task/index.html index 7562e9ffe2df65f8fd05492bd4b1a386d2a556df..34fbc31fca69948180bbfbfb3d1d57053709f6d2 100644 --- a/examples/task/index.html +++ b/examples/task/index.html @@ -13,7 +13,7 @@ This directory has examples of how to use the raw task scheduler.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task/tree_sum/Makefile b/examples/task/tree_sum/Makefile index 88a4744c386a139273d1395a15ebfcc9a3fba022..49733a187c22ce12736dd6354f0dc5aedf53b3d0 100644 --- a/examples/task/tree_sum/Makefile +++ b/examples/task/tree_sum/Makefile @@ -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 @@ -34,6 +34,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/task/tree_sum/Makefile.windows b/examples/task/tree_sum/Makefile.windows index 9e551333932b4161be133ff4fd2d1055545e55ab..18fbd9704ce4940e2697cd132e42bcfd484b9dc2 100644 --- a/examples/task/tree_sum/Makefile.windows +++ b/examples/task/tree_sum/Makefile.windows @@ -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 diff --git a/examples/task/tree_sum/OptimizedParallelSumTree.cpp b/examples/task/tree_sum/OptimizedParallelSumTree.cpp index f9baa73d2cb2f23f44432d04401681dbf946ba63..dc3fdc851315c747d8a763579cecd8ffa1d76a57 100644 --- a/examples/task/tree_sum/OptimizedParallelSumTree.cpp +++ b/examples/task/tree_sum/OptimizedParallelSumTree.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/tree_sum/SerialSumTree.cpp b/examples/task/tree_sum/SerialSumTree.cpp index 6988d7a99193a0967a904467425e0fcf5187c2d7..1ab328045e081c7a21b07b9d7c2c6460715d646e 100644 --- a/examples/task/tree_sum/SerialSumTree.cpp +++ b/examples/task/tree_sum/SerialSumTree.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/tree_sum/SimpleParallelSumTree.cpp b/examples/task/tree_sum/SimpleParallelSumTree.cpp index 2de4f56afdee7b3df0d3800ad85f7b3b8996a53d..b029a7c906b84583b32b7c762ede44c802db860d 100644 --- a/examples/task/tree_sum/SimpleParallelSumTree.cpp +++ b/examples/task/tree_sum/SimpleParallelSumTree.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/tree_sum/TreeMaker.h b/examples/task/tree_sum/TreeMaker.h index 46bd0ced8cf8b358f9af29c50114fcde893216c6..921e0a00c4157c17a176e331b66af6831140ef07 100644 --- a/examples/task/tree_sum/TreeMaker.h +++ b/examples/task/tree_sum/TreeMaker.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/tree_sum/common.h b/examples/task/tree_sum/common.h index da23bb1b6d940037d1424352f96cd4ea8a9fc5f8..671d0b5c3fb15c01eb7d9279ac96108a48505a10 100644 --- a/examples/task/tree_sum/common.h +++ b/examples/task/tree_sum/common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task/tree_sum/index.html b/examples/task/tree_sum/index.html index ea3566371f5c3c3ea07879f58cb393910114877e..b3e5bdba47e7d644581714e50bce3ef9ea8052bb 100644 --- a/examples/task/tree_sum/index.html +++ b/examples/task/tree_sum/index.html @@ -65,7 +65,7 @@ General build directions can be found here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task/tree_sum/main.cpp b/examples/task/tree_sum/main.cpp index 513f9240d8ac9fb99a3b3656535638f32a4baff2..35082528d277dd5d1f0b3def9eb3005491a5765d 100644 --- a/examples/task/tree_sum/main.cpp +++ b/examples/task/tree_sum/main.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task_arena/fractal/Makefile b/examples/task_arena/fractal/Makefile index b4fdf48a544ef390a26a9e493a03af3c8cbb0ea4..9500929d1e1f324c2c17c56c20b49b533f1a6d85 100644 --- a/examples/task_arena/fractal/Makefile +++ b/examples/task_arena/fractal/Makefile @@ -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 @@ -29,6 +29,8 @@ endif # icc ifeq ($(shell uname), Linux) LIBS+= -lrt +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif include ../../common/gui/Makefile.gmake @@ -42,7 +44,7 @@ all: release test resources: ifeq ($(UI),mac) mkdir -p $(NAME).app/Contents/{MacOS,Resources/en.lproj} - cat ../../common/gui/xcode/tbbExample/Info.plist | sed -e "s/tbbExample/$(NAME)/" > $(NAME).app/Contents/Info.plist + cat ../../common/gui/xcode/tbbExample/tbbExample-Info.plist | sed -e "s/tbbExample/$(NAME)/" > $(NAME).app/Contents/Info.plist cat ../../common/gui/xcode/tbbExample/launcher.sh | sed -e "s/tbbExample/$(NAME)/" > $(NAME).app/Contents/MacOS/launcher.sh chmod +x $(NAME).app/Contents/MacOS/launcher.sh cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME).app/Contents diff --git a/examples/task_arena/fractal/Makefile.windows b/examples/task_arena/fractal/Makefile.windows index a443920c5628ef7feb987c90c6257d667b2940d6..c17938a76332a70473fe0fae6b6329219f4d43e9 100644 --- a/examples/task_arena/fractal/Makefile.windows +++ b/examples/task_arena/fractal/Makefile.windows @@ -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 diff --git a/examples/task_arena/fractal/fractal.cpp b/examples/task_arena/fractal/fractal.cpp index 03f02987ecd86c00cf9cd1452a8dfa35f13e3819..c66fd561188b4931f9cfc4ccefe3f9ed0b3e0f6f 100644 --- a/examples/task_arena/fractal/fractal.cpp +++ b/examples/task_arena/fractal/fractal.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task_arena/fractal/fractal.h b/examples/task_arena/fractal/fractal.h index 12f178eaf32f2282de7efd6f88a6d818d2f1ee14..b0408e03dc1f0ffce50934b912ff962191a2956d 100644 --- a/examples/task_arena/fractal/fractal.h +++ b/examples/task_arena/fractal/fractal.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task_arena/fractal/fractal_video.h b/examples/task_arena/fractal/fractal_video.h index d56d03fc7d3c8a21eb790fcce11aa8a3bf9b6989..09edea802019c474fc3e697ae1cd5e1d8fc49298 100644 --- a/examples/task_arena/fractal/fractal_video.h +++ b/examples/task_arena/fractal/fractal_video.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task_arena/fractal/index.html b/examples/task_arena/fractal/index.html index da8048114192d0bf7bc4dc0cc405e674ccf4c0f3..6ee37d7eb08ad7868dfd676a5aa7026e4eb7d03c 100644 --- a/examples/task_arena/fractal/index.html +++ b/examples/task_arena/fractal/index.html @@ -83,7 +83,7 @@ user interface:
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task_arena/fractal/main.cpp b/examples/task_arena/fractal/main.cpp index 7fa5881e2ce69aa03c9f5deaea6d0693b0cde5fd..25abd6215950955f477a169c7f53f7a4e8392714 100644 --- a/examples/task_arena/fractal/main.cpp +++ b/examples/task_arena/fractal/main.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/task_arena/fractal/xcode/fractal.xcodeproj/project.pbxproj b/examples/task_arena/fractal/xcode/fractal.xcodeproj/project.pbxproj index df9408d1209c09202328ab581ca78379e03d3453..09e43aa7444a62ea00475932b90519bc39232f06 100644 --- a/examples/task_arena/fractal/xcode/fractal.xcodeproj/project.pbxproj +++ b/examples/task_arena/fractal/xcode/fractal.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 84011722152D687A00B07E4D /* fractal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84011720152D687A00B07E4D /* fractal.cpp */; }; - 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; @@ -19,6 +18,19 @@ 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; + D31F32341C11798900A77D54 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + D31F32351C11798E00A77D54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + D31F32361C11799200A77D54 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + D31F32371C11799500A77D54 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + D31F323A1C117A6200A77D54 /* iOS.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D31F32381C117A1700A77D54 /* iOS.storyboard */; }; + D31F323B1C117BE300A77D54 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA82152CA99C00D59B95 /* main.cpp */; }; + D31F323C1C117BE700A77D54 /* fractal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84011720152D687A00B07E4D /* fractal.cpp */; }; + D31F328E1C12E65800A77D54 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F323F1C11B5C900A77D54 /* libtbb.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F328F1C12E65F00A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32401C11B5C900A77D54 /* libtbbmalloc.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F32961C12E6B500A77D54 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32901C12E67300A77D54 /* libtbb.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F32971C12E6B500A77D54 /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D31F32911C12E67300A77D54 /* libtbbmalloc.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + D31F32981C12E6C500A77D54 /* libtbb.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32901C12E67300A77D54 /* libtbb.dylib */; }; + D31F32991C12E6CA00A77D54 /* libtbbmalloc.dylib in Resources */ = {isa = PBXBuildFile; fileRef = D31F32911C12E67300A77D54 /* libtbbmalloc.dylib */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -42,6 +54,12 @@ 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; + D31F321D1C11796D00A77D54 /* tbbExample_ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample_ios.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D31F32381C117A1700A77D54 /* iOS.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = iOS.storyboard; path = ../iOS.storyboard; sourceTree = ""; }; + D31F323F1C11B5C900A77D54 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + D31F32401C11B5C900A77D54 /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = ""; }; + D31F32901C12E67300A77D54 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/ios/libtbb.dylib; sourceTree = ""; }; + D31F32911C12E67300A77D54 /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/ios/libtbbmalloc.dylib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,9 +67,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D31F328E1C12E65800A77D54 /* libtbb.dylib in Frameworks */, 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, - 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + D31F328F1C12E65F00A77D54 /* libtbbmalloc.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D31F321A1C11796D00A77D54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F32961C12E6B500A77D54 /* libtbb.dylib in Frameworks */, + D31F32971C12E6B500A77D54 /* libtbbmalloc.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,6 +110,7 @@ 84B8DA7B152CA97B00D59B95 /* Resources */ = { isa = PBXGroup; children = ( + D31F32381C117A1700A77D54 /* iOS.storyboard */, 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, ); @@ -116,6 +145,7 @@ isa = PBXGroup; children = ( 84D017511527431F0008A4E0 /* tbbExample.app */, + D31F321D1C11796D00A77D54 /* tbbExample_ios.app */, ); name = Products; sourceTree = ""; @@ -123,6 +153,10 @@ 84D017541527431F0008A4E0 /* Frameworks */ = { isa = PBXGroup; children = ( + D31F323F1C11B5C900A77D54 /* libtbb.dylib */, + D31F32401C11B5C900A77D54 /* libtbbmalloc.dylib */, + D31F32901C12E67300A77D54 /* libtbb.dylib */, + D31F32911C12E67300A77D54 /* libtbbmalloc.dylib */, 84D01775152744BD0008A4E0 /* OpenGL.framework */, 84D017551527431F0008A4E0 /* Cocoa.framework */, 84D017571527431F0008A4E0 /* Other Frameworks */, @@ -161,6 +195,23 @@ productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; productType = "com.apple.product-type.application"; }; + D31F321C1C11796D00A77D54 /* tbbExample_ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = D31F32331C11796D00A77D54 /* Build configuration list for PBXNativeTarget "tbbExample_ios" */; + buildPhases = ( + D31F32191C11796D00A77D54 /* Sources */, + D31F321A1C11796D00A77D54 /* Frameworks */, + D31F321B1C11796D00A77D54 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample_ios; + productName = tbbExample_ios; + productReference = D31F321D1C11796D00A77D54 /* tbbExample_ios.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -169,6 +220,12 @@ attributes = { CLASSPREFIX = tbb; LastUpgradeCheck = 0430; + TargetAttributes = { + D31F321C1C11796D00A77D54 = { + CreatedOnToolsVersion = 7.1.1; + DevelopmentTeam = 7J8M3RM94C; + }; + }; }; buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "fractal" */; compatibilityVersion = "Xcode 3.2"; @@ -176,6 +233,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 84D017461527431F0008A4E0; productRefGroup = 84D017521527431F0008A4E0 /* Products */; @@ -183,6 +241,7 @@ projectRoot = ""; targets = ( 84D017501527431F0008A4E0 /* tbbExample */, + D31F321C1C11796D00A77D54 /* tbbExample_ios */, ); }; /* End PBXProject section */ @@ -198,6 +257,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D31F321B1C11796D00A77D54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F32991C12E6CA00A77D54 /* libtbbmalloc.dylib in Resources */, + D31F32981C12E6C500A77D54 /* libtbb.dylib in Resources */, + D31F323A1C117A6200A77D54 /* iOS.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -214,6 +283,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D31F32191C11796D00A77D54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D31F32351C11798E00A77D54 /* main.m in Sources */, + D31F323C1C117BE700A77D54 /* fractal.cpp in Sources */, + D31F32361C11799200A77D54 /* OpenGLView.m in Sources */, + D31F32371C11799500A77D54 /* tbbAppDelegate.m in Sources */, + D31F323B1C117BE300A77D54 /* main.cpp in Sources */, + D31F32341C11798900A77D54 /* macvideo.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -287,6 +369,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -305,6 +388,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; @@ -322,6 +406,93 @@ }; name = Release; }; + D31F32311C11796D00A77D54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "__TBB_IOS=1", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D31F32321C11796D00A77D54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "__TBB_IOS=1"; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.ios.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib/ios\""; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.tbb.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -343,6 +514,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D31F32331C11796D00A77D54 /* Build configuration list for PBXNativeTarget "tbbExample_ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D31F32311C11796D00A77D54 /* Debug */, + D31F32321C11796D00A77D54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 84D017481527431F0008A4E0 /* Project object */; diff --git a/examples/task_arena/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme b/examples/task_arena/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme new file mode 100644 index 0000000000000000000000000000000000000000..3ce0e58cdf53a908fddfb20ad397783cd68c2d3a --- /dev/null +++ b/examples/task_arena/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.ios.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/task_arena/index.html b/examples/task_arena/index.html index d2808135819ba5e654804a81f4103b6a8b9f76c4..993f6ed40c1abb0f73c3ea1eb981633da78a09bb 100644 --- a/examples/task_arena/index.html +++ b/examples/task_arena/index.html @@ -13,7 +13,7 @@ This directory has examples of how to use the task priority feature.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task_group/index.html b/examples/task_group/index.html index 63e4919a619634b4316aff86342bc0934436e6eb..515985b993a4465fdafa2c6e3551b895fb784de2 100644 --- a/examples/task_group/index.html +++ b/examples/task_group/index.html @@ -13,7 +13,7 @@ This directory has examples of how to use task_groups.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task_group/sudoku/Makefile b/examples/task_group/sudoku/Makefile index 34b38be6e565369028085b223bab90c97cedad4d..162a481323ab42ebd5d438b4ce469c1f8b59cba7 100644 --- a/examples/task_group/sudoku/Makefile +++ b/examples/task_group/sudoku/Makefile @@ -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 @@ -49,6 +49,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/task_group/sudoku/Makefile.windows b/examples/task_group/sudoku/Makefile.windows index a8990f6de7eefd73366eeec8c77613ffade06391..fa505c20adb6ecf8e31ae3aabf742ac5e58b6ac4 100644 --- a/examples/task_group/sudoku/Makefile.windows +++ b/examples/task_group/sudoku/Makefile.windows @@ -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 diff --git a/examples/task_group/sudoku/index.html b/examples/task_group/sudoku/index.html index c73852c09e65dbdbf1e33450daab2d737f742da9..855e0a8e6ff7e8327dc0ecdc172ac44526b51d93 100644 --- a/examples/task_group/sudoku/index.html +++ b/examples/task_group/sudoku/index.html @@ -66,7 +66,7 @@ General build directions can be found here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/task_group/sudoku/sudoku.cpp b/examples/task_group/sudoku/sudoku.cpp index 0da8620b9bc19cc07b4cb4ac86beb6b2b6d19f5b..42fec72b53378c8c0a591d1be82f0e7659da09ba 100644 --- a/examples/task_group/sudoku/sudoku.cpp +++ b/examples/task_group/sudoku/sudoku.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/test_all/fibonacci/Fibonacci.cpp b/examples/test_all/fibonacci/Fibonacci.cpp index c554939e4069389306f2e21366236c0e310a91a0..f75ba6b9ec60e170290c472a4a7213227664a70e 100644 --- a/examples/test_all/fibonacci/Fibonacci.cpp +++ b/examples/test_all/fibonacci/Fibonacci.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/examples/test_all/fibonacci/Makefile b/examples/test_all/fibonacci/Makefile index 17a3e5798e76500ee1f70147cc583ec73cd1f2d2..813d3b91dd6d5571b1413417eb47d0e92d711996 100644 --- a/examples/test_all/fibonacci/Makefile +++ b/examples/test_all/fibonacci/Makefile @@ -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 @@ -33,6 +33,8 @@ run_cmd=../../common/android.linux.launcher.sh else LIBS+= -lrt endif +else ifeq ($(shell uname), Darwin) +override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib endif all: release test diff --git a/examples/test_all/fibonacci/Makefile.windows b/examples/test_all/fibonacci/Makefile.windows index 28387cf5df66fd0d1033054282a2e1703d509d4c..b2f32997eb18d034448d077c6987abf1e8de1f71 100644 --- a/examples/test_all/fibonacci/Makefile.windows +++ b/examples/test_all/fibonacci/Makefile.windows @@ -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 diff --git a/examples/test_all/fibonacci/index.html b/examples/test_all/fibonacci/index.html index 9e8d71b3d19e5f0aa49c9d330ac24fc614dcfcf4..70cfd79f34d8200311c55cef62f35865884ecb31 100644 --- a/examples/test_all/fibonacci/index.html +++ b/examples/test_all/fibonacci/index.html @@ -41,7 +41,7 @@ General build directions can be found here.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/examples/test_all/index.html b/examples/test_all/index.html index c03c1dc123889899ac761e342f9c82d79892bc1d..8400db38bfaa8f16f3cb31fd9c5fe743fc743842 100644 --- a/examples/test_all/index.html +++ b/examples/test_all/index.html @@ -13,7 +13,7 @@ This directory contains programs that exercise all the components of Intel®
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/include/index.html b/include/index.html index 1ae01678247704043034c58184bb91256739470e..c992bb6f1ef6a9650bdf1bf7dfbb029e76a30d10 100644 --- a/include/index.html +++ b/include/index.html @@ -13,7 +13,7 @@ Include files for Intel® Threading Building Blocks (Intel® TBB).
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/include/serial/tbb/parallel_for.h b/include/serial/tbb/parallel_for.h index a0d5403cfa8b59151004f007fd7b8a312d4dad39..3ef776d22fb35b707becec1ca102f01d5e19a7e0 100644 --- a/include/serial/tbb/parallel_for.h +++ b/include/serial/tbb/parallel_for.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/serial/tbb/tbb_annotate.h b/include/serial/tbb/tbb_annotate.h index e4e321f985dd93ba96a231bf072fb86744417650..f7de75cf797f6692c0feda45c915a108018ae8d0 100644 --- a/include/serial/tbb/tbb_annotate.h +++ b/include/serial/tbb/tbb_annotate.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/aggregator.h b/include/tbb/aggregator.h index ed908c02982392a9055ae70b1c79388ea8424ead..fc2ad211fe153b1b7c031f2ab7e4b51f68e2ce13 100644 --- a/include/tbb/aggregator.h +++ b/include/tbb/aggregator.h @@ -1,5 +1,5 @@ /* - 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 @@ -70,13 +70,13 @@ public: class basic_handler { public: basic_handler() {} - void operator()(aggregator_operation* op_list) const { + void operator()(aggregator_operation* op_list) const { while (op_list) { // ITT note: &(op_list->status) tag is used to cover accesses to the operation data. // The executing thread "acquires" the tag (see start()) and then performs // the associated operation w/o triggering a race condition diagnostics. // A thread that created the operation is waiting for its status (see execute_impl()), - // so when this thread is done with the operation, it will "release" the tag + // so when this thread is done with the operation, it will "release" the tag // and update the status (see finish()) to give control back to the waiting thread. basic_operation_base& request = static_cast(*op_list); // IMPORTANT: need to advance op_list to op_list->next() before calling request.finish() @@ -103,7 +103,7 @@ public: void process(aggregator_operation *op) { execute_impl(*op); } protected: - /** Place operation in mailbox, then either handle mailbox or wait for the operation + /** Place operation in mailbox, then either handle mailbox or wait for the operation to be completed by a different thread. */ void execute_impl(aggregator_operation& op) { aggregator_operation* res; @@ -118,7 +118,7 @@ public: do { // ITT may flag the following line as a race; it is a false positive: // This is an atomic read; we don't provide itt_hide_load_word for atomics - op.my_next = res = mailbox; // NOT A RACE + op.my_next = res = mailbox; // NOT A RACE } while (mailbox.compare_and_swap(&op, res) != res); if (!res) { // first in the list; handle the operations // ITT note: &mailbox tag covers access to the handler_busy flag, which this @@ -162,8 +162,8 @@ public: // acquire fence not necessary here due to causality rule and surrounding atomics __TBB_store_with_release(handler_busy, uintptr_t(1)); - // ITT note: &mailbox tag covers access to the handler_busy flag itself. - // Capturing the state of the mailbox signifies that handler_busy has been + // ITT note: &mailbox tag covers access to the handler_busy flag itself. + // Capturing the state of the mailbox signifies that handler_busy has been // set and a new active handler will now process that list's operations. call_itt_notify(releasing, &mailbox); // grab pending_operations diff --git a/include/tbb/aligned_space.h b/include/tbb/aligned_space.h index 8ee62a013dae8e2339e18e02d2c9fd819e0926a2..07d49ab5c3acb52e1594683059788120f99a0098 100644 --- a/include/tbb/aligned_space.h +++ b/include/tbb/aligned_space.h @@ -1,5 +1,5 @@ /* - 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 @@ -42,6 +42,6 @@ public: T* end() {return begin()+N;} }; -} // namespace tbb +} // namespace tbb #endif /* __TBB_aligned_space_H */ diff --git a/include/tbb/atomic.h b/include/tbb/atomic.h index e3ffa6ec63b846ea263177d2e07ef1a3b01e648f..b269ff20ccc2ba1dcffe9af20e8f5d37ddaef51f 100644 --- a/include/tbb/atomic.h +++ b/include/tbb/atomic.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/blocked_range.h b/include/tbb/blocked_range.h index 220e6954fc808ca985f04c05e51a952365018eec..5262669293f94c1878b152221a5be863c7fab302 100644 --- a/include/tbb/blocked_range.h +++ b/include/tbb/blocked_range.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/blocked_range2d.h b/include/tbb/blocked_range2d.h index 3a2f38371bd3cfb83ad733d555820068557798cb..00b809ce45b5edeec668457c84473681b66e34fd 100644 --- a/include/tbb/blocked_range2d.h +++ b/include/tbb/blocked_range2d.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/blocked_range3d.h b/include/tbb/blocked_range3d.h index 0e27bbadd2cbbf9a0176d9006d4c98604bc7fa19..9db8b49863a2c77bbf02de93751a6cce9bcf468a 100644 --- a/include/tbb/blocked_range3d.h +++ b/include/tbb/blocked_range3d.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/cache_aligned_allocator.h b/include/tbb/cache_aligned_allocator.h index 2a58dab8ad4f9fffc3b79a77489b25adc9d8baf3..14640ff758e321fb578dffd3a4274b4458718111 100644 --- a/include/tbb/cache_aligned_allocator.h +++ b/include/tbb/cache_aligned_allocator.h @@ -1,5 +1,5 @@ /* - 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 @@ -76,7 +76,7 @@ public: pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} - + //! Allocate space for n objects, starting on a cache/sector line. pointer allocate( size_type n, const void* hint=0 ) { // The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt @@ -115,7 +115,7 @@ public: //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ -template<> +template<> class cache_aligned_allocator { public: typedef void* pointer; diff --git a/include/tbb/combinable.h b/include/tbb/combinable.h index 57fd98c919e005f2d2563a3a1a57d25a06506c0a..3a95397e0f33a906fcc8f110d069a0fbfa2ff116 100644 --- a/include/tbb/combinable.h +++ b/include/tbb/combinable.h @@ -1,5 +1,5 @@ /* - 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 @@ -36,8 +36,8 @@ namespace tbb { typedef typename tbb::cache_aligned_allocator my_alloc; typedef typename tbb::enumerable_thread_specific my_ets_type; - my_ets_type my_ets; - + my_ets_type my_ets; + public: combinable() { } @@ -46,7 +46,7 @@ namespace tbb { combinable( finit _finit) : my_ets(_finit) { } //! destructor - ~combinable() { + ~combinable() { } combinable(const combinable& other) : my_ets(other.my_ets) { } diff --git a/include/tbb/compat/condition_variable b/include/tbb/compat/condition_variable index ce9c2377daf67698d99fd0b1a662880df938f3ed..7a79225c4f874ee279dd71f8e86b1316ef6e4fcc 100644 --- a/include/tbb/compat/condition_variable +++ b/include/tbb/compat/condition_variable @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/compat/ppl.h b/include/tbb/compat/ppl.h index 156fd392fbf37a0e220bbb43a6fffbf82b995695..2cfc537d065aada852ba8047226365d3128a03c1 100644 --- a/include/tbb/compat/ppl.h +++ b/include/tbb/compat/ppl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/compat/thread b/include/tbb/compat/thread index fc7c40b0003f5397ab7d54eeb71600348aa13121..bc22ed5319c60d5d0b230140b26b61b17e3488d5 100644 --- a/include/tbb/compat/thread +++ b/include/tbb/compat/thread @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/compat/tuple b/include/tbb/compat/tuple index 795b2fbd622d76ba7aa47eea4d1d2d42b68a3c5f..1eafb7b092e2582cf3427116287d2f67cd99f9f2 100644 --- a/include/tbb/compat/tuple +++ b/include/tbb/compat/tuple @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/concurrent_hash_map.h b/include/tbb/concurrent_hash_map.h index c1f69d670ed996aec352b02e495e899471efe370..fb41de72b27168460c8534259a5e041fd021964f 100644 --- a/include/tbb/concurrent_hash_map.h +++ b/include/tbb/concurrent_hash_map.h @@ -1,5 +1,5 @@ /* - 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 @@ -791,7 +791,7 @@ public: swap(table); } - //! Move constructor + //! Move constructor concurrent_hash_map( concurrent_hash_map &&table, const allocator_type &a ) : internal::hash_map_base(), my_allocator(a) { @@ -1349,7 +1349,12 @@ void concurrent_hash_map::rehash(size_type sz) { if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { tbb::internal::runtime_warning( "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", - typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); +#if __TBB_USE_OPTIONAL_RTTI + typeid(*this).name(), +#else + "concurrent_hash_map", +#endif + current_size, empty_buckets, overpopulated_buckets ); reported = true; } #endif @@ -1400,7 +1405,12 @@ void concurrent_hash_map::clear() { if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { tbb::internal::runtime_warning( "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", - typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); +#if __TBB_USE_OPTIONAL_RTTI + typeid(*this).name(), +#else + "concurrent_hash_map", +#endif + current_size, empty_buckets, overpopulated_buckets ); reported = true; } #endif diff --git a/include/tbb/concurrent_lru_cache.h b/include/tbb/concurrent_lru_cache.h index db50e25d2a590a1ca35581f94fa12d785735f167..20fbb7b412e888028e6290851c5ac75ff0f0e13d 100644 --- a/include/tbb/concurrent_lru_cache.h +++ b/include/tbb/concurrent_lru_cache.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/concurrent_priority_queue.h b/include/tbb/concurrent_priority_queue.h index 3a0ad6f82513147f02bb5dd383bc42821dfe6e01..d5871e59cf25ccdf5fe1f01fb8ae452b897e7da3 100644 --- a/include/tbb/concurrent_priority_queue.h +++ b/include/tbb/concurrent_priority_queue.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/concurrent_queue.h b/include/tbb/concurrent_queue.h index 4cb05861a4332d481dd394497979b3ee774258f3..ee1187c49a495d6b3abbce494b7b32763311726e 100644 --- a/include/tbb/concurrent_queue.h +++ b/include/tbb/concurrent_queue.h @@ -1,5 +1,5 @@ /* - 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 @@ -31,7 +31,7 @@ namespace strict_ppl { /** Multiple threads may each push and pop concurrently. Assignment construction is not allowed. @ingroup containers */ -template > +template > class concurrent_queue: public internal::concurrent_queue_base_v3 { template friend class internal::concurrent_queue_iterator; @@ -43,7 +43,7 @@ class concurrent_queue: public internal::concurrent_queue_base_v3 { /*override*/ virtual void *allocate_block( size_t n ) { void *b = reinterpret_cast(my_allocator.allocate( n )); if( !b ) - internal::throw_exception(internal::eid_bad_alloc); + internal::throw_exception(internal::eid_bad_alloc); return b; } @@ -292,7 +292,7 @@ public: typedef std::ptrdiff_t difference_type; //! Construct empty queue - explicit concurrent_bounded_queue(const allocator_type& a = allocator_type()) : + explicit concurrent_bounded_queue(const allocator_type& a = allocator_type()) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( a ) { } @@ -402,8 +402,8 @@ public: } //! Return number of pushes minus number of pops. - /** Note that the result can be negative if there are pops waiting for the - corresponding pushes. The result can also exceed capacity() if there + /** Note that the result can be negative if there are pops waiting for the + corresponding pushes. The result can also exceed capacity() if there are push operations in flight. */ size_type size() const {return internal_size();} @@ -439,7 +439,7 @@ public: const_iterator unsafe_begin() const {return const_iterator(*this);} const_iterator unsafe_end() const {return const_iterator();} -}; +}; template concurrent_bounded_queue::~concurrent_bounded_queue() { diff --git a/include/tbb/concurrent_unordered_map.h b/include/tbb/concurrent_unordered_map.h index ab97b3e525eb1bc0b349332752c686c4ac26b6b1..09a2a28c197ad5d04382449c0bc06c567bc14bb1 100644 --- a/include/tbb/concurrent_unordered_map.h +++ b/include/tbb/concurrent_unordered_map.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/concurrent_unordered_set.h b/include/tbb/concurrent_unordered_set.h index 0d0df9064aedf0210b7f620b6b32c91d31875a14..62d992b547d062100682b9d6338a4336c096acee 100644 --- a/include/tbb/concurrent_unordered_set.h +++ b/include/tbb/concurrent_unordered_set.h @@ -1,5 +1,5 @@ /* - 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 @@ -223,7 +223,7 @@ public: { this->insert(il.begin(),il.end()); } -#endif //# __TBB_INITIALIZER_LISTS_PRESENT +#endif //# __TBB_INITIALIZER_LISTS_PRESENT #if __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_multiset(const concurrent_unordered_multiset& table) diff --git a/include/tbb/concurrent_vector.h b/include/tbb/concurrent_vector.h index ec27013e4f19718e308bc5d6dc39173cfcc79bac..aeca3171b90b5c509e3535a47d00b3f51bd231f0 100644 --- a/include/tbb/concurrent_vector.h +++ b/include/tbb/concurrent_vector.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/critical_section.h b/include/tbb/critical_section.h index 973dd4874d24d6b13c5c937169bbdfc61b42f9a3..596f7fe73fe37550a248e7c9e61646ff43fa35f7 100644 --- a/include/tbb/critical_section.h +++ b/include/tbb/critical_section.h @@ -1,5 +1,5 @@ /* - 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 @@ -48,7 +48,7 @@ public: void __TBB_EXPORTED_METHOD internal_construct(); - critical_section_v4() { + critical_section_v4() { #if _WIN32||_WIN64 InitializeCriticalSectionEx( &my_impl, 4000, 0 ); #else @@ -60,7 +60,7 @@ public: ~critical_section_v4() { __TBB_ASSERT(my_tid == tbb_thread::id(), "Destroying a still-held critical section"); #if _WIN32||_WIN64 - DeleteCriticalSection(&my_impl); + DeleteCriticalSection(&my_impl); #else pthread_mutex_destroy(&my_impl); #endif @@ -79,7 +79,7 @@ public: } }; - void lock() { + void lock() { tbb_thread::id local_tid = this_tbb_thread::get_id(); if(local_tid == my_tid) throw_exception( eid_improper_lock ); #if _WIN32||_WIN64 diff --git a/include/tbb/enumerable_thread_specific.h b/include/tbb/enumerable_thread_specific.h index aee2e53421a61c226b95c3330cf9e331fe3d8861..c457c03a90db2321057e9e37042bdc439c39bfdd 100644 --- a/include/tbb/enumerable_thread_specific.h +++ b/include/tbb/enumerable_thread_specific.h @@ -1,5 +1,5 @@ /* - 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 @@ -636,7 +636,7 @@ namespace interface6 { } construct_by_args( P&& ... args ) : pack(std::forward

    (args)...) {} }; -#endif +#endif // storage for initialization function pointer // TODO: consider removing the template parameter T here and in callback_leaf @@ -708,7 +708,7 @@ namespace interface6 { ets_element() { is_built = false; } // not currently-built U* value() { return my_space.begin(); } U* value_committed() { is_built = true; return my_space.begin(); } - ~ets_element() { + ~ets_element() { if(is_built) { my_space.begin()->~U(); is_built = false; diff --git a/include/tbb/flow_graph.h b/include/tbb/flow_graph.h index f7d44c99761c8872af437f174fa2ac85c549c9fd..3c5f305980f0d050c6b954dceb2620be1265082e 100644 --- a/include/tbb/flow_graph.h +++ b/include/tbb/flow_graph.h @@ -1,5 +1,5 @@ /* - 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 @@ -265,10 +265,10 @@ public: // methods remove the statement from all predecessors/successors liste in the edge // container. - template< typename S > void sender_extract( S &s ); - template< typename R > void receiver_extract( R &r ); - -private: + template< typename S > void sender_extract( S &s ); + template< typename R > void receiver_extract( R &r ); + +private: edge_list_type built_edges; }; // class edge_container } // namespace internal @@ -528,9 +528,15 @@ class graph : tbb::internal::no_copy { void operator()() const { graph_root_task->wait_for_all(); } }; - void prepare_task_arena() { - my_task_arena = new tbb::task_arena(tbb::internal::attach()); - if (!my_task_arena->is_active()) + void prepare_task_arena( bool reinit = false ) { + if (reinit) { + __TBB_ASSERT( my_task_arena, NULL ); + my_task_arena->terminate(); + my_task_arena->initialize(tbb::task_arena::attach()); + } else { + my_task_arena = new tbb::task_arena(tbb::task_arena::attach()); + } + if (!my_task_arena->is_active()) // failed to attach my_task_arena->initialize(); // create a new, default-initialized arena __TBB_ASSERT(my_task_arena->is_active(), NULL); } @@ -659,7 +665,7 @@ public: task * root_task() { return my_root_task; } - + void set_active(bool a = true) { my_is_active = a; } @@ -813,8 +819,7 @@ inline void graph::reset( reset_flags f ) { #if __TBB_PREVIEW_ASYNC_NODE // Reattach the arena. Might be useful to run the graph in a particular task_arena // while not limiting graph lifetime to a single task_arena::execute() call. - delete my_task_arena; - prepare_task_arena(); + prepare_task_arena( /*reinit=*/true ); #endif set_active(true); // now spawn the tasks necessary to start the graph @@ -1108,8 +1113,8 @@ public: typedef internal::function_input_queue input_queue_type; typedef internal::function_output fOutput_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES - using typename fInput_type::predecessor_list_type; - using typename fOutput_type::successor_list_type; + typedef typename fInput_type::predecessor_list_type predecessor_list_type; + typedef typename fOutput_type::successor_list_type successor_list_type; #endif using fInput_type::my_predecessors; @@ -1159,7 +1164,7 @@ protected: /*override*/void reset_node(reset_flags f) { fInput_type::reset_function_input(f); // TODO: use clear() instead. - if(f & rf_clear_edges) { + if(f & rf_clear_edges) { successors().clear(); my_predecessors.clear(); } @@ -1624,7 +1629,7 @@ public: typedef typename receiver::built_predecessors_type built_predecessors_type; - /*override receiver*/ built_predecessors_type &built_predecessors() { return my_built_predecessors; } + /*override receiver*/ built_predecessors_type &built_predecessors() { return my_built_predecessors; } /*override*/ void internal_add_built_predecessor( predecessor_type &p) { spin_mutex::scoped_lock l(pred_mutex); @@ -1844,7 +1849,7 @@ protected: typedef typename receiver::built_predecessors_type built_predecessors_type; - /*override receiver*/ built_predecessors_type &built_predecessors() { return my_built_predecessors; } + /*override receiver*/ built_predecessors_type &built_predecessors() { return my_built_predecessors; } virtual void internal_add_built_pred(buffer_operation *op) { my_built_predecessors.add_edge(*(op->p)); @@ -2822,7 +2827,7 @@ protected: return rtask; } - /*override*/void reset_receiver(reset_flags /*f*/) { + /*override*/void reset_receiver(reset_flags /*f*/) { __TBB_ASSERT(false,NULL); // should never be called } @@ -3457,7 +3462,7 @@ public: private: #if TBB_PREVIEW_FLOW_GRAPH_TRACE const char *my_type_name; -#endif +#endif input_ports_type *my_input_ports; static const size_t NUM_INPUTS = sizeof...(InputTypes); @@ -3613,12 +3618,12 @@ public: }; template -class async_body { +class async_body { public: typedef AsyncGateway async_gateway_type; async_body(const Body &body, async_gateway_type *gateway) : my_body(body), my_async_gateway(gateway) { } - + async_body(const async_body &other) : my_body(other.my_body), my_async_gateway(other.my_async_gateway) { } void operator()( const Input &v, Ports & ) { @@ -3735,7 +3740,7 @@ public: typedef internal::multifunction_body mfn_body_type; typedef internal::async_body async_body_type; mfn_body_type &body_ref = *this->my_body; - async_body_type ab = dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); + async_body_type ab = dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); return ab.get_body(); } @@ -3770,7 +3775,7 @@ protected: base_type::reset_node(f); } -}; +}; #endif // __TBB_PREVIEW_ASYNC_NODE diff --git a/include/tbb/flow_graph_opencl_node.h b/include/tbb/flow_graph_opencl_node.h index 9be3269e1f6ecc6e98a2bc46edd7abc0295a61e7..c82d26ffd9aece7dc5a866b9455e4999b0341d71 100644 --- a/include/tbb/flow_graph_opencl_node.h +++ b/include/tbb/flow_graph_opencl_node.h @@ -1,5 +1,5 @@ /* - 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 @@ -90,7 +90,7 @@ template< typename T, typename Factory > class receiver> { public: //! The predecessor type for this node - typedef sender> dependency_predecessor_type; + typedef sender> predecessor_type; typedef proxy_dependency_receiver proxy; receiver() : my_ordinary_receiver( *this ) {} @@ -104,10 +104,10 @@ public: virtual task *try_put_task( const dependency_msg& ) = 0; //! Add a predecessor to the node - virtual bool register_predecessor( dependency_predecessor_type & ) { return false; } + virtual bool register_predecessor( predecessor_type & ) { return false; } //! Remove a predecessor from the node - virtual bool remove_predecessor( dependency_predecessor_type & ) { return false; } + virtual bool remove_predecessor( predecessor_type & ) { return false; } protected: //! put receiver back in initial state @@ -117,6 +117,7 @@ private: class ordinary_receiver : public receiver < T >, tbb::internal::no_assign { //! The predecessor type for this node typedef sender predecessor_type; + typedef sender> dependency_predecessor_type; public: ordinary_receiver(receiver>& owner) : my_owner(owner) {} @@ -174,7 +175,7 @@ class proxy_dependency_sender; template< typename T, typename Factory > class proxy_dependency_receiver : public receiver < dependency_msg >, tbb::internal::no_assign { public: - typedef sender> dependency_predecessor_type; + typedef sender> predecessor_type; proxy_dependency_receiver( receiver& r ) : my_r( r ) {} @@ -190,11 +191,11 @@ public: } //! Add a predecessor to the node - /* override */ bool register_predecessor( dependency_predecessor_type &s ) { + /* override */ bool register_predecessor( predecessor_type &s ) { return my_r.register_predecessor( s.ordinary_sender() ); } //! Remove a predecessor from the node - /* override */ bool remove_predecessor( dependency_predecessor_type &s ) { + /* override */ bool remove_predecessor( predecessor_type &s ) { return my_r.remove_predecessor( s.ordinary_sender() ); } protected: @@ -216,14 +217,14 @@ public: sender() : my_ordinary_sender( *this ) {} //! The successor type for this sender - typedef receiver> dependency_successor_type; + typedef receiver> successor_type; typedef proxy_dependency_sender proxy; //! Add a new successor to this node - virtual bool register_successor( dependency_successor_type &r ) = 0; + virtual bool register_successor( successor_type &r ) = 0; //! Removes a successor from this node - virtual bool remove_successor( dependency_successor_type &r ) = 0; + virtual bool remove_successor( successor_type &r ) = 0; //! Request an item from the sender virtual bool try_get( dependency_msg & ) { return false; } @@ -234,6 +235,7 @@ private: class ordinary_sender : public sender < T >, tbb::internal::no_assign { //! The successor type for this sender typedef receiver successor_type; + typedef receiver> dependency_successor_type; public: ordinary_sender(sender>& owner) : my_owner(owner) {} @@ -301,17 +303,17 @@ public: template< typename T, typename Factory > class proxy_dependency_sender : public sender < dependency_msg >, tbb::internal::no_assign { public: - typedef receiver> dependency_successor_type; + typedef receiver> successor_type; proxy_dependency_sender( sender& s ) : my_s( s ) {} //! Add a new successor to this node - /* override */ bool register_successor( dependency_successor_type &r ) { + /* override */ bool register_successor( successor_type &r ) { return my_s.register_successor( r.ordinary_receiver() ); } //! Removes a successor from this node - /* override */ bool remove_successor( dependency_successor_type &r ) { + /* override */ bool remove_successor( successor_type &r ) { return my_s.remove_successor( r.ordinary_receiver() ); } @@ -407,14 +409,17 @@ std::string platform_info( cl_platform_id p, cl_platform_info i ) class opencl_device { +public: typedef size_t device_id_type; enum : device_id_type { unknown = device_id_type( -2 ), host = device_id_type( -1 ) }; -public: + opencl_device() : my_device_id( unknown ) {} + opencl_device( cl_device_id cl_d_id, device_id_type device_id ) : my_device_id( device_id ), my_cl_device_id( cl_d_id ) {} + std::string platform_profile() const { return platform_info( platform(), CL_PLATFORM_PROFILE ); } @@ -512,6 +517,18 @@ public: return device_info( my_cl_device_id, CL_DEVICE_ADDRESS_BITS ); } + cl_device_id device_id() const { + return my_cl_device_id; + } + + cl_command_queue command_queue() const { + return my_cl_command_queue; + } + + void set_command_queue( cl_command_queue cmd_queue ) { + my_cl_command_queue = cmd_queue; + } + private: opencl_device( cl_device_id d_id ) : my_device_id( unknown ), my_cl_device_id( d_id ) {} @@ -724,6 +741,8 @@ public: return my_host_ptr; } + Factory *factory() const { return my_factory; } + dependency_msg send( opencl_device d, const cl_event *e ); dependency_msg receive( const cl_event *e ); virtual void map_memory( opencl_device, dependency_msg & ) = 0; @@ -748,6 +767,14 @@ public: enforce_cl_retcode( err, "Failed to create an OpenCL buffer" ); } + // The constructor for subbuffers. + opencl_buffer_impl( cl_mem m, size_t index, size_t size, Factory& f ) : opencl_memory( f ), my_size( size ) { + cl_int err; + cl_buffer_region region = { index, size }; + this->my_cl_mem = clCreateSubBuffer( m, 0, CL_BUFFER_CREATE_TYPE_REGION, ®ion, &err ); + enforce_cl_retcode( err, "Failed to create an OpenCL subbuffer" ); + } + size_t size() const { return my_size; } @@ -768,6 +795,9 @@ enum access_type { read_only }; +template +class opencl_subbuffer; + template class opencl_buffer { public: @@ -823,7 +853,11 @@ public: else dependency.clear_event(); } + opencl_subbuffer subbuffer( size_t index, size_t size ) const; private: + // The constructor for subbuffers. + opencl_buffer( Factory &f, cl_mem m, size_t index, size_t size ) : my_impl( std::make_shared( m, index*sizeof(T), size*sizeof(T), f ) ) {} + typedef opencl_buffer_impl impl_type; std::shared_ptr my_impl; @@ -834,8 +868,24 @@ private: template friend class opencl_factory; + template + friend class opencl_subbuffer; +}; + +template +class opencl_subbuffer : public opencl_buffer { + opencl_buffer my_owner; +public: + opencl_subbuffer() {} + opencl_subbuffer( const opencl_buffer &owner, size_t index, size_t size ) : + opencl_buffer( *owner.my_impl->factory(), owner.native_object(), index, size ), my_owner( owner ) {} }; +template +opencl_subbuffer opencl_buffer::subbuffer( size_t index, size_t size ) const { + return opencl_subbuffer( *this, index, size ); +} + template class opencl_factory { @@ -918,7 +968,7 @@ private: bool is_same_context( opencl_device::device_id_type d1, opencl_device::device_id_type d2 ) { __TBB_ASSERT( d1 != opencl_device::unknown && d2 != opencl_device::unknown, NULL ); - // Currently, factory supports only one context so if the both devices are not host it means the are in the same context. + // Currently, factory supports only one context so if the both devices are not host it means the are in the same context. if ( d1 != opencl_device::host && d2 != opencl_device::host ) return true; return d1 == d2; @@ -1014,7 +1064,7 @@ private: class opencl_foundation : tbb::internal::no_assign { struct default_device_selector_type { - opencl_device operator()( const opencl_device_list& devices ) { + opencl_device operator()( const opencl_device_list& devices ) { return *devices.begin(); } }; @@ -1653,20 +1703,20 @@ class opencl_node< tuple, JP, Factory > : public composite_node < tupl template NDRange ndrange_value( NDRange&& r, const kernel_input_tuple& ) const { return r; } template - typename tuple_element::type::value_type ndrange_value( port_ref_impl, const kernel_input_tuple& ip ) const { + typename tuple_element::type::value_type ndrange_value( port_ref_impl, const kernel_input_tuple& ip ) const { // "+1" since get<0>(ip) is opencl_device. return get(ip).data(false); } template - void ndrange_value( port_ref_impl, const kernel_input_tuple& ip ) const { + void ndrange_value( port_ref_impl, const kernel_input_tuple& ip ) const { __TBB_STATIC_ASSERT( N1==N2, "Do not use a port_ref range (e.g. port_ref<0,2>) as an argument for the set_ndranges routine" ); } template - typename tuple_element::type::value_type ndrange_value( port_ref_impl(*)(), const kernel_input_tuple& ip ) const { + typename tuple_element::type::value_type ndrange_value( port_ref_impl(*)(), const kernel_input_tuple& ip ) const { return ndrange_value(port_ref(), ip); } template - void ndrange_value( port_ref_impl(*)(), const kernel_input_tuple& ip ) const { + void ndrange_value( port_ref_impl(*)(), const kernel_input_tuple& ip ) const { return ndrange_value(port_ref(), ip); } // ------------------------------------------- // @@ -1788,7 +1838,7 @@ class opencl_node< tuple, JP, Factory > : public composite_node < tupl set_args_func( opencl_kernel &k, const kernel_input_tuple &ip ) : my_opencl_kernel( k ), my_ip( ip ) {} // It is immpossible to use Args... because a function pointer cannot be casted to a function reference implicitly. // Allow the compiler to deduce types for function pointers automatically. - template + template void operator()( A&&... a ) { my_opencl_kernel.set_args<0>( my_ip, std::forward( a )... ); } @@ -1801,7 +1851,7 @@ class opencl_node< tuple, JP, Factory > : public composite_node < tupl public: send_func( opencl_device d ) : my_device( d ) {} void operator()() {} - template + template void operator()( T &&t, Rest&&... rest ) { send_if_memory_object( my_device, std::forward( t ) ); (*this)( std::forward( rest )... ); @@ -2067,6 +2117,7 @@ using interface8::read_only; using interface8::read_write; using interface8::write_only; using interface8::opencl_buffer; +using interface8::opencl_subbuffer; using interface8::opencl_device; using interface8::opencl_device_list; using interface8::opencl_program; diff --git a/include/tbb/global_control.h b/include/tbb/global_control.h index 9b773d310bd27ba90122f7783ea38cf52c8f4277..d43ff5a4ef9f1f7732e6eceb2ccaa929e3c54edf 100644 --- a/include/tbb/global_control.h +++ b/include/tbb/global_control.h @@ -1,5 +1,5 @@ /* - 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 @@ -50,8 +50,7 @@ public: __TBB_ASSERT_RELEASE((unsigned)value == value, "Stack size is limited to unsigned int range"); #endif if (my_param==max_allowed_parallelism) - // TODO: support for serialization via max_allowed_parallelism==1 - __TBB_ASSERT_RELEASE(my_value>1, "Values of 1 and 0 are not supported for max_allowed_parallelism."); + __TBB_ASSERT_RELEASE(my_value>0, "max_allowed_parallelism cannot be 0."); internal_create(); } diff --git a/include/tbb/index.html b/include/tbb/index.html index a403e1fa04a88166b4061dc44d781c3c2b596572..f0702e2763242f98b66659f9dce5ccdd4ce6521a 100644 --- a/include/tbb/index.html +++ b/include/tbb/index.html @@ -19,7 +19,7 @@ Include files for Intel® Threading Building Blocks classes and functions.


    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/include/tbb/internal/_aggregator_impl.h b/include/tbb/internal/_aggregator_impl.h index 6782b6ad341282ad0660380efab33a21f19d9275..111a6c36ac8c382d22d912fdcfe45182a1de2ae8 100644 --- a/include/tbb/internal/_aggregator_impl.h +++ b/include/tbb/internal/_aggregator_impl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_concurrent_queue_impl.h b/include/tbb/internal/_concurrent_queue_impl.h index 30b738fc374fa1cd8486173acc127fedba80b99d..fc994090675e565365b36162d839441d8e5a8c71 100644 --- a/include/tbb/internal/_concurrent_queue_impl.h +++ b/include/tbb/internal/_concurrent_queue_impl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_concurrent_unordered_impl.h b/include/tbb/internal/_concurrent_unordered_impl.h index dffe4fcde7a6ac4b2303b72b6f8bdb5d199c5009..21f2ae699c254fa0c433caefbd26af1f12b162e6 100644 --- a/include/tbb/internal/_concurrent_unordered_impl.h +++ b/include/tbb/internal/_concurrent_unordered_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -18,7 +18,7 @@ reasons why the executable file might be covered by the GNU General Public License. */ -/* Container implementations in this header are based on PPL implementations +/* Container implementations in this header are based on PPL implementations provided by Microsoft. */ #ifndef __TBB__concurrent_unordered_impl_H @@ -840,7 +840,7 @@ public: return my_solist.max_size(); } - // Iterators + // Iterators iterator begin() { return my_solist.begin(); } @@ -887,7 +887,7 @@ public: return my_midpoint_node != my_end_node; } //! Split range. - const_range_type( const_range_type &r, split ) : + const_range_type( const_range_type &r, split ) : my_table(r.my_table), my_end_node(r.my_end_node) { r.my_end_node = my_begin_node = r.my_midpoint_node; @@ -897,7 +897,7 @@ public: r.set_midpoint(); } //! Init range with container and grainsize specified - const_range_type( const concurrent_unordered_base &a_table ) : + const_range_type( const concurrent_unordered_base &a_table ) : my_table(a_table), my_begin_node(a_table.my_solist.begin()), my_end_node(a_table.my_solist.end()) { @@ -1085,7 +1085,7 @@ public: return const_cast(this)->internal_equal_range(key); } - // Bucket interface - for debugging + // Bucket interface - for debugging size_type unsafe_bucket_count() const { return my_number_of_buckets; } @@ -1138,7 +1138,7 @@ public: return end(); raw_iterator it = get_bucket(bucket); - + // Find the end of the bucket, denoted by the dummy element do ++it; while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); @@ -1155,7 +1155,7 @@ public: return end(); raw_const_iterator it = get_bucket(bucket); - + // Find the end of the bucket, denoted by the dummy element do ++it; while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); @@ -1291,10 +1291,10 @@ private: { if (!pnode) pnode = my_solist.create_node(order_key, tbb::internal::forward(value)); - + // Try to insert 'pnode' between 'it' and 'where' std::pair result = my_solist.try_insert(it, where, pnode, &new_count); - + if (result.second) { // Insertion succeeded, adjust the table size, if needed @@ -1317,7 +1317,7 @@ private: my_hash_compare(get_key(*where), get_key(value)) == 0) { // Element already in the list, return it if (pnode) - my_solist.destroy_node(pnode); + my_solist.destroy_node(pnode); return std::pair(my_solist.get_iterator(where), false); } // Move the iterator forward diff --git a/include/tbb/internal/_flow_graph_impl.h b/include/tbb/internal/_flow_graph_impl.h index 8f72f127266502603c931f015232d52bd1cce7cd..665efc52331ff02465be1b1aeeeaa1b09e4c87f6 100644 --- a/include/tbb/internal/_flow_graph_impl.h +++ b/include/tbb/internal/_flow_graph_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -157,7 +157,7 @@ void set_async_gateway(T *body, void *g) { body->set_async_gateway(static_cast(g)); } -void set_async_gateway(...) { } +inline void set_async_gateway(...) { } #endif //! function_body that takes an Input and a set of output ports @@ -181,7 +181,7 @@ void set_async_gateway(...) { } body(input, oset); // body may explicitly put() to one or more of oset. } B get_body() { return body; } - + #if __TBB_PREVIEW_ASYNC_NODE /*override*/ void set_gateway(void *gateway) { set_async_gateway(&body, gateway); diff --git a/include/tbb/internal/_flow_graph_indexer_impl.h b/include/tbb/internal/_flow_graph_indexer_impl.h index a65590f07fc2ec4748bd2e498c7ba752455517a0..ee2bef8929840eb76ec7a6af354478a859fab40c 100644 --- a/include/tbb/internal/_flow_graph_indexer_impl.h +++ b/include/tbb/internal/_flow_graph_indexer_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -32,8 +32,8 @@ namespace internal { // Output of the indexer_node is a tbb::flow::tagged_msg, and will be of // the form tagged_msg // where the value of tag will indicate which result was put to the - // successor. - + // successor. + template task* do_try_put(const T &v, void *p) { typename IndexerNodeBaseType::output_type o(K, v); @@ -207,7 +207,7 @@ namespace internal { }; indexer_node_base_operation(const output_type* e, op_type t) : type(char(t)), my_arg(e) {} - indexer_node_base_operation(const successor_type &s, op_type t) : type(char(t)), + indexer_node_base_operation(const successor_type &s, op_type t) : type(char(t)), my_succ(const_cast(&s)) {} indexer_node_base_operation(op_type t) : type(char(t)) {} }; @@ -314,7 +314,7 @@ namespace internal { indexer_node_base_operation op_data(blt_succ_cpy); op_data.succv = &v; my_aggregator.execute(&op_data); - } + } void extract() { my_successors.built_successors().sender_extract(*this); indexer_helper::extract(this->my_inputs); @@ -355,7 +355,7 @@ namespace internal { typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename internal::tagged_msg type; }; - + template struct input_types<4, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; @@ -365,7 +365,7 @@ namespace internal { typedef typename internal::tagged_msg type; }; - + template struct input_types<5, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; @@ -376,7 +376,7 @@ namespace internal { typedef typename internal::tagged_msg type; }; - + template struct input_types<6, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; @@ -388,7 +388,7 @@ namespace internal { typedef typename internal::tagged_msg type; }; - + template struct input_types<7, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; @@ -419,7 +419,7 @@ namespace internal { seventh_type, eighth_type> type; }; - + template struct input_types<9, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; diff --git a/include/tbb/internal/_flow_graph_item_buffer_impl.h b/include/tbb/internal/_flow_graph_item_buffer_impl.h index a6d8936dda00198115eec03ac5d49b412ef65d29..08b2ffcac312fface70b2aa959c888f3b7279d06 100644 --- a/include/tbb/internal/_flow_graph_item_buffer_impl.h +++ b/include/tbb/internal/_flow_graph_item_buffer_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -75,7 +75,7 @@ namespace internal { } // may be called with an empty slot or a slot that has already been constructed into. - void set_my_item(size_t i, const item_type &o) { + void set_my_item(size_t i, const item_type &o) { if(item(i).second != no_item) { destroy_item(i); } @@ -135,7 +135,7 @@ namespace internal { v = get_my_item(my_tail-1); } - // following methods are for reservation of the front of a bufffer. + // following methods are for reservation of the front of a bufffer. void reserve_item(size_type i) { __TBB_ASSERT(my_item_valid(i) && !my_item_reserved(i), "item cannot be reserved"); item(i).second = reserved_item; } void release_item(size_type i) { __TBB_ASSERT(my_item_reserved(i), "item is not reserved"); item(i).second = has_item; } @@ -146,7 +146,7 @@ namespace internal { // grow_array doesn't work if we change my_tail when the old array is too small size_type size(size_t new_tail = 0) { return (new_tail ? new_tail : my_tail) - my_head; } size_type capacity() { return my_array_size; } - // sequencer_node does not use this method, so we don't + // sequencer_node does not use this method, so we don't // need a version that passes in the new_tail value. bool buffer_full() { return size() >= capacity(); } @@ -213,7 +213,7 @@ namespace internal { if(my_item_valid(i)) destroy_item(i); } - allocator_type().deallocate(my_array,my_array_size); + allocator_type().deallocate(my_array,my_array_size); } my_array = NULL; if(reset_pointers) { @@ -237,7 +237,7 @@ namespace internal { }; //! item_buffer with reservable front-end. NOTE: if reserving, do not - //* complete operation with pop_front(); use consume_front(). + //* complete operation with pop_front(); use consume_front(). //* No synchronization built-in. template > class reservable_item_buffer : public item_buffer { diff --git a/include/tbb/internal/_flow_graph_join_impl.h b/include/tbb/internal/_flow_graph_join_impl.h index acb2cc61bd843f00d6ba0061d649cb4c5df7277c..da7495a643e1f3831d7e76a4d63dd02f987adc32 100644 --- a/include/tbb/internal/_flow_graph_join_impl.h +++ b/include/tbb/internal/_flow_graph_join_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -605,14 +605,14 @@ namespace internal { } void extract_receiver() { - item_buffer::reset(); + item_buffer::reset(); my_built_predecessors.receiver_extract(*this); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ - /*override*/void reset_receiver(reset_flags f) { + /*override*/void reset_receiver(reset_flags f) { tbb::internal::suppress_unused_warning(f); - item_buffer::reset(); + item_buffer::reset(); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if (f & rf_clear_edges) my_built_predecessors.clear(); @@ -791,7 +791,7 @@ namespace internal { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/built_predecessors_type &built_predecessors() { return my_built_predecessors; } - + /*override*/void internal_add_built_predecessor(sender &p) { key_matching_port_operation op_data(add_blt_pred); op_data.pred = &p; @@ -831,9 +831,9 @@ namespace internal { my_built_predecessors.receiver_extract(*this); } #endif - /*override*/void reset_receiver(reset_flags f ) { + /*override*/void reset_receiver(reset_flags f ) { tbb::internal::suppress_unused_warning(f); - buffer_type::reset(); + buffer_type::reset(); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if (f & rf_clear_edges) my_built_predecessors.clear(); diff --git a/include/tbb/internal/_flow_graph_node_impl.h b/include/tbb/internal/_flow_graph_node_impl.h index 6ca30193b461ee062fc3bb37b70d4e5ef7fc1518..0c441fa1116d2313707b98e21ab2ab892e2569a7 100644 --- a/include/tbb/internal/_flow_graph_node_impl.h +++ b/include/tbb/internal/_flow_graph_node_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -47,7 +47,7 @@ namespace internal { }; //! Input and scheduling for a function node that takes a type Input as input - // The only up-ref is apply_body_impl, which should implement the function + // The only up-ref is apply_body_impl, which should implement the function // call and any handling of the result. template< typename Input, typename A, typename ImplType > class function_input_base : public receiver, tbb::internal::no_assign { @@ -56,10 +56,10 @@ namespace internal { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_pred, del_blt_pred, blt_pred_cnt, blt_pred_cpy // create vector copies of preds and succs -#endif +#endif }; typedef function_input_base class_type; - + public: //! The input type of this receiver @@ -81,7 +81,7 @@ namespace internal { my_predecessors.set_owner(this); my_aggregator.initialize_handler(handler_type(this)); } - + //! Copy constructor function_input_base( const function_input_base& src, input_queue_type *q = NULL) : receiver(), tbb::internal::no_assign(), @@ -96,10 +96,10 @@ namespace internal { // The queue is allocated by the constructor for {multi}function_node. // TODO: pass the graph_buffer_policy to the base so it can allocate the queue instead. // This would be an interface-breaking change. - virtual ~function_input_base() { + virtual ~function_input_base() { if ( my_queue ) delete my_queue; } - + //! Put to the node, returning a task if available virtual task * try_put_task( const input_type &t ) { if ( my_max_concurrency == 0 ) { @@ -121,7 +121,7 @@ namespace internal { my_aggregator.execute(&op_data); return true; } - + //! Removes src from the list of cached predecessors. /* override */ bool remove_predecessor( predecessor_type &src ) { operation_type op_data(rem_pred); @@ -178,7 +178,7 @@ namespace internal { size_t my_concurrency; input_queue_type *my_queue; predecessor_cache my_predecessors; - + /*override*/void reset_receiver( reset_flags f) { if( f & rf_clear_edges) my_predecessors.clear(); else @@ -190,7 +190,7 @@ namespace internal { friend class apply_body_task_bypass< class_type, input_type >; friend class forward_task_bypass< class_type >; - + class operation_type : public aggregated_operation< operation_type > { public: char type; @@ -207,12 +207,12 @@ namespace internal { type(char(t)), elem(const_cast(&e)) {} operation_type(op_type t) : type(char(t)), r(NULL) {} }; - + bool forwarder_busy; typedef internal::aggregating_functor handler_type; friend class internal::aggregating_functor; aggregator< handler_type, operation_type > my_aggregator; - + void handle_operations(operation_type *op_list) { operation_type *tmp; while (op_list) { @@ -257,7 +257,7 @@ namespace internal { bool item_was_retrieved = false; if ( my_queue ) item_was_retrieved = my_queue->pop(i); - else + else item_was_retrieved = my_predecessors.get_item(i); if (item_was_retrieved) { ++my_concurrency; @@ -292,7 +292,7 @@ namespace internal { } } } - + //! Put to the node, but return the task instead of enqueueing it void internal_try_put_task(operation_type *op) { __TBB_ASSERT(my_max_concurrency != 0, NULL); @@ -301,7 +301,7 @@ namespace internal { task * new_task = create_body_task(*(op->elem)); op->bypass_t = new_task; __TBB_store_with_release(op->status, SUCCEEDED); - } else if ( my_queue && my_queue->push(*(op->elem)) ) { + } else if ( my_queue && my_queue->push(*(op->elem)) ) { op->bypass_t = SUCCESSFULLY_ENQUEUED; __TBB_store_with_release(op->status, SUCCEEDED); } else { @@ -309,7 +309,7 @@ namespace internal { __TBB_store_with_release(op->status, FAILED); } } - + //! Tries to spawn bodies if available and if concurrency allows void internal_forward(operation_type *op) { op->bypass_t = NULL; @@ -332,7 +332,7 @@ namespace internal { } //! Applies the body to the provided input - // then decides if more work is available + // then decides if more work is available task * apply_body_bypass( input_type &i ) { task * new_task = static_cast(this)->apply_body_impl_bypass(i); if ( my_max_concurrency != 0 ) { @@ -343,10 +343,10 @@ namespace internal { } return new_task; } - + //! allocates a task to apply a body inline task * create_body_task( const input_type &input ) { - + return (my_graph.is_active()) ? new(task::allocate_additional_child_of(*(my_graph.root_task()))) apply_body_task_bypass < class_type, input_type >(*this, input) : @@ -361,7 +361,7 @@ namespace internal { FLOW_SPAWN(*tp); } } - + //! This is executed by an enqueued task, the "forwarder" task *forward_task() { operation_type op_data(try_fwd); @@ -376,7 +376,7 @@ namespace internal { } while (op_data.status == SUCCEEDED); return rval; } - + inline task *create_forward_task() { return (my_graph.is_active()) ? new(task::allocate_additional_child_of(*(my_graph.root_task()))) forward_task_bypass< class_type >(*this) : @@ -413,7 +413,7 @@ namespace internal { } //! Copy constructor - function_input( const function_input& src, input_queue_type *q = NULL ) : + function_input( const function_input& src, input_queue_type *q = NULL ) : base_type(src, q), my_body( src.my_init_body->clone() ), my_init_body(src.my_init_body->clone() ) { @@ -427,8 +427,8 @@ namespace internal { template< typename Body > Body copy_function_object() { function_body_type &body_ref = *this->my_body; - return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); - } + return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); + } task * apply_body_impl_bypass( const input_type &i) { #if TBB_PREVIEW_FLOW_GRAPH_TRACE @@ -438,7 +438,7 @@ namespace internal { output_type v = (*my_body)(i); tbb::internal::fgt_end_body( my_body ); task * new_task = successors().try_put_task( v ); -#else +#else task * new_task = successors().try_put_task( (*my_body)(i) ); #endif return new_task; @@ -469,7 +469,7 @@ namespace internal { clear_element::clear_this(p); } template static bool this_empty(P &p) { - if(tbb::flow::get(p).successors().empty()) + if(tbb::flow::get(p).successors().empty()) return clear_element::this_empty(p); return false; } @@ -501,7 +501,7 @@ namespace internal { #endif //! Implements methods for a function node that takes a type Input as input - // and has a tuple of output ports specified. + // and has a tuple of output ports specified. template< typename Input, typename OutputPortSet, typename A> class multifunction_input : public function_input_base > { public: @@ -526,7 +526,7 @@ namespace internal { } //! Copy constructor - multifunction_input( const multifunction_input& src, input_queue_type *q = NULL ) : + multifunction_input( const multifunction_input& src, input_queue_type *q = NULL ) : base_type(src, q), my_body( src.my_init_body->clone() ), my_init_body(src.my_init_body->clone() ) { @@ -540,8 +540,8 @@ namespace internal { template< typename Body > Body copy_function_object() { multifunction_body_type &body_ref = *this->my_body; - return dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); - } + return dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); + } // for multifunction nodes we do not have a single successor as such. So we just tell // the task we were successful. @@ -562,7 +562,7 @@ namespace internal { } #endif - /*override*/void reset(reset_flags f) { + /*override*/void reset(reset_flags f) { base_type::reset_function_input_base(f); if(f & rf_clear_edges)clear_element::clear_this(my_output_ports); if(f & rf_reset_bodies) { @@ -582,7 +582,7 @@ namespace internal { // template to refer to an output port of a multifunction_node template typename tbb::flow::tuple_element::type &output_port(MOP &op) { - return tbb::flow::get(op.output_ports()); + return tbb::flow::get(op.output_ports()); } // helper structs for split_node @@ -607,28 +607,28 @@ namespace internal { template< typename Output > class continue_input : public continue_receiver { public: - + //! The input type of this receiver typedef continue_msg input_type; - + //! The output type of this receiver typedef Output output_type; typedef function_body function_body_type; - + template< typename Body > continue_input( graph &g, Body& body ) - : my_graph_ptr(&g), + : my_graph_ptr(&g), my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ), my_init_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } - + template< typename Body > continue_input( graph &g, int number_of_predecessors, Body& body ) - : continue_receiver( number_of_predecessors ), my_graph_ptr(&g), + : continue_receiver( number_of_predecessors ), my_graph_ptr(&g), my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ), my_init_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } - continue_input( const continue_input& src ) : continue_receiver(src), + continue_input( const continue_input& src ) : continue_receiver(src), my_graph_ptr(src.my_graph_ptr), my_body( src.my_init_body->clone() ), my_init_body( src.my_init_body->clone() ) {} @@ -641,8 +641,8 @@ namespace internal { template< typename Body > Body copy_function_object() { function_body_type &body_ref = *my_body; - return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); - } + return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); + } /*override*/void reset_receiver( reset_flags f) { continue_receiver::reset_receiver(f); @@ -654,15 +654,15 @@ namespace internal { } protected: - + graph* my_graph_ptr; function_body_type *my_body; function_body_type *my_init_body; - - virtual broadcast_cache &successors() = 0; - + + virtual broadcast_cache &successors() = 0; + friend class apply_body_task_bypass< continue_input< Output >, continue_msg >; - + //! Applies the body to the provided input task *apply_body_bypass( input_type ) { #if TBB_PREVIEW_FLOW_GRAPH_TRACE @@ -672,15 +672,15 @@ namespace internal { output_type v = (*my_body)( continue_msg() ); tbb::internal::fgt_end_body( my_body ); return successors().try_put_task( v ); -#else +#else return successors().try_put_task( (*my_body)( continue_msg() ) ); #endif } - + //! Spawns a task that applies the body /* override */ task *execute( ) { return (my_graph_ptr->is_active()) ? - new ( task::allocate_additional_child_of( *(my_graph_ptr->root_task()) ) ) + new ( task::allocate_additional_child_of( *(my_graph_ptr->root_task()) ) ) apply_body_task_bypass< continue_input< Output >, continue_msg >( *this, continue_msg() ) : NULL; } @@ -691,7 +691,7 @@ namespace internal { template< typename Output > class function_output : public sender { public: - + template friend struct clear_element; typedef Output output_type; typedef receiver successor_type; @@ -700,18 +700,18 @@ namespace internal { typedef typename sender::built_successors_type built_successors_type; typedef typename sender::successor_list_type successor_list_type; #endif - + function_output() { my_successors.set_owner(this); } function_output(const function_output & /*other*/) : sender() { my_successors.set_owner(this); } - + //! Adds a new successor to this node /* override */ bool register_successor( receiver &r ) { successors().register_successor( r ); return true; } - + //! Removes a successor from this node /* override */ bool remove_successor( receiver &r ) { successors().remove_successor( r ); @@ -748,11 +748,11 @@ namespace internal { // if task pointer is returned will always spawn and return true, else // return value will be bool returned from successors.try_put. task *try_put_task(const output_type &i) { return my_successors.try_put_task(i); } - - broadcast_cache_type &successors() { return my_successors; } + + broadcast_cache_type &successors() { return my_successors; } protected: broadcast_cache_type my_successors; - + }; // function_output template< typename Output > @@ -761,7 +761,7 @@ namespace internal { typedef Output output_type; typedef function_output base_type; using base_type::my_successors; - + multifunction_output() : base_type() {my_successors.set_owner(this);} multifunction_output( const multifunction_output &/*other*/) : base_type() { my_successors.set_owner(this); } diff --git a/include/tbb/internal/_flow_graph_tagged_buffer_impl.h b/include/tbb/internal/_flow_graph_tagged_buffer_impl.h index 95bea242623bf7a4889d4103f9c7db18cf1e5e81..c49e9c16dd99f9106e106c07c8b2310dfbd592e4 100644 --- a/include/tbb/internal/_flow_graph_tagged_buffer_impl.h +++ b/include/tbb/internal/_flow_graph_tagged_buffer_impl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_flow_graph_trace_impl.h b/include/tbb/internal/_flow_graph_trace_impl.h index 3548596557a5f7a71a576406578328b53e5db5ee..24dd3a9e260966b779708ea646bb06004c5044c0 100644 --- a/include/tbb/internal/_flow_graph_trace_impl.h +++ b/include/tbb/internal/_flow_graph_trace_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -40,64 +40,64 @@ template void register_input_port(void *node, tbb::flow::receiver* port, string_index name_index) { //TODO: Make fgt_internal_create_input_port a function template? fgt_internal_create_input_port( node, port, name_index); -} +} template < typename PortsTuple, int N > struct fgt_internal_input_helper { static void register_port( void *node, PortsTuple &ports ) { register_input_port( node, &(tbb::flow::get(ports)), static_cast(FLOW_INPUT_PORT_0 + N - 1) ); fgt_internal_input_helper::register_port( node, ports ); - } + } }; template < typename PortsTuple > struct fgt_internal_input_helper { static void register_port( void *node, PortsTuple &ports ) { register_input_port( node, &(tbb::flow::get<0>(ports)), FLOW_INPUT_PORT_0 ); - } + } }; template void register_output_port(void *node, tbb::flow::sender* port, string_index name_index) { //TODO: Make fgt_internal_create_output_port a function template? fgt_internal_create_output_port( node, static_cast(port), name_index); -} +} template < typename PortsTuple, int N > struct fgt_internal_output_helper { static void register_port( void *node, PortsTuple &ports ) { - register_output_port( node, &(tbb::flow::get(ports)), static_cast(FLOW_OUTPUT_PORT_0 + N - 1) ); + register_output_port( node, &(tbb::flow::get(ports)), static_cast(FLOW_OUTPUT_PORT_0 + N - 1) ); fgt_internal_output_helper::register_port( node, ports ); - } + } }; template < typename PortsTuple > struct fgt_internal_output_helper { static void register_port( void *node, PortsTuple &ports ) { - register_output_port( node, &(tbb::flow::get<0>(ports)), FLOW_OUTPUT_PORT_0 ); - } + register_output_port( node, &(tbb::flow::get<0>(ports)), FLOW_OUTPUT_PORT_0 ); + } }; template< typename NodeType > void fgt_multioutput_node_desc( const NodeType *node, const char *desc ) { - void *addr = (void *)( static_cast< tbb::flow::receiver< typename NodeType::input_type > * >(const_cast< NodeType *>(node)) ); - itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); + void *addr = (void *)( static_cast< tbb::flow::receiver< typename NodeType::input_type > * >(const_cast< NodeType *>(node)) ); + itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); } template< typename NodeType > void fgt_multiinput_multioutput_node_desc( const NodeType *node, const char *desc ) { - void *addr = const_cast(node); - itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); + void *addr = const_cast(node); + itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); } template< typename NodeType > static inline void fgt_node_desc( const NodeType *node, const char *desc ) { - void *addr = (void *)( static_cast< tbb::flow::sender< typename NodeType::output_type > * >(const_cast< NodeType *>(node)) ); - itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); + void *addr = (void *)( static_cast< tbb::flow::sender< typename NodeType::output_type > * >(const_cast< NodeType *>(node)) ); + itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); } static inline void fgt_graph_desc( void *g, const char *desc ) { - itt_metadata_str_add( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, FLOW_OBJECT_NAME, desc ); + itt_metadata_str_add( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, FLOW_OBJECT_NAME, desc ); } static inline void fgt_body( void *node, void *body ) { @@ -106,34 +106,34 @@ static inline void fgt_body( void *node, void *body ) { template< int N, typename PortsTuple > static inline void fgt_multioutput_node( string_index t, void *g, void *input_port, PortsTuple &ports ) { - itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); - fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); - fgt_internal_output_helper::register_port( input_port, ports ); + itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); + fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); + fgt_internal_output_helper::register_port( input_port, ports ); } template< int N, typename PortsTuple > static inline void fgt_multioutput_node_with_body( string_index t, void *g, void *input_port, PortsTuple &ports, void *body ) { - itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); - fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); - fgt_internal_output_helper::register_port( input_port, ports ); + itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); + fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); + fgt_internal_output_helper::register_port( input_port, ports ); fgt_body( input_port, body ); } template< int N, typename PortsTuple > static inline void fgt_multiinput_node( string_index t, void *g, PortsTuple &ports, void *output_port) { - itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); - fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); - fgt_internal_input_helper::register_port( output_port, ports ); + itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); + fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); + fgt_internal_input_helper::register_port( output_port, ports ); } static inline void fgt_node( string_index t, void *g, void *output_port ) { - itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); - fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); + itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); + fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); } static inline void fgt_node_with_body( string_index t, void *g, void *output_port, void *body ) { - itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); - fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); + itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); + fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); fgt_body( output_port, body ); } @@ -145,13 +145,13 @@ static inline void fgt_node( string_index t, void *g, void *input_port, void *ou static inline void fgt_node_with_body( string_index t, void *g, void *input_port, void *output_port, void *body ) { fgt_node_with_body( t, g, output_port, body ); - fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 ); + fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 ); } static inline void fgt_node( string_index t, void *g, void *input_port, void *decrement_port, void *output_port ) { fgt_node( t, g, input_port, output_port ); - fgt_internal_create_input_port( output_port, decrement_port, FLOW_INPUT_PORT_1 ); + fgt_internal_create_input_port( output_port, decrement_port, FLOW_INPUT_PORT_1 ); } static inline void fgt_make_edge( void *output_port, void *input_port ) { @@ -163,7 +163,7 @@ static inline void fgt_remove_edge( void *output_port, void *input_port ) { } static inline void fgt_graph( void *g ) { - itt_make_task_group( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, NULL, FLOW_NULL, FLOW_GRAPH ); + itt_make_task_group( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, NULL, FLOW_NULL, FLOW_GRAPH ); } static inline void fgt_begin_body( void *body ) { @@ -204,7 +204,7 @@ static inline void fgt_graph_desc( void * /*g*/, const char * /*desc*/ ) { } static inline void fgt_body( void * /*node*/, void * /*body*/ ) { } -template< int N, typename PortsTuple > +template< int N, typename PortsTuple > static inline void fgt_multioutput_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, PortsTuple & /*ports*/ ) { } template< int N, typename PortsTuple > @@ -213,8 +213,8 @@ static inline void fgt_multioutput_node_with_body( string_index /*t*/, void * /* template< int N, typename PortsTuple > static inline void fgt_multiinput_node( string_index /*t*/, void * /*g*/, PortsTuple & /*ports*/, void * /*output_port*/ ) { } -static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*output_port*/ ) { } -static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/ ) { } +static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*output_port*/ ) { } +static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/ ) { } static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*decrement_port*/, void * /*output_port*/ ) { } static inline void fgt_node_with_body( string_index /*t*/, void * /*g*/, void * /*output_port*/, void * /*body*/ ) { } diff --git a/include/tbb/internal/_flow_graph_types_impl.h b/include/tbb/internal/_flow_graph_types_impl.h index d85af08e25084e6840936ccc8ec94583d7203271..cb18270617ead5cf9f7d07a7ed4ab85977ccdb17 100644 --- a/include/tbb/internal/_flow_graph_types_impl.h +++ b/include/tbb/internal/_flow_graph_types_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -361,7 +361,7 @@ namespace internal { #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ ~initializer_list_wrapper() { - if ( my_begin ) + if ( my_begin ) free( my_begin ); } diff --git a/include/tbb/internal/_mutex_padding.h b/include/tbb/internal/_mutex_padding.h index 53d164fb453d8600a6c5aa0dbe8b8127abd058a4..9dc7a187565ebe9257bbf9b921fe731e3ba9abac 100644 --- a/include/tbb/internal/_mutex_padding.h +++ b/include/tbb/internal/_mutex_padding.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_range_iterator.h b/include/tbb/internal/_range_iterator.h index 37cd6162fb5ca93f6cf14451c9de7ba29c31e7b4..030f5bf4a46abc0645ea6bca47098a5e530e7405 100644 --- a/include/tbb/internal/_range_iterator.h +++ b/include/tbb/internal/_range_iterator.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_tbb_hash_compare_impl.h b/include/tbb/internal/_tbb_hash_compare_impl.h index f9b9cb7dd4b77699c268c3c9c0f9d2a284acdf03..748ec65900efda1ff778da089604630bf19b3525 100644 --- a/include/tbb/internal/_tbb_hash_compare_impl.h +++ b/include/tbb/internal/_tbb_hash_compare_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -26,7 +26,7 @@ namespace tbb { namespace interface5 { -namespace internal { +namespace internal { // Template class for hash compare template diff --git a/include/tbb/internal/_tbb_strings.h b/include/tbb/internal/_tbb_strings.h index 101a5216a3f0e98ddf41105b80e13040ba39435e..f5469fb1b6e4e2433cded7d0bb5376e2959674b5 100644 --- a/include/tbb/internal/_tbb_strings.h +++ b/include/tbb/internal/_tbb_strings.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_tbb_windef.h b/include/tbb/internal/_tbb_windef.h index 2eddc52806abcec6365d99e919a5dc684ab3bcff..6b80e0b194acef27e58ab2161b33352c26d3034b 100644 --- a/include/tbb/internal/_tbb_windef.h +++ b/include/tbb/internal/_tbb_windef.h @@ -1,5 +1,5 @@ /* - 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 @@ -43,7 +43,7 @@ namespace std { // Default setting of TBB_USE_DEBUG #ifdef TBB_USE_DEBUG -# if TBB_USE_DEBUG +# if TBB_USE_DEBUG # if !defined(_DEBUG) # pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0") # endif diff --git a/include/tbb/internal/_template_helpers.h b/include/tbb/internal/_template_helpers.h index 429c8b95387d0dc22848e7e828a6f5e88cde8b08..b55ebc6d91852e86bd7639f27996b27e7564698a 100644 --- a/include/tbb/internal/_template_helpers.h +++ b/include/tbb/internal/_template_helpers.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_x86_eliding_mutex_impl.h b/include/tbb/internal/_x86_eliding_mutex_impl.h index 4b549396e9c1ccabe6fa26117299da1799d41b61..954248b3448d66395ebdc019b644f6b3bf067a15 100644 --- a/include/tbb/internal/_x86_eliding_mutex_impl.h +++ b/include/tbb/internal/_x86_eliding_mutex_impl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/internal/_x86_rtm_rw_mutex_impl.h b/include/tbb/internal/_x86_rtm_rw_mutex_impl.h index 6b4fbff755664c1c5bb99cfb29d5b8a830127859..9274c9a6c2f8f7cf90d2e5216994aa1a116fc6d2 100644 --- a/include/tbb/internal/_x86_rtm_rw_mutex_impl.h +++ b/include/tbb/internal/_x86_rtm_rw_mutex_impl.h @@ -1,5 +1,5 @@ /* - 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 @@ -58,7 +58,7 @@ public: private: #endif friend class interface7::internal::padded_mutex; - class scoped_lock; // should be private + class scoped_lock; // should be private friend class scoped_lock; private: //! @cond INTERNAL diff --git a/include/tbb/machine/gcc_armv7.h b/include/tbb/machine/gcc_armv7.h index 6fa8536f980b4767cefc6433e8faec80a86ff398..dcd7c8aaf872ef43022e6934e43fdd6643e8d25b 100644 --- a/include/tbb/machine/gcc_armv7.h +++ b/include/tbb/machine/gcc_armv7.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/gcc_generic.h b/include/tbb/machine/gcc_generic.h index 53b528176b46643e1f36709645adb10756fb938a..bd698a44bfb5bbf4b87d179a64ad3b2dd9faa58c 100644 --- a/include/tbb/machine/gcc_generic.h +++ b/include/tbb/machine/gcc_generic.h @@ -1,5 +1,5 @@ /* - 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 @@ -34,7 +34,7 @@ #endif /** FPU control setting not available for non-Intel architectures on Android **/ -#if __ANDROID__ && __TBB_generic_arch +#if __ANDROID__ && __TBB_generic_arch #define __TBB_CPU_CTL_ENV_PRESENT 0 #endif diff --git a/include/tbb/machine/gcc_ia32_common.h b/include/tbb/machine/gcc_ia32_common.h index e11ca11b469db4152381adfebcfac51252f79645..965593f0efb72f2e4755ebbe8a26584e4e3d4171 100644 --- a/include/tbb/machine/gcc_ia32_common.h +++ b/include/tbb/machine/gcc_ia32_common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/gcc_itsx.h b/include/tbb/machine/gcc_itsx.h index af1b53017f11a0a40e6759063dce530bbaf22fec..1583379c721c12571c95142a879447fae4c4cc82 100644 --- a/include/tbb/machine/gcc_itsx.h +++ b/include/tbb/machine/gcc_itsx.h @@ -1,5 +1,5 @@ /* - 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 @@ -53,7 +53,7 @@ inline static void __TBB_machine_try_lock_elided_cancel() inline static void __TBB_machine_unlock_elided( volatile uint8_t* lk ) { - __asm__ volatile (".byte " __TBB_STRINGIZE(__TBB_OP_XRELEASE)"; movb $0, %0" + __asm__ volatile (".byte " __TBB_STRINGIZE(__TBB_OP_XRELEASE)"; movb $0, %0" : "=m"(*lk) : "m"(*lk) : "memory" ); } @@ -92,7 +92,7 @@ inline static uint32_t __TBB_machine_begin_transaction() { uint32_t res = ~uint32_t(0); // success value __asm__ volatile ("1: .byte 0xC7; .byte 0xF8;\n" // XBEGIN - " .long 2f-1b-6\n" // 2f-1b == difference in addresses of start + " .long 2f-1b-6\n" // 2f-1b == difference in addresses of start // of XBEGIN and the MOVL // 2f - 1b - 6 == that difference minus the size of the // XBEGIN instruction. This is the abort offset to @@ -105,7 +105,7 @@ inline static uint32_t __TBB_machine_begin_transaction() } /*! - * Attempt to commit/end transaction + * Attempt to commit/end transaction */ inline static void __TBB_machine_end_transaction() { diff --git a/include/tbb/machine/ibm_aix51.h b/include/tbb/machine/ibm_aix51.h index 65be8dc867a6241d79cb8caf931a48d4943c023f..28dd0daa16b87c8054667a7228904f887a88fbcd 100644 --- a/include/tbb/machine/ibm_aix51.h +++ b/include/tbb/machine/ibm_aix51.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/icc_generic.h b/include/tbb/machine/icc_generic.h index bd2091886edd5012c95f1b596e7625bcb97371b6..7dae6e7bf8ecd58d4c844072484a5c2e42c9b351 100644 --- a/include/tbb/machine/icc_generic.h +++ b/include/tbb/machine/icc_generic.h @@ -1,5 +1,5 @@ /* - 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 @@ -57,7 +57,7 @@ #endif #ifndef __TBB_full_memory_fence -#if _MSC_VER +#if _MSC_VER //TODO: any way to use same intrinsics on windows and linux? #pragma intrinsic(_mm_mfence) #define __TBB_full_memory_fence() _mm_mfence() diff --git a/include/tbb/machine/linux_common.h b/include/tbb/machine/linux_common.h index 7d64e3a3f69826b5c296a9c2ff5d4507d82cefb9..208081353051247a23cee1736ef659dbf22ffad2 100644 --- a/include/tbb/machine/linux_common.h +++ b/include/tbb/machine/linux_common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/linux_ia32.h b/include/tbb/machine/linux_ia32.h index fecbe02f5debae3aee32edde6f2498a99f497f66..f644000391c54d5287aa9212442fb5c7ac3bd94a 100644 --- a/include/tbb/machine/linux_ia32.h +++ b/include/tbb/machine/linux_ia32.h @@ -1,5 +1,5 @@ /* - 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 @@ -73,7 +73,7 @@ static inline T __TBB_machine_fetchstore##S(volatile void *ptr, T value) : "memory"); \ return result; \ } \ - + __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t,"","=q") __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t,"","=r") __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t,"l","=r") @@ -102,7 +102,7 @@ static inline __TBB_IA32_CAS8_NOINLINE int64_t __TBB_machine_cmpswp8 (volatile v int32_t i32[2]; }; i64 = value; -#if __PIC__ +#if __PIC__ /* compiling position-independent code */ // EBX register preserved for compliance with position-independent code rules on IA32 int32_t tmp; @@ -218,7 +218,7 @@ static inline void __TBB_machine_store8(volatile void *ptr, int64_t value) { } #endif } - + // Machine specific atomic operations #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) diff --git a/include/tbb/machine/linux_ia64.h b/include/tbb/machine/linux_ia64.h index b7d2f1c3e58d975f162cb07244f44d76df0ff35c..60e83b4797e7ebf3cba1d1ee402a6f1ba987436d 100644 --- a/include/tbb/machine/linux_ia64.h +++ b/include/tbb/machine/linux_ia64.h @@ -1,5 +1,5 @@ /* - 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 @@ -39,7 +39,7 @@ #else #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #define __TBB_control_consistency_helper() __TBB_compiler_fence() - // Even though GCC imbues volatile loads with acquire semantics, it sometimes moves + // Even though GCC imbues volatile loads with acquire semantics, it sometimes moves // loads over the acquire fence. The following helpers stop such incorrect code motion. #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() @@ -82,21 +82,21 @@ extern "C" { int64_t __TBB_machine_fetchstore8acquire(volatile void *ptr, int64_t value); int64_t __TBB_machine_fetchstore8release(volatile void *ptr, int64_t value); - int8_t __TBB_machine_cmpswp1__TBB_full_fence (volatile void *ptr, int8_t value, int8_t comparand); - int8_t __TBB_machine_cmpswp1acquire(volatile void *ptr, int8_t value, int8_t comparand); - int8_t __TBB_machine_cmpswp1release(volatile void *ptr, int8_t value, int8_t comparand); + int8_t __TBB_machine_cmpswp1__TBB_full_fence (volatile void *ptr, int8_t value, int8_t comparand); + int8_t __TBB_machine_cmpswp1acquire(volatile void *ptr, int8_t value, int8_t comparand); + int8_t __TBB_machine_cmpswp1release(volatile void *ptr, int8_t value, int8_t comparand); int16_t __TBB_machine_cmpswp2__TBB_full_fence (volatile void *ptr, int16_t value, int16_t comparand); - int16_t __TBB_machine_cmpswp2acquire(volatile void *ptr, int16_t value, int16_t comparand); - int16_t __TBB_machine_cmpswp2release(volatile void *ptr, int16_t value, int16_t comparand); + int16_t __TBB_machine_cmpswp2acquire(volatile void *ptr, int16_t value, int16_t comparand); + int16_t __TBB_machine_cmpswp2release(volatile void *ptr, int16_t value, int16_t comparand); int32_t __TBB_machine_cmpswp4__TBB_full_fence (volatile void *ptr, int32_t value, int32_t comparand); - int32_t __TBB_machine_cmpswp4acquire(volatile void *ptr, int32_t value, int32_t comparand); - int32_t __TBB_machine_cmpswp4release(volatile void *ptr, int32_t value, int32_t comparand); + int32_t __TBB_machine_cmpswp4acquire(volatile void *ptr, int32_t value, int32_t comparand); + int32_t __TBB_machine_cmpswp4release(volatile void *ptr, int32_t value, int32_t comparand); int64_t __TBB_machine_cmpswp8__TBB_full_fence (volatile void *ptr, int64_t value, int64_t comparand); - int64_t __TBB_machine_cmpswp8acquire(volatile void *ptr, int64_t value, int64_t comparand); - int64_t __TBB_machine_cmpswp8release(volatile void *ptr, int64_t value, int64_t comparand); + int64_t __TBB_machine_cmpswp8acquire(volatile void *ptr, int64_t value, int64_t comparand); + int64_t __TBB_machine_cmpswp8release(volatile void *ptr, int64_t value, int64_t comparand); int64_t __TBB_machine_lg(uint64_t value); void __TBB_machine_pause(int32_t delay); @@ -127,7 +127,7 @@ extern "C" { #define __TBB_machine_fetchstore4full_fence __TBB_machine_fetchstore4__TBB_full_fence #define __TBB_machine_fetchstore8full_fence __TBB_machine_fetchstore8__TBB_full_fence #define __TBB_machine_cmpswp1full_fence __TBB_machine_cmpswp1__TBB_full_fence -#define __TBB_machine_cmpswp2full_fence __TBB_machine_cmpswp2__TBB_full_fence +#define __TBB_machine_cmpswp2full_fence __TBB_machine_cmpswp2__TBB_full_fence #define __TBB_machine_cmpswp4full_fence __TBB_machine_cmpswp4__TBB_full_fence #define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8__TBB_full_fence @@ -143,7 +143,7 @@ extern "C" { #define __TBB_machine_fetchstore4relaxed __TBB_machine_fetchstore4acquire #define __TBB_machine_fetchstore8relaxed __TBB_machine_fetchstore8acquire #define __TBB_machine_cmpswp1relaxed __TBB_machine_cmpswp1acquire -#define __TBB_machine_cmpswp2relaxed __TBB_machine_cmpswp2acquire +#define __TBB_machine_cmpswp2relaxed __TBB_machine_cmpswp2acquire #define __TBB_machine_cmpswp4relaxed __TBB_machine_cmpswp4acquire #define __TBB_machine_cmpswp8relaxed __TBB_machine_cmpswp8acquire diff --git a/include/tbb/machine/linux_intel64.h b/include/tbb/machine/linux_intel64.h index f63b91621c2df48c62a3d34e74bab7e801425390..cc538ab0bbb74ddd97018ed468be8a495be9841e 100644 --- a/include/tbb/machine/linux_intel64.h +++ b/include/tbb/machine/linux_intel64.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/mac_ppc.h b/include/tbb/machine/mac_ppc.h index f1d8e6799ec72a28c78e9638e908c30b2ad9346d..7f5474ee1b7ff3bdc2bd08d5d066a1a93ea6fe52 100644 --- a/include/tbb/machine/mac_ppc.h +++ b/include/tbb/machine/mac_ppc.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/macos_common.h b/include/tbb/machine/macos_common.h index 6689649752163ec8f79cfcc02b43ef02f6e81684..c2c86c38c126c5554f20e278750f2ae521addc79 100644 --- a/include/tbb/machine/macos_common.h +++ b/include/tbb/machine/macos_common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/mic_common.h b/include/tbb/machine/mic_common.h index 1d4f71d941a804deeb14cadf0dac0f0047238f90..606b345817a3c01625ad5b03ae2b693b0325bea2 100644 --- a/include/tbb/machine/mic_common.h +++ b/include/tbb/machine/mic_common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/msvc_armv7.h b/include/tbb/machine/msvc_armv7.h index de9b02e32fd5411f7f4beb2eb64beb12bad1404e..cc1c1bf26d04b6df303d01e5ea4997af3e22e2ff 100644 --- a/include/tbb/machine/msvc_armv7.h +++ b/include/tbb/machine/msvc_armv7.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/msvc_ia32_common.h b/include/tbb/machine/msvc_ia32_common.h index f8dd3ab9e7f7e5178aab7e3ec5dce421b9f84a38..9caaa2b1e1c1863eb8853686b91b03bbed3816a6 100644 --- a/include/tbb/machine/msvc_ia32_common.h +++ b/include/tbb/machine/msvc_ia32_common.h @@ -1,5 +1,5 @@ /* - 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 @@ -174,7 +174,7 @@ #endif namespace tbb { namespace internal { namespace msvc_inline_asm { static inline void lock_or( volatile void *operand, __int32 addend ) { - __asm + __asm { mov eax, addend mov edx, [operand] @@ -182,7 +182,7 @@ } } static inline void lock_and( volatile void *operand, __int32 addend ) { - __asm + __asm { mov eax, addend mov edx, [operand] diff --git a/include/tbb/machine/sunos_sparc.h b/include/tbb/machine/sunos_sparc.h index a6d8cbdec7041eec0944fd2b62fa5312a5a9fd44..f28401f9bc31b259286f0aae734fb3efd7150837 100644 --- a/include/tbb/machine/sunos_sparc.h +++ b/include/tbb/machine/sunos_sparc.h @@ -1,5 +1,5 @@ /* - 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 @@ -30,7 +30,7 @@ #define __TBB_WORDSIZE 8 // Big endian is assumed for SPARC. -// While hardware may support page-specific bi-endianness, only big endian pages may be exposed to TBB +// While hardware may support page-specific bi-endianness, only big endian pages may be exposed to TBB #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG /** To those working on SPARC hardware. Consider relaxing acquire and release diff --git a/include/tbb/machine/windows_api.h b/include/tbb/machine/windows_api.h index 32386e5ba29f5a00a9158675ba51aff559b94f73..bafa1d1e698fb88ac1108ab0af7bc7b1f7fdb264 100644 --- a/include/tbb/machine/windows_api.h +++ b/include/tbb/machine/windows_api.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/windows_ia32.h b/include/tbb/machine/windows_ia32.h index f0d647b72b3495995f5d02d2e00742d26b72080c..c1186727f949d928f93c6deacd0812f1e4dcd4bd 100644 --- a/include/tbb/machine/windows_ia32.h +++ b/include/tbb/machine/windows_ia32.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/windows_intel64.h b/include/tbb/machine/windows_intel64.h index 8c04fe4c9c7e42e903c5ac867af8e2dd3d3333d5..3ddae49e86d0699fc3b6bb1466abda93b2a238e4 100644 --- a/include/tbb/machine/windows_intel64.h +++ b/include/tbb/machine/windows_intel64.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/machine/xbox360_ppc.h b/include/tbb/machine/xbox360_ppc.h index 489362783b73add6d8f5320ff20153fac1c74860..962b4c13e5ff65583bfa02bc26e151e216f6d14c 100644 --- a/include/tbb/machine/xbox360_ppc.h +++ b/include/tbb/machine/xbox360_ppc.h @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ #define NONET #define NOD3D -#include "xtl.h" +#include "xtl.h" #include "ppcintrinsics.h" #if _MSC_VER >= 1300 @@ -46,7 +46,7 @@ extern "C" void _MemoryBarrier(); //todo: define __TBB_USE_FENCED_ATOMICS and define acquire/release primitives to maximize performance -inline __int32 __TBB_machine_cmpswp4(volatile void *ptr, __int32 value, __int32 comparand ) { +inline __int32 __TBB_machine_cmpswp4(volatile void *ptr, __int32 value, __int32 comparand ) { __sync(); __int32 result = InterlockedCompareExchange((volatile LONG*)ptr, value, comparand); __isync(); @@ -70,21 +70,21 @@ inline __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #pragma optimize( "", off ) -inline void __TBB_machine_pause (__int32 delay ) +inline void __TBB_machine_pause (__int32 delay ) { for (__int32 i=0; i>= 1; index++; } - return index; + return index; } #define __TBB_HardwareConcurrency() __TBB_XBOX360_DetectNumberOfWorkers() diff --git a/include/tbb/memory_pool.h b/include/tbb/memory_pool.h index 1ddec4f469578b554d9176f5e5b5839a723efd9c..4bfc8181ed3196914de2bfeea7d0b2dc223f05a1 100644 --- a/include/tbb/memory_pool.h +++ b/include/tbb/memory_pool.h @@ -1,5 +1,5 @@ /* - 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 @@ -114,7 +114,7 @@ public: pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } - + //! Allocate space for n objects. pointer allocate( size_type n, const void* /*hint*/ = 0) { pointer p = static_cast( my_pool->malloc( n*sizeof(value_type) ) ); @@ -154,7 +154,7 @@ public: //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ -template +template class memory_pool_allocator { public: typedef P pool_type; diff --git a/include/tbb/mutex.h b/include/tbb/mutex.h index df328fdead8b78856972ec5588856455c8e3efbe..358809e0c0bb280e4993ae4549056399959d82f4 100644 --- a/include/tbb/mutex.h +++ b/include/tbb/mutex.h @@ -1,5 +1,5 @@ /* - 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 @@ -61,7 +61,7 @@ public: #if _WIN32||_WIN64 DeleteCriticalSection(&impl); #else - pthread_mutex_destroy(&impl); + pthread_mutex_destroy(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ @@ -75,7 +75,7 @@ public: It also nicely provides the "node" for queuing locks. */ class scoped_lock : internal::no_copy { public: - //! Construct lock that has not acquired a mutex. + //! Construct lock that has not acquired a mutex. scoped_lock() : my_mutex(NULL) {}; //! Acquire lock on given mutex. @@ -85,7 +85,7 @@ public: //! Release lock (if lock is held). ~scoped_lock() { - if( my_mutex ) + if( my_mutex ) release(); } @@ -208,7 +208,7 @@ public: }; private: #if _WIN32||_WIN64 - CRITICAL_SECTION impl; + CRITICAL_SECTION impl; enum state_t state; #else pthread_mutex_t impl; @@ -229,6 +229,6 @@ public: __TBB_DEFINE_PROFILING_SET_NAME(mutex) -} // namespace tbb +} // namespace tbb #endif /* __TBB_mutex_H */ diff --git a/include/tbb/null_mutex.h b/include/tbb/null_mutex.h index 78a16b79b0029227e22e5174598700738417cba5..ca93ae3e9071047847767c52a74def60e86d13f5 100644 --- a/include/tbb/null_mutex.h +++ b/include/tbb/null_mutex.h @@ -1,5 +1,5 @@ /* - 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 @@ -24,30 +24,30 @@ #include "tbb_stddef.h" namespace tbb { - + //! A mutex which does nothing /** A null_mutex does no operation and simulates success. @ingroup synchronization */ class null_mutex : internal::mutex_copy_deprecated_and_disabled { -public: +public: //! Represents acquisition of a mutex. - class scoped_lock : internal::no_copy { - public: + class scoped_lock : internal::no_copy { + public: scoped_lock() {} - scoped_lock( null_mutex& ) {} + scoped_lock( null_mutex& ) {} ~scoped_lock() {} void acquire( null_mutex& ) {} bool try_acquire( null_mutex& ) { return true; } void release() {} }; - + null_mutex() {} - - // Mutex traits - static const bool is_rw_mutex = false; + + // Mutex traits + static const bool is_rw_mutex = false; static const bool is_recursive_mutex = true; static const bool is_fair_mutex = true; -}; +}; } diff --git a/include/tbb/null_rw_mutex.h b/include/tbb/null_rw_mutex.h index 390a85b2922e1e6696ebffcaa0679f5a04e0920c..7ec6b467073c7597a2dc7b9d9ff5bb57f885e84a 100644 --- a/include/tbb/null_rw_mutex.h +++ b/include/tbb/null_rw_mutex.h @@ -1,5 +1,5 @@ /* - 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 @@ -24,15 +24,15 @@ #include "tbb_stddef.h" namespace tbb { - + //! A rw mutex which does nothing /** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation. @ingroup synchronization */ class null_rw_mutex : internal::mutex_copy_deprecated_and_disabled { -public: +public: //! Represents acquisition of a mutex. - class scoped_lock : internal::no_copy { - public: + class scoped_lock : internal::no_copy { + public: scoped_lock() {} scoped_lock( null_rw_mutex& , bool = true ) {} ~scoped_lock() {} @@ -42,14 +42,14 @@ public: bool try_acquire( null_rw_mutex& , bool = true ) { return true; } void release() {} }; - + null_rw_mutex() {} - - // Mutex traits - static const bool is_rw_mutex = true; + + // Mutex traits + static const bool is_rw_mutex = true; static const bool is_recursive_mutex = true; static const bool is_fair_mutex = true; -}; +}; } diff --git a/include/tbb/parallel_do.h b/include/tbb/parallel_do.h index 6a2d8dd2640bfc1aa910908979bf681b1ef4a99b..5c6e5d75f22224a52f59dc3baa6d6b0de9dad1f1 100644 --- a/include/tbb/parallel_do.h +++ b/include/tbb/parallel_do.h @@ -1,5 +1,5 @@ /* - 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 @@ -88,11 +88,11 @@ namespace internal { Item my_value; feeder_type& my_feeder; - do_iteration_task( const Item& value, feeder_type& feeder ) : + do_iteration_task( const Item& value, feeder_type& feeder ) : my_value(value), my_feeder(feeder) {} - /*override*/ + /*override*/ task* execute() { // TODO: use move semantics for my_value @@ -111,11 +111,11 @@ namespace internal { Iterator my_iter; feeder_type& my_feeder; - do_iteration_task_iter( const Iterator& iter, feeder_type& feeder ) : + do_iteration_task_iter( const Iterator& iter, feeder_type& feeder ) : my_iter(iter), my_feeder(feeder) {} - /*override*/ + /*override*/ task* execute() { parallel_do_operator_selector::call(*my_feeder.my_body, *my_iter, my_feeder); @@ -133,7 +133,7 @@ namespace internal { template class parallel_do_feeder_impl : public parallel_do_feeder { - /*override*/ + /*override*/ void internal_add( const Item& item ) { typedef do_iteration_task iteration_type; @@ -182,7 +182,7 @@ namespace internal { Iterator my_first; size_t my_size; - do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) + do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) : my_feeder(feeder), my_first(first), my_size(size) {} @@ -191,8 +191,8 @@ namespace internal { typedef do_iteration_task_iter iteration_type; __TBB_ASSERT( my_size>0, NULL ); task_list list; - task* t; - size_t k=0; + task* t; + size_t k=0; for(;;) { t = new( allocate_child() ) iteration_type( my_first, my_feeder ); ++my_first; @@ -228,8 +228,8 @@ namespace internal { typedef do_iteration_task_iter iteration_type; __TBB_ASSERT( my_size>0, NULL ); task_list list; - task* t; - size_t k=0; + task* t; + size_t k=0; for(;;) { t = new( allocate_child() ) iteration_type( my_arg.begin() + k, my_feeder ); if( ++k==my_size ) break; @@ -258,7 +258,7 @@ namespace internal { typedef parallel_do_feeder_impl feeder_type; public: - do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : + do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : my_first(first), my_last(last), my_feeder(feeder) {} @@ -269,13 +269,13 @@ namespace internal { /* Do not merge run(xxx) and run_xxx() methods. They are separated in order to make sure that compilers will eliminate unused argument of type xxx - (that is will not put it on stack). The sole purpose of this argument + (that is will not put it on stack). The sole purpose of this argument is overload resolution. - An alternative could be using template functions, but explicit specialization - of member function templates is not supported for non specialized class - templates. Besides template functions would always fall back to the least - efficient variant (the one for input iterators) in case of iterators having + An alternative could be using template functions, but explicit specialization + of member function templates is not supported for non specialized class + templates. Besides template functions would always fall back to the least + efficient variant (the one for input iterators) in case of iterators having custom tags derived from basic ones. */ /*override*/ task* execute() { @@ -291,7 +291,7 @@ namespace internal { typedef do_group_task_input block_type; block_type& t = *new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder); - size_t k=0; + size_t k=0; while( !(my_first == my_last) ) { // TODO: move *my_first new (t.my_arg.begin() + k) Item(*my_first); @@ -317,7 +317,7 @@ namespace internal { typedef do_group_task_forward block_type; Iterator first = my_first; - size_t k=0; + size_t k=0; while( !(my_first==my_last) ) { ++my_first; if( ++k==block_type::max_arg_size ) { @@ -335,7 +335,7 @@ namespace internal { typedef do_group_task_forward block_type; typedef do_iteration_task_iter iteration_type; - size_t k = static_cast(my_last-my_first); + size_t k = static_cast(my_last-my_first); if( k > block_type::max_arg_size ) { Iterator middle = my_first + k/2; @@ -349,8 +349,8 @@ namespace internal { return this; }else if( k != 0 ) { task_list list; - task* t; - size_t k1=0; + task* t; + size_t k1=0; for(;;) { t = new( allocate_child() ) iteration_type(my_first, my_feeder); ++my_first; @@ -368,7 +368,7 @@ namespace internal { //! For internal use only. /** Implements parallel iteration over a range. @ingroup algorithms */ - template + template void run_parallel_do( Iterator first, Iterator last, const Body& body #if __TBB_TASK_GROUP_CONTEXT , task_group_context& context @@ -392,27 +392,27 @@ namespace internal { //! For internal use only. /** Detects types of Body's operator function arguments. @ingroup algorithms **/ - template + template void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item) const #if __TBB_TASK_GROUP_CONTEXT - , task_group_context& context -#endif // __TBB_TASK_GROUP_CONTEXT + , task_group_context& context +#endif // __TBB_TASK_GROUP_CONTEXT ) { run_parallel_do::type>( first, last, body #if __TBB_TASK_GROUP_CONTEXT , context -#endif // __TBB_TASK_GROUP_CONTEXT +#endif // __TBB_TASK_GROUP_CONTEXT ); } //! For internal use only. /** Detects types of Body's operator function arguments. @ingroup algorithms **/ - template + template void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item, parallel_do_feeder<_Item>&) const #if __TBB_TASK_GROUP_CONTEXT - , task_group_context& context + , task_group_context& context #endif // __TBB_TASK_GROUP_CONTEXT ) { @@ -429,8 +429,8 @@ namespace internal { /** \page parallel_do_body_req Requirements on parallel_do body Class \c Body implementing the concept of parallel_do body must define: - - \code - B::operator()( + - \code + B::operator()( cv_item_type item, parallel_do_feeder& feeder ) const @@ -438,10 +438,10 @@ namespace internal { OR B::operator()( cv_item_type& item ) const - \endcode Process item. + \endcode Process item. May be invoked concurrently for the same \c this but different \c item. - - \code item_type( const item_type& ) \endcode + - \code item_type( const item_type& ) \endcode Copy a work item. - \code ~item_type() \endcode Destroy a work item **/ @@ -451,7 +451,7 @@ namespace internal { //@{ //! Parallel iteration over a range, with optional addition of more work. /** @ingroup algorithms */ -template +template void parallel_do( Iterator first, Iterator last, const Body& body ) { if ( first == last ) @@ -479,7 +479,7 @@ void parallel_do(const Range& rng, const Body& body) { #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration over a range, with optional addition of more work and user-supplied context /** @ingroup algorithms */ -template +template void parallel_do( Iterator first, Iterator last, const Body& body, task_group_context& context ) { if ( first == last ) @@ -501,6 +501,6 @@ void parallel_do(const Range& rng, const Body& body, task_group_context& context //@} -} // namespace +} // namespace #endif /* __TBB_parallel_do_H */ diff --git a/include/tbb/parallel_for.h b/include/tbb/parallel_for.h index e8854ed4dc285ee54c808dd0e17a42a8553e50ec..bbba8538bb4f471c84fcdb0171a9da4c60ab88d8 100644 --- a/include/tbb/parallel_for.h +++ b/include/tbb/parallel_for.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/parallel_for_each.h b/include/tbb/parallel_for_each.h index f3d64d89a0cb8135b27e73c9ad6d771dc362d577..46f1e343b35f0dcb811c47474b169e60b8110cbf 100644 --- a/include/tbb/parallel_for_each.h +++ b/include/tbb/parallel_for_each.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/parallel_invoke.h b/include/tbb/parallel_invoke.h index 14c07643f6708221e5518307a9b6706e29c1a877..0c193bc994b82089c92c360402913d1f89692354 100644 --- a/include/tbb/parallel_invoke.h +++ b/include/tbb/parallel_invoke.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/parallel_reduce.h b/include/tbb/parallel_reduce.h index 1041a83290480f3ce8d178365ae40e99e9314c67..d387c44176db64f09a15e25e7a6c9372a6410494 100644 --- a/include/tbb/parallel_reduce.h +++ b/include/tbb/parallel_reduce.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/parallel_scan.h b/include/tbb/parallel_scan.h index 716338babeabe324274bcfa9957ec167a5cabd12..00c9b4c8658e7c60a4f213b3f6a9e2aa001ab558 100644 --- a/include/tbb/parallel_scan.h +++ b/include/tbb/parallel_scan.h @@ -1,5 +1,5 @@ /* - 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 @@ -43,7 +43,7 @@ struct final_scan_tag { //! @cond INTERNAL namespace internal { - //! Performs final scan for a leaf + //! Performs final scan for a leaf /** @ingroup algorithms */ template class final_sum: public task { @@ -61,7 +61,7 @@ namespace internal { } ~final_sum() { my_range.begin()->~Range(); - } + } void finish_construction( const Range& range_, Body* stuff_last_ ) { new( my_range.begin() ) Range(range_); my_stuff_last = stuff_last_; @@ -73,7 +73,7 @@ namespace internal { my_stuff_last->assign(my_body); return NULL; } - }; + }; //! Split work to be done in the scan. /** @ingroup algorithms */ @@ -81,20 +81,20 @@ namespace internal { class sum_node: public task { typedef final_sum final_sum_type; public: - final_sum_type *my_incoming; + final_sum_type *my_incoming; final_sum_type *my_body; Body *my_stuff_last; private: final_sum_type *my_left_sum; sum_node *my_left; - sum_node *my_right; + sum_node *my_right; bool my_left_is_final; Range my_range; - sum_node( const Range range_, bool left_is_final_ ) : - my_left_sum(NULL), - my_left(NULL), - my_right(NULL), - my_left_is_final(left_is_final_), + sum_node( const Range range_, bool left_is_final_ ) : + my_left_sum(NULL), + my_left(NULL), + my_right(NULL), + my_left_is_final(left_is_final_), my_range(range_) { // Poison fields that will be set by second pass. @@ -122,7 +122,7 @@ namespace internal { task* b = c.create_child(Range(my_range,split()),*my_left_sum,my_right,my_left_sum,my_stuff_last); task* a = my_left_is_final ? NULL : c.create_child(my_range,*my_body,my_left,my_incoming,NULL); set_ref_count( (a!=NULL)+(b!=NULL) ); - my_body = NULL; + my_body = NULL; if( a ) spawn(*b); else a = b; return a; @@ -153,7 +153,7 @@ namespace internal { __TBB_ASSERT( my_result.ref_count()==(my_result.my_left!=NULL)+(my_result.my_right!=NULL), NULL ); if( my_result.my_left ) my_result.my_left_is_final = false; - if( my_right_zombie && my_sum ) + if( my_right_zombie && my_sum ) ((*my_sum)->my_body).reverse_join(my_result.my_left_sum->my_body); __TBB_ASSERT( !my_return_slot, NULL ); if( my_right_zombie || my_result.my_right ) { @@ -168,9 +168,9 @@ namespace internal { return NULL; } - finish_scan( sum_node_type*& return_slot_, final_sum_type** sum_, sum_node_type& result_ ) : + finish_scan( sum_node_type*& return_slot_, final_sum_type** sum_, sum_node_type& result_ ) : my_sum(sum_), - my_return_slot(return_slot_), + my_return_slot(return_slot_), my_right_zombie(NULL), my_result(result_) { @@ -186,7 +186,7 @@ namespace internal { typedef final_sum final_sum_type; final_sum_type* my_body; /** Non-null if caller is requesting total. */ - final_sum_type** my_sum; + final_sum_type** my_sum; sum_node_type** my_return_slot; /** Null if computing root. */ sum_node_type* my_parent_sum; @@ -267,20 +267,20 @@ namespace internal { (my_body->my_body)( my_range, final_scan_tag() ); else if( my_sum ) (my_body->my_body)( my_range, pre_scan_tag() ); - if( my_sum ) + if( my_sum ) *my_sum = my_body; __TBB_ASSERT( !*my_return_slot, NULL ); } else { sum_node_type* result; - if( my_parent_sum ) + if( my_parent_sum ) result = new(allocate_additional_child_of(*my_parent_sum)) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); else result = new(task::allocate_root()) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); finish_pass1_type& c = *new( allocate_continuation()) finish_pass1_type(*my_return_slot,my_sum,*result); // Split off right child start_scan& b = *new( c.allocate_child() ) start_scan( /*my_return_slot=*/result->my_right, *this, result ); - b.my_is_right_child = true; - // Left child is recycling of *this. Must recycle this before spawning b, + b.my_is_right_child = true; + // Left child is recycling of *this. Must recycle this before spawning b, // otherwise b might complete and decrement c.ref_count() to zero, which // would cause c.execute() to run prematurely. recycle_as_child_of(c); @@ -290,11 +290,11 @@ namespace internal { my_return_slot = &result->my_left; my_is_right_child = false; next_task = this; - my_parent_sum = result; + my_parent_sum = result; __TBB_ASSERT( !*my_return_slot, NULL ); } return next_task; - } + } } // namespace internal //! @endcond @@ -307,10 +307,10 @@ namespace internal { - \code Body::~Body(); \endcode Destructor - \code void Body::operator()( const Range& r, pre_scan_tag ); \endcode Preprocess iterations for range \c r - - \code void Body::operator()( const Range& r, final_scan_tag ); \endcode + - \code void Body::operator()( const Range& r, final_scan_tag ); \endcode Do final processing for iterations of range \c r - \code void Body::reverse_join( Body& a ); \endcode - Merge preprocessing state of \c a into \c this, where \c a was + Merge preprocessing state of \c a into \c this, where \c a was created earlier from \c b by b's splitting constructor **/ diff --git a/include/tbb/parallel_sort.h b/include/tbb/parallel_sort.h index 34f373a75ee6f4afbe331f64f432c952b142fbdd..a642969e2623808299e6ee531560665f153a8a5a 100644 --- a/include/tbb/parallel_sort.h +++ b/include/tbb/parallel_sort.h @@ -1,5 +1,5 @@ /* - 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 @@ -30,49 +30,39 @@ namespace tbb { +namespace interface9 { //! @cond INTERNAL namespace internal { +using tbb::internal::no_assign; + //! Range used in quicksort to split elements into subranges based on a value. -/** The split operation selects a splitter and places all elements less than or equal +/** The split operation selects a splitter and places all elements less than or equal to the value in the first range and the remaining elements in the second range. @ingroup algorithms */ template class quick_sort_range: private no_assign { inline size_t median_of_three(const RandomAccessIterator &array, size_t l, size_t m, size_t r) const { - return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp( array[l], array[r]) ? r : l ) ) + return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp( array[l], array[r]) ? r : l ) ) : ( comp(array[r], array[m]) ? m : ( comp( array[r], array[l] ) ? r : l ) ); } inline size_t pseudo_median_of_nine( const RandomAccessIterator &array, const quick_sort_range &range ) const { size_t offset = range.size/8u; - return median_of_three(array, + return median_of_three(array, median_of_three(array, 0, offset, offset*2), median_of_three(array, offset*3, offset*4, offset*5), median_of_three(array, offset*6, offset*7, range.size - 1) ); } -public: - - static const size_t grainsize = 500; - const Compare ∁ - RandomAccessIterator begin; - size_t size; - - quick_sort_range( RandomAccessIterator begin_, size_t size_, const Compare &comp_ ) : - comp(comp_), begin(begin_), size(size_) {} - - bool empty() const {return size==0;} - bool is_divisible() const {return size>=grainsize;} - - quick_sort_range( quick_sort_range& range, split ) : comp(range.comp) { - using std::swap; + size_t split_range( quick_sort_range& range ) { + using std::iter_swap; RandomAccessIterator array = range.begin; - RandomAccessIterator key0 = range.begin; + RandomAccessIterator key0 = range.begin; size_t m = pseudo_median_of_nine(array, range); - if (m) swap ( array[0], array[m] ); + if (m) iter_swap ( array, array+m ); size_t i=0; size_t j=range.size; @@ -90,26 +80,46 @@ public: ++i; } while( comp( array[i],*key0 )); if( i==j ) goto partition; - swap( array[i], array[j] ); + iter_swap( array+i, array+j ); } partition: // Put the partition key were it belongs - swap( array[j], *key0 ); + iter_swap( array+j, key0 ); // array[l..j) is less or equal to key. // array(j..r) is greater or equal to key. // array[j] is equal to key i=j+1; - begin = array+i; - size = range.size-i; + size_t new_range_size = range.size-i; range.size = j; + return new_range_size; } + +public: + + static const size_t grainsize = 500; + const Compare ∁ + size_t size; + RandomAccessIterator begin; + + quick_sort_range( RandomAccessIterator begin_, size_t size_, const Compare &comp_ ) : + comp(comp_), size(size_), begin(begin_) {} + + bool empty() const {return size==0;} + bool is_divisible() const {return size>=grainsize;} + + quick_sort_range( quick_sort_range& range, split ) + : comp(range.comp) + , size(split_range(range)) + // +1 accounts for the pivot element, which is at its correct place + // already and, therefore, is not included into subranges. + , begin(range.begin+range.size+1) {} }; #if __TBB_TASK_GROUP_CONTEXT //! Body class used to test if elements in a range are presorted /** @ingroup algorithms */ template -class quick_sort_pretest_body : internal::no_assign { +class quick_sort_pretest_body : no_assign { const Compare ∁ public: @@ -122,7 +132,7 @@ public: int i = 0; for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i) { if ( i%64 == 0 && my_task.is_cancelled() ) break; - + // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1 if ( comp( *(k), *(k-1) ) ) { my_task.cancel_group_execution(); @@ -153,8 +163,8 @@ void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const int serial_cutoff = 9; __TBB_ASSERT( begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?" ); - RandomAccessIterator k; - for ( k = begin ; k != begin + serial_cutoff; ++k ) { + RandomAccessIterator k = begin; + for ( ; k != begin + serial_cutoff; ++k ) { if ( comp( *(k+1), *k ) ) { goto do_parallel_quick_sort; } @@ -168,37 +178,40 @@ void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, if (my_context.is_group_execution_cancelled()) do_parallel_quick_sort: #endif /* __TBB_TASK_GROUP_CONTEXT */ - parallel_for( quick_sort_range(begin, end-begin, comp ), + parallel_for( quick_sort_range(begin, end-begin, comp ), quick_sort_body(), auto_partitioner() ); } } // namespace internal //! @endcond +} // namespace interfaceX /** \page parallel_sort_iter_req Requirements on iterators for parallel_sort - Requirements on value type \c T of \c RandomAccessIterator for \c parallel_sort: - - \code void swap( T& x, T& y ) \endcode Swaps \c x and \c y - - \code bool Compare::operator()( const T& x, const T& y ) \endcode - True if x comes before y; + Requirements on the iterator type \c It and its value type \c T for \c parallel_sort: + + - \code void iter_swap( It a, It b ) \endcode Swaps the values of the elements the given + iterators \c a and \c b are pointing to. \c It should be a random access iterator. + + - \code bool Compare::operator()( const T& x, const T& y ) \endcode True if x comes before y; **/ /** \name parallel_sort See also requirements on \ref parallel_sort_iter_req "iterators for parallel_sort". **/ //@{ -//! Sorts the data in [begin,end) using the given comparator +//! Sorts the data in [begin,end) using the given comparator /** The compare function object is used for all comparisons between elements during sorting. The compare object must define a bool operator() function. @ingroup algorithms **/ template -void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { - const int min_parallel_size = 500; +void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { + const int min_parallel_size = 500; if( end > begin ) { - if (end - begin < min_parallel_size) { + if (end - begin < min_parallel_size) { std::sort(begin, end, comp); } else { - internal::parallel_quick_sort(begin, end, comp); + interface9::internal::parallel_quick_sort(begin, end, comp); } } } @@ -206,7 +219,7 @@ void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const //! Sorts the data in [begin,end) with a default comparator \c std::less /** @ingroup algorithms **/ template -inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { +inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { parallel_sort( begin, end, std::less< typename std::iterator_traits::value_type >() ); } @@ -243,7 +256,7 @@ void parallel_sort(const Range& rng) { template inline void parallel_sort( T * begin, T * end ) { parallel_sort( begin, end, std::less< T >() ); -} +} //@} diff --git a/include/tbb/parallel_while.h b/include/tbb/parallel_while.h index bf49953d21a3c7d3cc4438b8f24cc13478940453..1f9ff379129a49e8e85c15bdf1ac7ac998843837 100644 --- a/include/tbb/parallel_while.h +++ b/include/tbb/parallel_while.h @@ -1,5 +1,5 @@ /* - 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 @@ -42,10 +42,10 @@ namespace internal { const Body& my_body; typename Body::argument_type my_value; /*override*/ task* execute() { - my_body(my_value); + my_body(my_value); return NULL; } - while_iteration_task( const typename Body::argument_type& value, const Body& body ) : + while_iteration_task( const typename Body::argument_type& value, const Body& body ) : my_body(body), my_value(value) {} template friend class while_group_task; @@ -57,19 +57,19 @@ namespace internal { @ingroup algorithms */ template class while_group_task: public task { - static const size_t max_arg_size = 4; + static const size_t max_arg_size = 4; const Body& my_body; size_t size; typename Body::argument_type my_arg[max_arg_size]; - while_group_task( const Body& body ) : my_body(body), size(0) {} + while_group_task( const Body& body ) : my_body(body), size(0) {} /*override*/ task* execute() { typedef while_iteration_task iteration_type; __TBB_ASSERT( size>0, NULL ); task_list list; - task* t; - size_t k=0; + task* t; + size_t k=0; for(;;) { - t = new( allocate_child() ) iteration_type(my_arg[k],my_body); + t = new( allocate_child() ) iteration_type(my_arg[k],my_body); if( ++k==size ) break; list.push_back(*t); } @@ -80,7 +80,7 @@ namespace internal { } template friend class while_task; }; - + //! For internal use only. /** Gets block of iterations from a stream and packages them into a while_group_task. @ingroup algorithms */ @@ -92,7 +92,7 @@ namespace internal { /*override*/ task* execute() { typedef while_group_task block_type; block_type& t = *new( allocate_additional_child_of(my_barrier) ) block_type(my_body); - size_t k=0; + size_t k=0; while( my_stream.pop_if_present(t.my_arg[k]) ) { if( ++k==block_type::max_arg_size ) { // There might be more iterations. @@ -108,11 +108,11 @@ namespace internal { return &t; } } - while_task( Stream& stream, const Body& body, empty_task& barrier ) : + while_task( Stream& stream, const Body& body, empty_task& barrier ) : my_stream(stream), my_body(body), my_barrier(barrier) - {} + {} friend class tbb::parallel_while; }; @@ -134,7 +134,7 @@ public: //! Destructor cleans up data members before returning. ~parallel_while() { if( my_barrier ) { - my_barrier->destroy(*my_barrier); + my_barrier->destroy(*my_barrier); my_barrier = NULL; } } @@ -181,6 +181,6 @@ void parallel_while::add( const value_type& item ) { task::self().spawn( i ); } -} // namespace +} // namespace #endif /* __TBB_parallel_while */ diff --git a/include/tbb/partitioner.h b/include/tbb/partitioner.h index c5c249bb05563a3433d76cbee764437ab400e37a..63219337ea7b35952d93ca3e6c172c44ce5411db 100644 --- a/include/tbb/partitioner.h +++ b/include/tbb/partitioner.h @@ -1,5 +1,5 @@ /* - 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 @@ -405,7 +405,7 @@ struct balancing_partition_type : unbalancing_partition_type { if( !(self().my_divisor / Mode::my_partition::factor) ) { // if not from the top P tasks of binary tree self().my_divisor = 1; // TODO: replace by on-stack flag (partition_state's member)? if( t.is_stolen_task() && t.parent()->ref_count() >= 2 ) { // runs concurrently with the left task -#if TBB_USE_EXCEPTIONS +#if __TBB_USE_OPTIONAL_RTTI // RTTI is available, check whether the cast is valid __TBB_ASSERT(dynamic_cast(t.parent()), 0); // correctness of the cast relies on avoiding the root task for which: diff --git a/include/tbb/pipeline.h b/include/tbb/pipeline.h index 2d7c3855879cfdff5a24c6fbc6a9b858bff9724c..a602666647b45f62ce8e854cf9ac4fdeb5fcf372 100644 --- a/include/tbb/pipeline.h +++ b/include/tbb/pipeline.h @@ -1,5 +1,5 @@ /* - 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 @@ -18,8 +18,8 @@ reasons why the executable file might be covered by the GNU General Public License. */ -#ifndef __TBB_pipeline_H -#define __TBB_pipeline_H +#ifndef __TBB_pipeline_H +#define __TBB_pipeline_H #include "atomic.h" #include "task.h" @@ -66,17 +66,17 @@ class filter: internal::no_copy { private: //! Value used to mark "not in pipeline" static filter* not_in_pipeline() {return reinterpret_cast(intptr_t(-1));} -protected: +protected: //! The lowest bit 0 is for parallel vs. serial - static const unsigned char filter_is_serial = 0x1; + static const unsigned char filter_is_serial = 0x1; //! 4th bit distinguishes ordered vs unordered filters. /** The bit was not set for parallel filters in TBB 2.1 and earlier, but is_ordered() function always treats parallel filters as out of order. */ - static const unsigned char filter_is_out_of_order = 0x1<<4; + static const unsigned char filter_is_out_of_order = 0x1<<4; //! 5th bit distinguishes thread-bound and regular filters. - static const unsigned char filter_is_bound = 0x1<<5; + static const unsigned char filter_is_bound = 0x1<<5; //! 6th bit marks input filters emitting small objects static const unsigned char filter_may_emit_null = 0x1<<6; @@ -94,7 +94,7 @@ protected: public: enum mode { //! processes multiple items in parallel and in no particular order - parallel = current_version | filter_is_out_of_order, + parallel = current_version | filter_is_out_of_order, //! processes items one at a time; all such filters process items in the same order serial_in_order = current_version | filter_is_serial, //! processes items one at a time and in no particular order @@ -103,7 +103,7 @@ public: serial = serial_in_order }; protected: - filter( bool is_serial_ ) : + filter( bool is_serial_ ) : next_filter_in_pipeline(not_in_pipeline()), my_input_buffer(NULL), my_filter_mode(static_cast((is_serial_ ? serial : parallel) | exact_exception_propagation)), @@ -111,7 +111,7 @@ protected: my_pipeline(NULL), next_segment(NULL) {} - + filter( mode filter_mode ) : next_filter_in_pipeline(not_in_pipeline()), my_input_buffer(NULL), @@ -128,8 +128,8 @@ public: //! True if filter is serial. bool is_serial() const { return bool( my_filter_mode & filter_is_serial ); - } - + } + //! True if filter must receive stream in order. bool is_ordered() const { return (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial; @@ -141,7 +141,7 @@ public: } //! true if an input filter can emit null - bool object_may_be_null() { + bool object_may_be_null() { return ( my_filter_mode & filter_may_emit_null ) == filter_may_emit_null; } @@ -149,7 +149,7 @@ public: /** Returns NULL if filter is a sink. */ virtual void* operator()( void* item ) = 0; - //! Destroy filter. + //! Destroy filter. /** If the filter was added to a pipeline, the pipeline must be destroyed first. */ virtual __TBB_EXPORTED_METHOD ~filter(); @@ -164,7 +164,7 @@ private: //! Pointer to next filter in the pipeline. filter* next_filter_in_pipeline; - //! has the filter not yet processed all the tokens it will ever see? + //! has the filter not yet processed all the tokens it will ever see? // (pipeline has not yet reached end_of_input or this filter has not yet // seen the last token produced by input_filter) bool has_more_work(); @@ -205,19 +205,19 @@ public: end_of_stream }; protected: - thread_bound_filter(mode filter_mode): + thread_bound_filter(mode filter_mode): filter(static_cast(filter_mode | filter::filter_is_bound)) { __TBB_ASSERT(filter_mode & filter::filter_is_serial, "thread-bound filters must be serial"); } public: - //! If a data item is available, invoke operator() on that item. + //! If a data item is available, invoke operator() on that item. /** This interface is non-blocking. Returns 'success' if an item was processed. - Returns 'item_not_available' if no item can be processed now - but more may arrive in the future, or if token limit is reached. + Returns 'item_not_available' if no item can be processed now + but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process. */ - result_type __TBB_EXPORTED_METHOD try_process_item(); + result_type __TBB_EXPORTED_METHOD try_process_item(); //! Wait until a data item becomes available, and invoke operator() on that item. /** This interface is blocking. @@ -238,7 +238,7 @@ public: //! Construct empty pipeline. __TBB_EXPORTED_METHOD pipeline(); - /** Though the current implementation declares the destructor virtual, do not rely on this + /** Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB. */ virtual __TBB_EXPORTED_METHOD ~pipeline(); @@ -276,7 +276,7 @@ private: //! Number of idle tokens waiting for input stage. atomic input_tokens; - //! Global counter of tokens + //! Global counter of tokens atomic token_counter; //! False until fetch_input returns NULL. @@ -390,13 +390,13 @@ class token_helper { static pointer create_token(const value_type & source) { return source; } static value_type & token(pointer & t) { return t;} - static void * cast_to_void_ptr(pointer ref) { - type_to_void_ptr_map mymap; + static void * cast_to_void_ptr(pointer ref) { + type_to_void_ptr_map mymap; mymap.void_overlay = NULL; - mymap.actual_value = ref; - return mymap.void_overlay; + mymap.actual_value = ref; + return mymap.void_overlay; } - static pointer cast_from_void_ptr(void * ref) { + static pointer cast_from_void_ptr(void * ref) { type_to_void_ptr_map mymap; mymap.void_overlay = ref; return mymap.actual_value; @@ -428,7 +428,7 @@ public: concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} }; -// input +// input template class concrete_filter: public filter { const Body& my_body; @@ -447,7 +447,7 @@ class concrete_filter: public filter { } public: - concrete_filter(tbb::filter::mode filter_mode, const Body& body) : + concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(static_cast(filter_mode | filter_may_emit_null)), my_body(body) {} @@ -458,7 +458,7 @@ class concrete_filter: public filter { const Body& my_body; typedef token_helper::value > t_helper; typedef typename t_helper::pointer t_pointer; - + /*override*/ void* operator()(void* input) { t_pointer temp_input = t_helper::cast_from_void_ptr(input); my_body(t_helper::token(temp_input)); @@ -477,12 +477,12 @@ public: template class concrete_filter: public filter { const Body& my_body; - + /** Override privately because it is always called virtually */ /*override*/ void* operator()(void*) { flow_control control; my_body(control); - void* output = control.is_pipeline_stopped ? NULL : (void*)(intptr_t)-1; + void* output = control.is_pipeline_stopped ? NULL : (void*)(intptr_t)-1; return output; } public: @@ -496,7 +496,7 @@ class pipeline_proxy { public: pipeline_proxy( const filter_t& filter_chain ); ~pipeline_proxy() { - while( filter* f = my_pipe.filter_list ) + while( filter* f = my_pipe.filter_list ) delete f; // filter destructor removes it from the pipeline } tbb::pipeline* operator->() { return &my_pipe; } @@ -515,14 +515,14 @@ protected: #endif } public: - //! Add concrete_filter to pipeline + //! Add concrete_filter to pipeline virtual void add_to( pipeline& ) = 0; //! Increment reference count void add_ref() {++ref_count;} //! Decrement reference count and delete if it becomes zero. void remove_ref() { __TBB_ASSERT(ref_count>0,"ref_count underflow"); - if( --ref_count==0 ) + if( --ref_count==0 ) delete this; } virtual ~filter_node() { @@ -610,7 +610,7 @@ public: // Order of operations below carefully chosen so that reference counts remain correct // in unlikely event that remove_ref throws exception. filter_node* old = root; - root = rhs.root; + root = rhs.root; if( root ) root->add_ref(); if( old ) old->remove_ref(); } diff --git a/include/tbb/queuing_mutex.h b/include/tbb/queuing_mutex.h index 44bd306bcf80b818eb4758acf8c7dff6ed8cadca..2de1a72b7b1eda530540046cec915900b3123989 100644 --- a/include/tbb/queuing_mutex.h +++ b/include/tbb/queuing_mutex.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/queuing_rw_mutex.h b/include/tbb/queuing_rw_mutex.h index de1fc0fda75aa4d69c8e3753bcbf7c22d88c0482..9c15fd87b9f0aebea232755167d8ec1cd4f8c155 100644 --- a/include/tbb/queuing_rw_mutex.h +++ b/include/tbb/queuing_rw_mutex.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/reader_writer_lock.h b/include/tbb/reader_writer_lock.h index 86b1af4aa5f4a95057cb23ac333e1686dfb49831..2925b052afda2b48d6b4640084cd1247c8caca60 100644 --- a/include/tbb/reader_writer_lock.h +++ b/include/tbb/reader_writer_lock.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/recursive_mutex.h b/include/tbb/recursive_mutex.h index f430a38387d137d119b90308396275b968c17685..f8c345c49600b48aa3eb45798a6ceda57aff32fb 100644 --- a/include/tbb/recursive_mutex.h +++ b/include/tbb/recursive_mutex.h @@ -1,5 +1,5 @@ /* - 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 @@ -68,7 +68,7 @@ public: #if _WIN32||_WIN64 DeleteCriticalSection(&impl); #else - pthread_mutex_destroy(&impl); + pthread_mutex_destroy(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ @@ -82,20 +82,20 @@ public: It also nicely provides the "node" for queuing locks. */ class scoped_lock: internal::no_copy { public: - //! Construct lock that has not acquired a recursive_mutex. + //! Construct lock that has not acquired a recursive_mutex. scoped_lock() : my_mutex(NULL) {}; //! Acquire lock on given mutex. scoped_lock( recursive_mutex& mutex ) { #if TBB_USE_ASSERT - my_mutex = &mutex; + my_mutex = &mutex; #endif /* TBB_USE_ASSERT */ acquire( mutex ); } //! Release lock (if lock is held). ~scoped_lock() { - if( my_mutex ) + if( my_mutex ) release(); } @@ -153,7 +153,7 @@ public: static const bool is_fair_mutex = false; // C++0x compatibility interface - + //! Acquire lock void lock() { #if TBB_USE_ASSERT @@ -176,7 +176,7 @@ public: #if TBB_USE_ASSERT aligned_space tmp; return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this); -#else +#else #if _WIN32||_WIN64 return TryEnterCriticalSection(&impl)!=0; #else @@ -229,6 +229,6 @@ private: __TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex) -} // namespace tbb +} // namespace tbb #endif /* __TBB_recursive_mutex_H */ diff --git a/include/tbb/runtime_loader.h b/include/tbb/runtime_loader.h index 5dc8bab763f3be71efcd1c307cf2d9c870dd6d28..a89faa85ad26c30cd0143f22aec9d3296208d091 100644 --- a/include/tbb/runtime_loader.h +++ b/include/tbb/runtime_loader.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/scalable_allocator.h b/include/tbb/scalable_allocator.h index 42472cee1965c631f3b2307bce922270bcc420a1..26853b4d8a161b2fa524772203bbf3efe76918aa 100644 --- a/include/tbb/scalable_allocator.h +++ b/include/tbb/scalable_allocator.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/spin_mutex.h b/include/tbb/spin_mutex.h index 70ddbd8af81deb1e6720f0af88bd608fed77dd13..1170997c65d8d2903b4acc7c305e553da5ebb44d 100644 --- a/include/tbb/spin_mutex.h +++ b/include/tbb/spin_mutex.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/spin_rw_mutex.h b/include/tbb/spin_rw_mutex.h index 593a4abe0d50f4682ffec9a8e812f5c679bfa175..31729cb982592d511c7c28ccc80a4d29b08b8cc9 100644 --- a/include/tbb/spin_rw_mutex.h +++ b/include/tbb/spin_rw_mutex.h @@ -1,5 +1,5 @@ /* - 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 @@ -130,13 +130,13 @@ public: //! Release lock. void release() { __TBB_ASSERT( mutex, "lock is not acquired" ); - spin_rw_mutex *m = mutex; + spin_rw_mutex *m = mutex; mutex = NULL; #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT if( is_writer ) m->internal_release_writer(); else m->internal_release_reader(); #else - if( is_writer ) __TBB_AtomicAND( &m->state, READERS ); + if( is_writer ) __TBB_AtomicAND( &m->state, READERS ); else __TBB_FetchAndAddWrelease( &m->state, -(intptr_t)ONE_READER); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } @@ -158,10 +158,10 @@ public: bool try_acquire( spin_rw_mutex& m, bool write = true ) { __TBB_ASSERT( !mutex, "holding mutex already" ); bool result; - is_writer = write; + is_writer = write; result = write? m.internal_try_acquire_writer() : m.internal_try_acquire_reader(); - if( result ) + if( result ) mutex = &m; return result; } @@ -196,7 +196,7 @@ public: if( state&WRITER ) internal_release_writer(); else internal_release_reader(); #else - if( state&WRITER ) __TBB_AtomicAND( &state, READERS ); + if( state&WRITER ) __TBB_AtomicAND( &state, READERS ); else __TBB_FetchAndAddWrelease( &state, -(intptr_t)ONE_READER); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } @@ -243,7 +243,7 @@ namespace interface8 { ensure atomicity of the critical sections. In particular, it uses Intel(R) Transactional Synchronization Extensions (Intel(R) TSX). Without such HW support, it behaves like a spin_rw_mutex. - It should be used for locking short critical sections where the lock is + It should be used for locking short critical sections where the lock is contended but the data it protects are not. @ingroup synchronization */ #if __TBB_TSX_AVAILABLE diff --git a/include/tbb/task.h b/include/tbb/task.h index 2da0559db497ef57fc5f74bc30bf8461f1a52e16..9c79317fd8f2a95d879fff5b93045a8b897c8c74 100644 --- a/include/tbb/task.h +++ b/include/tbb/task.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/task_arena.h b/include/tbb/task_arena.h index d811c9b4f39e36f06bcc03add63d88e9f990a7d1..75905d15daccb849a427dec371bb01fbfd94c632 100644 --- a/include/tbb/task_arena.h +++ b/include/tbb/task_arena.h @@ -1,5 +1,5 @@ /* - 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 @@ -37,9 +37,6 @@ namespace internal { /** @ingroup task_scheduling */ class arena; class task_scheduler_observer_v3; - - //! Tag class used to indicate the "attaching" constructor - struct attach {}; } // namespace internal //! @endcond @@ -125,6 +122,19 @@ public: class task_arena : public internal::task_arena_base { friend class tbb::internal::task_scheduler_observer_v3; bool my_initialized; + void mark_initialized() { + __TBB_ASSERT( my_arena, "task_arena initialization is incomplete" ); +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( my_context, "task_arena initialization is incomplete" ); +#endif +#if TBB_USE_THREADING_TOOLS + // Actual synchronization happens in internal_initialize & internal_attach. + // The race on setting my_initialized is benign, but should be hidden from Intel(R) Inspector + internal::as_atomic(my_initialized).fetch_and_store(true); +#else + my_initialized = true; +#endif + } public: //! Creates task_arena with certain concurrency limits @@ -144,8 +154,11 @@ public: , my_initialized(false) {} + //! Tag class used to indicate the "attaching" constructor + struct attach {}; + //! Creates an instance of task_arena attached to the current arena of the thread - task_arena( tbb::internal::attach ) + task_arena( attach ) : task_arena_base(automatic, 1) // use default settings if attach fails , my_initialized(false) { @@ -157,17 +170,13 @@ public: inline void initialize() { if( !my_initialized ) { internal_initialize(); -#if TBB_USE_THREADING_TOOLS - // Threading tools respect lock prefix but report false-positive data-race via plain store - internal::as_atomic(my_initialized).fetch_and_store(true); -#else - my_initialized = true; -#endif //TBB_USE_THREADING_TOOLS + mark_initialized(); } } //! Overrides concurrency level and forces initialization of internal representation inline void initialize(int max_concurrency, unsigned reserved_for_masters = 1) { + // TODO: decide if this call must be thread-safe __TBB_ASSERT( !my_arena, "Impossible to modify settings of an already initialized task_arena"); if( !my_initialized ) { my_max_concurrency = max_concurrency; @@ -176,6 +185,17 @@ public: } } + //! Attaches this instance to the current arena of the thread + inline void initialize(attach) { + // TODO: decide if this call must be thread-safe + __TBB_ASSERT( !my_arena, "Impossible to modify settings of an already initialized task_arena"); + if( !my_initialized ) { + internal_attach(); + if( !my_arena ) internal_initialize(); + mark_initialized(); + } + } + //! Removes the reference to the internal arena representation. //! Not thread safe wrt concurrent invocations of other methods. inline void terminate() { @@ -201,7 +221,6 @@ public: void enqueue( const F& f ) { initialize(); #if __TBB_TASK_GROUP_CONTEXT - __TBB_ASSERT(my_context, NULL); internal_enqueue( *new( task::allocate_root(*my_context) ) internal::function_task(f), 0 ); #else internal_enqueue( *new( task::allocate_root() ) internal::function_task(f), 0 ); diff --git a/include/tbb/task_group.h b/include/tbb/task_group.h index 21a298a418570fb7aa0c078841ed41df4a0223c5..54f38ac59449d449c61e17268c2865b19cbb13f1 100644 --- a/include/tbb/task_group.h +++ b/include/tbb/task_group.h @@ -1,5 +1,5 @@ /* - 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 @@ -111,7 +111,7 @@ public: ~task_group_base() __TBB_NOEXCEPT(false) { if( my_root->ref_count() > 1 ) { bool stack_unwinding_in_progress = std::uncaught_exception(); - // Always attempt to do proper cleanup to avoid inevitable memory corruption + // Always attempt to do proper cleanup to avoid inevitable memory corruption // in case of missing wait (for the sake of better testability & debuggability) if ( !is_canceling() ) cancel(); @@ -206,7 +206,7 @@ public: } }; // class structured_task_group -inline +inline bool is_current_task_group_canceling() { return task::self().is_cancelled(); } diff --git a/include/tbb/task_scheduler_init.h b/include/tbb/task_scheduler_init.h index e98abbfa96fcaa3fc1160474a42dbb778de0e8b2..d4f91f374a8474971a6cf58f628b32199a1ba459 100644 --- a/include/tbb/task_scheduler_init.h +++ b/include/tbb/task_scheduler_init.h @@ -1,5 +1,5 @@ /* - 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 @@ -81,8 +81,8 @@ public: TBB based components run side-by-side or in a nested fashion inside the same process. - The number_of_threads is ignored if any other task_scheduler_inits - currently exist. A thread may construct multiple task_scheduler_inits. + The number_of_threads is ignored if any other task_scheduler_inits + currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted. */ void __TBB_EXPORTED_METHOD initialize( int number_of_threads=automatic ); @@ -103,10 +103,10 @@ public: // Two lowest order bits of the stack size argument may be taken to communicate // default exception propagation mode of the client to be used when the // client manually creates tasks in the master thread and does not use - // explicit task group context object. This is necessary because newer - // TBB binaries with exact propagation enabled by default may be used + // explicit task group context object. This is necessary because newer + // TBB binaries with exact propagation enabled by default may be used // by older clients that expect tbb::captured_exception wrapper. - // All zeros mean old client - no preference. + // All zeros mean old client - no preference. __TBB_ASSERT( !(thread_stack_size & propagation_mode_mask), "Requested stack size is not aligned" ); #if TBB_USE_EXCEPTIONS thread_stack_size |= TBB_USE_CAPTURED_EXCEPTION ? propagation_mode_captured : propagation_mode_exact; @@ -120,25 +120,25 @@ public: //! Destroy scheduler for this thread if thread has no other live task_scheduler_inits. ~task_scheduler_init() { - if( my_scheduler ) + if( my_scheduler ) terminate(); internal::poison_pointer( my_scheduler ); } //! Returns the number of threads TBB scheduler would create if initialized by default. - /** Result returned by this method does not depend on whether the scheduler + /** Result returned by this method does not depend on whether the scheduler has already been initialized. - + Because tbb 2.0 does not support blocking tasks yet, you may use this method - to boost the number of threads in the tbb's internal pool, if your tasks are + to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state. - + Before TBB 3.0 U4 this method returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask. - - NOTE: The return value of this method never changes after its first invocation. + + NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool. */ diff --git a/include/tbb/task_scheduler_observer.h b/include/tbb/task_scheduler_observer.h index 4865dd3781c3bd1995c9a3564bcfa2ceb44f9867..ba5854f31eb353a2e9c1c77d6a5d999757eb837a 100644 --- a/include/tbb/task_scheduler_observer.h +++ b/include/tbb/task_scheduler_observer.h @@ -1,5 +1,5 @@ /* - 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 @@ -65,14 +65,14 @@ public: task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.store(0); } //! Entry notification - /** Invoked from inside observe(true) call and whenever a worker enters the arena + /** Invoked from inside observe(true) call and whenever a worker enters the arena this observer is associated with. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled. **/ - virtual void on_scheduler_entry( bool /*is_worker*/ ) {} + virtual void on_scheduler_entry( bool /*is_worker*/ ) {} //! Exit notification /** Invoked from inside observe(false) call and whenever a worker leaves the diff --git a/include/tbb/tbb.h b/include/tbb/tbb.h index f5ce040095f734673e515e3ac90a38dcd5a9f114..d6c9d75a01d84ca1f80333f04c9f12696fdfc748 100644 --- a/include/tbb/tbb.h +++ b/include/tbb/tbb.h @@ -1,5 +1,5 @@ /* - 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 @@ -21,9 +21,9 @@ #ifndef __TBB_tbb_H #define __TBB_tbb_H -/** - This header bulk-includes declarations or definitions of all the functionality - provided by TBB (save for malloc dependent headers). +/** + This header bulk-includes declarations or definitions of all the functionality + provided by TBB (save for malloc dependent headers). If you use only a few TBB constructs, consider including specific headers only. Any header listed below can be included independently of others. diff --git a/include/tbb/tbb_allocator.h b/include/tbb/tbb_allocator.h index 33d09de7dc01f54d5d085263a2a81fd62ec672d1..3707ef610136e1caff47b7b3850cc34eb3ec7e57 100644 --- a/include/tbb/tbb_allocator.h +++ b/include/tbb/tbb_allocator.h @@ -1,5 +1,5 @@ /* - 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 @@ -64,7 +64,7 @@ namespace internal { #endif //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 -/** The class selects the best memory allocation mechanism available +/** The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. @@ -85,7 +85,7 @@ public: //! Specifies current allocator enum malloc_type { - scalable, + scalable, standard }; @@ -95,7 +95,7 @@ public: pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} - + //! Allocate space for n objects. pointer allocate( size_type n, const void* /*hint*/ = 0) { return pointer(internal::allocate_via_handler_v3( n * sizeof(value_type) )); @@ -103,7 +103,7 @@ public: //! Free previously allocated block of memory. void deallocate( pointer p, size_type ) { - internal::deallocate_via_handler_v3(p); + internal::deallocate_via_handler_v3(p); } //! Largest value for which method allocate might succeed. @@ -111,7 +111,7 @@ public: size_type max = static_cast(-1) / sizeof (value_type); return (max > 0 ? max : 1); } - + //! Copy-construct value at location pointed to by p. #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template @@ -139,7 +139,7 @@ public: //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ -template<> +template<> class tbb_allocator { public: typedef void* pointer; @@ -192,7 +192,7 @@ public: //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ -template class Allocator> +template class Allocator> class zero_allocator : public Allocator { public: typedef Allocator base_allocator_type; @@ -213,6 +213,6 @@ inline bool operator!=( const zero_allocator &a, const zero_allocator >(a) != static_cast< B2 >(b); } -} // namespace tbb +} // namespace tbb #endif /* __TBB_tbb_allocator_H */ diff --git a/include/tbb/tbb_config.h b/include/tbb/tbb_config.h index 58937e6111e6228d3f53e4beb44f81ad3544cee8..caade259d830d04821d4d9417f7dfbda0ed9df43 100644 --- a/include/tbb/tbb_config.h +++ b/include/tbb/tbb_config.h @@ -1,5 +1,5 @@ /* - 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 @@ -48,6 +48,11 @@ #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #endif +/** Target OS is either iOS* or iOS* simulator **/ +#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ + #define __TBB_IOS 1 +#endif + /** Preprocessor symbols to determine HW architecture **/ #if _WIN32||_WIN64 @@ -64,7 +69,9 @@ # if !__linux__ && !__APPLE__ # define __TBB_generic_os 1 # endif -# if __x86_64__ +# if __TBB_IOS +# define __TBB_generic_arch 1 +# elif __x86_64__ # define __TBB_x86_64 1 # elif __ia64__ # define __TBB_ipf 1 @@ -146,7 +153,7 @@ #else #define __TBB_INITIALIZER_LISTS_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 && (_MSC_VER >= 1800 || __TBB_GCC_VERSION >= 40400 || _LIBCPP_VERSION) #endif - + #define __TBB_CONSTEXPR_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1200 /** ICC seems to disable support of noexcept event in c++11 when compiling in compatibility mode for gcc <4.6 **/ @@ -183,8 +190,8 @@ #elif __GNUC__ #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __GXX_EXPERIMENTAL_CXX0X__ #define __TBB_CPP11_RVALUE_REF_PRESENT __GXX_EXPERIMENTAL_CXX0X__ - /** __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 here is a substitution for _GLIBCXX_ATOMIC_BUILTINS_4, which is a prerequisite - for exception_ptr but cannot be used in this file because it is defined in a header, not by the compiler. + /** __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 here is a substitution for _GLIBCXX_ATOMIC_BUILTINS_4, which is a prerequisite + for exception_ptr but cannot be used in this file because it is defined in a header, not by the compiler. If the compiler has no atomic intrinsics, the C++ library should not expect those as well. **/ #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40404 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) #define __TBB_STATIC_ASSERT_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300) @@ -304,27 +311,35 @@ #endif /* TBB_PEFORMANCE_WARNINGS */ #endif /* TBB_USE_PERFORMANCE_WARNINGS */ -#if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX) +#if __TBB_DEFINE_MIC || defined(_XBOX) + #if TBB_USE_EXCEPTIONS + #error The platform does not properly support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. + #elif !defined(TBB_USE_EXCEPTIONS) + #define TBB_USE_EXCEPTIONS 0 + #endif +#elif !(__EXCEPTIONS || defined(_CPPUNWIND) || __SUNPRO_CC) #if TBB_USE_EXCEPTIONS #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. #elif !defined(TBB_USE_EXCEPTIONS) #define TBB_USE_EXCEPTIONS 0 #endif #elif !defined(TBB_USE_EXCEPTIONS) - #if __TBB_DEFINE_MIC - #define TBB_USE_EXCEPTIONS 0 - #else #define TBB_USE_EXCEPTIONS 1 - #endif -#elif TBB_USE_EXCEPTIONS && __TBB_DEFINE_MIC - #error Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. +#endif + +#if __clang__ && !__INTEL_COMPILER +#define __TBB_USE_OPTIONAL_RTTI __has_feature(cxx_rtti) +#elif defined(_CPPRTTI) +#define __TBB_USE_OPTIONAL_RTTI 1 +#else +#define __TBB_USE_OPTIONAL_RTTI (__GXX_RTTI || __RTTI || __INTEL_RTTI__) #endif #ifndef TBB_IMPLEMENT_CPP0X /** By default, use C++11 classes if available **/ #if __clang__ - /* Old versions of Intel Compiler do not have __has_include */ - #if (__INTEL_COMPILER && __INTEL_COMPILER <= 1400) + /* Old versions of Intel Compiler do not have __has_include or cannot use it in #define */ + #if (__INTEL_COMPILER && (__INTEL_COMPILER < 1500 || __INTEL_COMPILER == 1500 && __INTEL_COMPILER_UPDATE <= 1)) #define TBB_IMPLEMENT_CPP0X !(_LIBCPP_VERSION && (__cplusplus >= 201103L)) #else #define TBB_IMPLEMENT_CPP0X (__cplusplus < 201103L || (!__has_include() && !__has_include())) @@ -444,6 +459,10 @@ #define __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 1 #endif +#ifndef __TBB_ENQUEUE_ENFORCED_CONCURRENCY + #define __TBB_ENQUEUE_ENFORCED_CONCURRENCY 1 +#endif + #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \ (_WIN32 || _WIN64 || __APPLE__ || (__linux__ && !__ANDROID__)) #define __TBB_SURVIVE_THREAD_SWITCH 1 @@ -475,7 +494,7 @@ #elif _MSC_VER == 1600 #define __TBB_VARIADIC_MAX 10 // VS10 setting #else - #define __TBB_VARIADIC_MAX 15 + #define __TBB_VARIADIC_MAX 15 #endif #endif @@ -642,18 +661,18 @@ // A compiler bug: a disabled copy constructor prevents use of the moving constructor #define __TBB_IF_NO_COPY_CTOR_MOVE_SEMANTICS_BROKEN (_MSC_VER && (__INTEL_COMPILER >= 1300 && __INTEL_COMPILER <= 1310) && !__INTEL_CXX11_MODE__) -// MSVC 2013 and ICC 15 seems do not generate implicit move constructor for empty derived class while should +// MSVC 2013 and ICC do not generate implicit move constructor for empty derived class #define __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN (__TBB_CPP11_RVALUE_REF_PRESENT && \ - ( !__INTEL_COMPILER && _MSC_VER && _MSC_VER <= 1800 || __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )) + ( !__INTEL_COMPILER && _MSC_VER && _MSC_VER <= 1800 || __INTEL_COMPILER && __INTEL_COMPILER <= 1600 )) #define __TBB_CPP11_DECLVAL_BROKEN (_MSC_VER == 1600 || (__GNUC__ && __TBB_GCC_VERSION < 40500) ) // Intel C++ compiler has difficulties with copying std::pair with VC11 std::reference_wrapper being a const member #define __TBB_COPY_FROM_NON_CONST_REF_BROKEN (_MSC_VER == 1700 && __INTEL_COMPILER && __INTEL_COMPILER < 1600) -//The implicit upcasting of the tuple of a reference of a derived class to a base class fails on icc 13.X +//The implicit upcasting of the tuple of a reference of a derived class to a base class fails on icc 13.X //if the system's gcc environment is 4.8 #if (__INTEL_COMPILER >=1300 && __INTEL_COMPILER <=1310) && __TBB_GCC_VERSION>=40700 && __GXX_EXPERIMENTAL_CXX0X__ - #define __TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN 1 + #define __TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN 1 #endif /** End of __TBB_XXX_BROKEN macro section **/ @@ -665,6 +684,13 @@ #define __TBB_ATOMIC_CTORS (__TBB_CONSTEXPR_PRESENT && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && (!__TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN)) +// Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang +// Setting the workaround for all compile targets ($APP_PLATFORM) below Android 4.4 (android-19) +#if __ANDROID__ +#include +#define __TBB_USE_DLOPEN_REENTRANCY_WORKAROUND (__ANDROID_API__ < 19) +#endif + #define __TBB_ALLOCATOR_CONSTRUCT_VARIADIC (__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT) #define __TBB_VARIADIC_PARALLEL_INVOKE (TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE && __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT) diff --git a/include/tbb/tbb_exception.h b/include/tbb/tbb_exception.h index 75423d0f8646b900e402c5399ccdc5e0a67b4664..73948c3cc94e0908eef9f67c098357b9ca99884f 100644 --- a/include/tbb/tbb_exception.h +++ b/include/tbb/tbb_exception.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/include/tbb/tbb_machine.h b/include/tbb/tbb_machine.h index e82a35af7f4c22f73987b9768be2d634d5fe1fd8..5fe13bc5c0154e9caa5faad640534053fc68c2e7 100644 --- a/include/tbb/tbb_machine.h +++ b/include/tbb/tbb_machine.h @@ -1,5 +1,5 @@ /* - 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 @@ -102,7 +102,7 @@ data-dependent, and will then make subsequent code behave as if the original data dependency were acquired. It needs only a compiler fence where implied by the architecture - either specifically (like IA-64 architecture) or because generally stronger + either specifically (like IA-64 architecture) or because generally stronger "acquire" semantics are enforced (like x86). It is always valid, though potentially suboptimal, to replace control with acquire on the load and then remove the helper. @@ -254,9 +254,9 @@ template<> struct atomic_selector<8> { //TODO: TBB_USE_GCC_BUILTINS is not used for Mac, Sun, Aix #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) #include "machine/icc_generic.h" - #elif __i386__ + #elif __TBB_x86_32 #include "machine/linux_ia32.h" - #elif __x86_64__ + #elif __TBB_x86_64 #include "machine/linux_intel64.h" #elif __POWERPC__ #include "machine/mac_ppc.h" @@ -850,9 +850,9 @@ inline intptr_t __TBB_Log2( uintptr_t x ) { if( x==0 ) return -1; intptr_t result = 0; -#if !defined(_M_ARM) - uintptr_t tmp; - if( sizeof(x)>4 && (tmp = ((uint64_t)x)>>32) ) { x=tmp; result += 32; } +#if !defined(_M_ARM) + uintptr_t tmp_; + if( sizeof(x)>4 && (tmp_ = ((uint64_t)x)>>32) ) { x=tmp_; result += 32; } #endif if( uintptr_t tmp = x>>16 ) { x=tmp; result += 16; } if( uintptr_t tmp = x>>8 ) { x=tmp; result += 8; } diff --git a/include/tbb/tbb_profiling.h b/include/tbb/tbb_profiling.h index 9e604172f6f2d022150cf3a539b0f25cb015ddaa..5ef8166b6cebd5a86e0ffffd3cf7cd8a923e3e4a 100644 --- a/include/tbb/tbb_profiling.h +++ b/include/tbb/tbb_profiling.h @@ -1,5 +1,5 @@ /* - 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 @@ -25,9 +25,9 @@ namespace tbb { namespace internal { // - // This is not under __TBB_ITT_STRUCTURE_API because these values are used directly in flow_graph.h. + // This is not under __TBB_ITT_STRUCTURE_API because these values are used directly in flow_graph.h. // - + // include list of index names #define TBB_STRING_RESOURCE(index_name,str) index_name, enum string_index { @@ -47,7 +47,7 @@ namespace tbb { __itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */ __itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */ }; - + } } @@ -141,17 +141,17 @@ namespace tbb { #if __TBB_ITT_STRUCTURE_API enum itt_domain_enum { ITT_DOMAIN_FLOW=0 }; - void __TBB_EXPORTED_FUNC itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, - void *parent, unsigned long long parent_extra, string_index name_index ); - void __TBB_EXPORTED_FUNC itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, - string_index key, const char *value ); - void __TBB_EXPORTED_FUNC itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, + void __TBB_EXPORTED_FUNC itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, + void *parent, unsigned long long parent_extra, string_index name_index ); + void __TBB_EXPORTED_FUNC itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, + string_index key, const char *value ); + void __TBB_EXPORTED_FUNC itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ); - void __TBB_EXPORTED_FUNC itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, + void __TBB_EXPORTED_FUNC itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index name_index ); void __TBB_EXPORTED_FUNC itt_task_end_v7( itt_domain_enum domain ); - void __TBB_EXPORTED_FUNC itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, + void __TBB_EXPORTED_FUNC itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, void *parent, unsigned long long parent_extra, string_index name_index ); void __TBB_EXPORTED_FUNC itt_region_end_v9( itt_domain_enum domain, void *region, unsigned long long region_extra ); #endif // __TBB_ITT_STRUCTURE_API @@ -195,7 +195,7 @@ namespace tbb { __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); itt_store_pointer_with_release_v3(&dst, (void *)src); #else - __TBB_store_with_release(dst, src); + __TBB_store_with_release(dst, src); #endif // TBB_USE_THREADING_TOOLS } @@ -244,22 +244,22 @@ namespace tbb { #endif // TBB_USE_THREADING_TOOLS #if __TBB_ITT_STRUCTURE_API - inline void itt_make_task_group( itt_domain_enum domain, void *group, unsigned long long group_extra, + inline void itt_make_task_group( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { - itt_make_task_group_v7( domain, group, group_extra, parent, parent_extra, name_index ); + itt_make_task_group_v7( domain, group, group_extra, parent, parent_extra, name_index ); } - inline void itt_metadata_str_add( itt_domain_enum domain, void *addr, unsigned long long addr_extra, + inline void itt_metadata_str_add( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { - itt_metadata_str_add_v7( domain, addr, addr_extra, key, value ); + itt_metadata_str_add_v7( domain, addr, addr_extra, key, value ); } - inline void itt_relation_add( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, + inline void itt_relation_add( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { itt_relation_add_v7( domain, addr0, addr0_extra, relation, addr1, addr1_extra ); } - inline void itt_task_begin( itt_domain_enum domain, void *task, unsigned long long task_extra, + inline void itt_task_begin( itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { itt_task_begin_v7( domain, task, task_extra, parent, parent_extra, name_index ); } @@ -268,7 +268,7 @@ namespace tbb { itt_task_end_v7( domain ); } - inline void itt_region_begin( itt_domain_enum domain, void *region, unsigned long long region_extra, + inline void itt_region_begin( itt_domain_enum domain, void *region, unsigned long long region_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { itt_region_begin_v9( domain, region, region_extra, parent, parent_extra, name_index ); } diff --git a/include/tbb/tbb_stddef.h b/include/tbb/tbb_stddef.h index 579e08266b94ef435afbb714c9d8280ac932587f..944a0d83bfb4a765f8cce8330fe9455a1b6e2c11 100644 --- a/include/tbb/tbb_stddef.h +++ b/include/tbb/tbb_stddef.h @@ -1,5 +1,5 @@ /* - 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 @@ -26,7 +26,7 @@ #define TBB_VERSION_MINOR 4 // Engineering-focused interface version -#define TBB_INTERFACE_VERSION 9002 +#define TBB_INTERFACE_VERSION 9003 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000 // The oldest major interface version still supported @@ -495,7 +495,7 @@ T& forward( T& x ) { return x; } #define __TBB_PARAMETER_PACK ... #define __TBB_PACK_EXPANSION(A) A... #else -#define __TBB_PARAMETER_PACK +#define __TBB_PARAMETER_PACK #define __TBB_PACK_EXPANSION(A) A #endif /* __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT */ diff --git a/include/tbb/tbb_thread.h b/include/tbb/tbb_thread.h index a28dd796820ea256f559255efe34516c73095d15..e25351c942f5ff58dbe5632a38ef2adb3eec2911 100644 --- a/include/tbb/tbb_thread.h +++ b/include/tbb/tbb_thread.h @@ -1,5 +1,5 @@ /* - 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 @@ -74,7 +74,7 @@ namespace internal { void* __TBB_EXPORTED_FUNC allocate_closure_v3( size_t size ); //! Free a closure allocated by allocate_closure_v3 void __TBB_EXPORTED_FUNC free_closure_v3( void* ); - + struct thread_closure_base { void* operator new( size_t size ) {return allocate_closure_v3(size);} void operator delete( void* ptr ) {free_closure_v3(ptr);} @@ -91,7 +91,7 @@ namespace internal { } thread_closure_0( const F& f ) : function(f) {} }; - //! Structure used to pass user function with 1 argument to thread. + //! Structure used to pass user function with 1 argument to thread. template struct thread_closure_1: thread_closure_base { F function; X arg1; @@ -129,19 +129,19 @@ namespace internal { tbb_thread_v3(const tbb_thread_v3&); // = delete; // Deny access public: #if _WIN32||_WIN64 - typedef HANDLE native_handle_type; + typedef HANDLE native_handle_type; #else - typedef pthread_t native_handle_type; + typedef pthread_t native_handle_type; #endif // _WIN32||_WIN64 class id; - //! Constructs a thread object that does not represent a thread of execution. + //! Constructs a thread object that does not represent a thread of execution. tbb_thread_v3() __TBB_NOEXCEPT(true) : my_handle(0) #if _WIN32||_WIN64 , my_thread_id(0) #endif // _WIN32||_WIN64 {} - + //! Constructs an object and executes f() in a new thread template explicit tbb_thread_v3(F f) { typedef internal::thread_closure_0 closure_type; @@ -190,20 +190,20 @@ namespace internal { ~tbb_thread_v3() {if( joinable() ) detach();} inline id get_id() const __TBB_NOEXCEPT(true); native_handle_type native_handle() { return my_handle; } - + //! The number of hardware thread contexts. /** Before TBB 3.0 U4 this methods returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask. - + NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool. **/ static unsigned __TBB_EXPORTED_FUNC hardware_concurrency() __TBB_NOEXCEPT(true); private: - native_handle_type my_handle; + native_handle_type my_handle; #if _WIN32||_WIN64 thread_id_type my_thread_id; #endif // _WIN32||_WIN64 @@ -224,13 +224,13 @@ namespace internal { } /** Runs start_routine(closure) on another thread and sets my_handle to the handle of the created thread. */ - void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), + void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), void* closure ); friend void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ); friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ) __TBB_NOEXCEPT(true); }; - - class tbb_thread_v3::id { + + class tbb_thread_v3::id { thread_id_type my_id; id( thread_id_type id_ ) : my_id(id_) {} @@ -244,10 +244,10 @@ namespace internal { friend bool operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator>( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); - + template friend std::basic_ostream& - operator<< (std::basic_ostream &out, + operator<< (std::basic_ostream &out, tbb_thread_v3::id id) { out << id.my_id; @@ -332,8 +332,8 @@ namespace this_tbb_thread { //! Offers the operating system the opportunity to schedule another thread. inline void yield() { internal::thread_yield_v3(); } //! The current thread blocks at least until the time specified. - inline void sleep(const tick_count::interval_t &i) { - internal::thread_sleep_v3(i); + inline void sleep(const tick_count::interval_t &i) { + internal::thread_sleep_v3(i); } } // namespace this_tbb_thread diff --git a/include/tbb/tbbmalloc_proxy.h b/include/tbb/tbbmalloc_proxy.h index 81d7a2b01928550a9bebc659cbeeed16681b74b4..e33516c996763aff3422f6566e35ee9f5ba5c4be 100644 --- a/include/tbb/tbbmalloc_proxy.h +++ b/include/tbb/tbbmalloc_proxy.h @@ -1,5 +1,5 @@ /* - 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 @@ -19,15 +19,15 @@ */ /* -Replacing the standard memory allocation routines in Microsoft* C/C++ RTL -(malloc/free, global new/delete, etc.) with the TBB memory allocator. +Replacing the standard memory allocation routines in Microsoft* C/C++ RTL +(malloc/free, global new/delete, etc.) with the TBB memory allocator. -Include the following header to a source of any binary which is loaded during +Include the following header to a source of any binary which is loaded during application startup #include "tbb/tbbmalloc_proxy.h" -or add following parameters to the linker options for the binary which is +or add following parameters to the linker options for the binary which is loaded during application startup. It can be either exe-file or dll. For win32 diff --git a/include/tbb/tick_count.h b/include/tbb/tick_count.h index 10f5390666c1f60f2a8d00ddae0d591058f365bc..20ce722cd33dfcf76462c2abb67828a470d4562e 100644 --- a/include/tbb/tick_count.h +++ b/include/tbb/tick_count.h @@ -1,5 +1,5 @@ /* - 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 @@ -85,13 +85,13 @@ public: #endif /* (choice of OS) */ } }; - + //! Construct an absolute timestamp initialized to zero. tick_count() : my_count(0) {}; //! Return current time. static tick_count now(); - + //! Subtract two timestamps to get the time interval between friend interval_t operator-( const tick_count& t1, const tick_count& t0 ); diff --git a/index.html b/index.html index d4692c7822151d339081d1ab4ddcc1530d0bece6..4e9526211842cb039a13cac225e06dbd8bd1387b 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ To port Intel TBB to a new platform, operating system or architecture, see the <

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/jni/Android.mk b/jni/Android.mk index b5e48b2ee9088949976eb405929122d3ae3a6638..51750301504becf27690adf797a44d42bb2b2a2d 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -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 @@ -20,9 +20,12 @@ export tbb_root?=$(NDK_PROJECT_PATH) ifeq (armeabi-v7a,$(APP_ABI)) export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm +else ifeq (arm64-v8a,$(APP_ABI)) + export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm64 else export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-$(APP_ABI) endif + ifeq (windows,$(tbb_os)) export CPATH_SEPARATOR :=; else diff --git a/jni/Application.mk b/jni/Application.mk index 11c18fc82ee797c14938844a83a6de563eb64b2f..73a4061081e87772453a0d40367e93cac1884cfb 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -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 @@ -23,23 +23,19 @@ export target?=android ifeq (ia32,$(arch)) APP_ABI:=x86 -else -ifeq (intel64,$(arch)) +else ifeq (intel64,$(arch)) APP_ABI:=x86_64 -else -ifeq (arm,$(arch)) +else ifeq (arm,$(arch)) APP_ABI:=armeabi-v7a -else +else ifeq (arm64,$(arch)) + APP_ABI:=arm64-v8a +else APP_ABI:=$(arch) endif -endif -endif APP_PLATFORM:=android-21 -NDK_TOOLCHAIN_VERSION:=4.9 - -# Intel(R) C++ Compiler does not support ndk r10 version yet. -ifeq (iccx86,$(compiler)$(APP_ABI)) - APP_PLATFORM:=android-9 - NDK_TOOLCHAIN_VERSION:=4.8 +ifneq ("","$(api_version)") + APP_PLATFORM:=$(api_version) endif + +NDK_TOOLCHAIN_VERSION:=4.9 diff --git a/src/Makefile b/src/Makefile index 5ea30639aa2ff67246984731036c417485c9cc4f..d457e77c04146c2c2c4c407dbde879708cc59380 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/index.html b/src/index.html index a7354ef11ca4e50038b40fa362e3ce9dda1d925e..30ebf79392f9036db1511bf310e20e4871963d6a 100644 --- a/src/index.html +++ b/src/index.html @@ -63,7 +63,7 @@ This directory contains the source code and unit tests for Intel® Threading
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/old/concurrent_queue_v2.cpp b/src/old/concurrent_queue_v2.cpp index e01949469ba5c17ac6d6d5b5f74a7d474f127385..42eec77ddb02bac0e72d9da59a76002b5fea6225 100644 --- a/src/old/concurrent_queue_v2.cpp +++ b/src/old/concurrent_queue_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/concurrent_queue_v2.h b/src/old/concurrent_queue_v2.h index 662c066bfe60730f634fb0a0a94174732e81372e..b0c782ebfd98a3b81ff7f613f1bb452d43bc7ac2 100644 --- a/src/old/concurrent_queue_v2.h +++ b/src/old/concurrent_queue_v2.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/concurrent_vector_v2.cpp b/src/old/concurrent_vector_v2.cpp index e65f4f435952ca936a116235be41278086d6548b..e2481b086a7dd40bc402ca66dddf2741a3ca3984 100644 --- a/src/old/concurrent_vector_v2.cpp +++ b/src/old/concurrent_vector_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/concurrent_vector_v2.h b/src/old/concurrent_vector_v2.h index 5ea35cdd56a25b08c55b458486ee455b817d993b..e96984bca6908cede55850910ec51e39811a0e13 100644 --- a/src/old/concurrent_vector_v2.h +++ b/src/old/concurrent_vector_v2.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/spin_rw_mutex_v2.cpp b/src/old/spin_rw_mutex_v2.cpp index 4be6cfdca4662df54cbfd2340772fdee45804ab7..1f870cf77ae2525060285296802beade7178d33c 100644 --- a/src/old/spin_rw_mutex_v2.cpp +++ b/src/old/spin_rw_mutex_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/spin_rw_mutex_v2.h b/src/old/spin_rw_mutex_v2.h index ff0657c269ff395f9f0399dc576b208bed9d20dc..5ce5c96d66cd79a4023e8d2bfbeb6597473131fb 100644 --- a/src/old/spin_rw_mutex_v2.h +++ b/src/old/spin_rw_mutex_v2.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/task_v2.cpp b/src/old/task_v2.cpp index 92f8baddb5865ae7b082c941109115b598d2aa52..b735e5a1a8e9e07a0306769132de0e8081524639 100644 --- a/src/old/task_v2.cpp +++ b/src/old/task_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/test_concurrent_queue_v2.cpp b/src/old/test_concurrent_queue_v2.cpp index 7e8cc9618f3dd922e99ae59785160e700e9b3aa3..3b589398efec44c4b0b806ebe13d542f2c7126b5 100644 --- a/src/old/test_concurrent_queue_v2.cpp +++ b/src/old/test_concurrent_queue_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/test_concurrent_vector_v2.cpp b/src/old/test_concurrent_vector_v2.cpp index a47387404680c8ac13c15d3a25e00c4f41358dc9..79f60e4cce0aecb76390ddbdd0aaf9210571246f 100644 --- a/src/old/test_concurrent_vector_v2.cpp +++ b/src/old/test_concurrent_vector_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/test_mutex_v2.cpp b/src/old/test_mutex_v2.cpp index 3f6a010f8da89abcb2e5f07531ef1f220743d419..2fa68886b9d483056b71a6cc1d1033d9c6f0c0d5 100644 --- a/src/old/test_mutex_v2.cpp +++ b/src/old/test_mutex_v2.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/old/test_task_scheduler_observer_v3.cpp b/src/old/test_task_scheduler_observer_v3.cpp index 7867d9ff6bdfd11331a90e07472652fe6a5ec009..9d84938a63d7ac72d920a45fdb3b8e69e3a6e696 100644 --- a/src/old/test_task_scheduler_observer_v3.cpp +++ b/src/old/test_task_scheduler_observer_v3.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/perf/coarse_grained_raii_lru_cache.h b/src/perf/coarse_grained_raii_lru_cache.h index cce4d58457d0893f9688522b6cb79bfc460412ab..407b6a2733960e2273537bd7cf90b689b49c8a1d 100644 --- a/src/perf/coarse_grained_raii_lru_cache.h +++ b/src/perf/coarse_grained_raii_lru_cache.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/perf/cpq_pdes.cpp b/src/perf/cpq_pdes.cpp index 2d84ce03a5b52ec8caeba355876cd515df366a8e..23e72d00e3fb6511393af572910ddf709536f772 100644 --- a/src/perf/cpq_pdes.cpp +++ b/src/perf/cpq_pdes.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -73,13 +73,12 @@ unsigned int one_us_iters = 429; // default value // if user wants to calibrate to microseconds on particular machine, call this at beginning of program // sets one_us_iters to number of iters to busy_wait for approx. 1 us void calibrate_busy_wait() { - tbb::tick_count t0, t1; + const unsigned niter = 1000000; + tbb::tick_count t0 = tbb::tick_count::now(); + for (volatile unsigned int i=0; i >, 1000000/*ns*/> +#define BOX1TEST ValuePerSecond >, SECONDS_RATIO> #define BOX1HEADER "tbb/concurrent_hash_map.h" // enable/disable tests for: #define BOX2 "CUMap" -#define BOX2TEST ValuePerSecond >, 1000000/*ns*/> +#define BOX2TEST ValuePerSecond >, SECONDS_RATIO> #define BOX2HEADER "tbb/concurrent_unordered_map.h" // enable/disable tests for: //#define BOX3 "OLD" -#define BOX3TEST ValuePerSecond >, 1000000/*ns*/> +#define BOX3TEST ValuePerSecond >, SECONDS_RATIO> #define BOX3HEADER "tbb/concurrent_hash_map-5468.h" #define TBB_USE_THREADING_TOOLS 0 @@ -158,7 +160,7 @@ int main(int argc, char* argv[]) { test_sandbox the_test("time_hash_map_fill"/*, StatisticsCollector::ByThreads*/); srand(10101); UNIQUE_PERCENTS; // test the percents - the_test.report.SetTitle("Operations per nanosecond"); + the_test.report.SetTitle("Operations per microsecond"); the_test.report.SetRunInfo("Items", MAX_TABLE_SIZE); the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); // Write files return 0; diff --git a/src/perf/time_hash_map_fill.html b/src/perf/time_hash_map_fill.html index 477d7013807508f7e8ab0335ab7bc5823c211e24..28525546d5961a9e4bd3da22b646aafb85e1f596 100644 --- a/src/perf/time_hash_map_fill.html +++ b/src/perf/time_hash_map_fill.html @@ -112,7 +112,7 @@ In addition, a size of the source array correlates with input rates in order to
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/perf/time_locked_work.cpp b/src/perf/time_locked_work.cpp index 42db238819f022b98e0a0d48b770f01eedbca0d2..37964e28c179bc7e54a65b7a9ba960655fa41fdd 100644 --- a/src/perf/time_locked_work.cpp +++ b/src/perf/time_locked_work.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/perf/time_lru_cache_throughput.cpp b/src/perf/time_lru_cache_throughput.cpp index c310ff9091aee4d29eb4bc9152575e4245d982e5..75fd63a53d9caf12b58d152e5dd5d4d9af38527f 100644 --- a/src/perf/time_lru_cache_throughput.cpp +++ b/src/perf/time_lru_cache_throughput.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -54,11 +54,12 @@ namespace utils{ // this at beginning of program; sets one_us_iters to number of iters to // busy_wait for approx. 1 us void calibrate_busy_wait() { + const unsigned niter = 1000000; tbb::tick_count t0 = tbb::tick_count::now(); - for (volatile unsigned int i=0; i<1000000; ++i) continue; + for (volatile unsigned int i=0; i ); tbb::tick_count t1 = tbb::tick_count::now(); - times.push_back( (t1 - t0).seconds()*1000 ); + times.push_back( (t1 - t0).seconds()*1e+3 ); } std::sort( times.begin(), times.end() ); diff --git a/src/perf/time_sandbox.h b/src/perf/time_sandbox.h index 8e2cc767c962f9c46b0f8ec45788117936a8a976..b2a67fc286ba3041c38f435b472dbd5142e33258 100644 --- a/src/perf/time_sandbox.h +++ b/src/perf/time_sandbox.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/perf/time_vector.cpp b/src/perf/time_vector.cpp index 9642f7824653fd55dfba006fcb46dbdb0a289a23..a28740c6f3dd1612f54e866465b3290f96526abe 100644 --- a/src/perf/time_vector.cpp +++ b/src/perf/time_vector.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -93,9 +93,9 @@ public: dv[len-i-1] = timer0.diff_time(tv[i]); tv[i].mark_time(); } - stat.AddStatisticValue( key[2], "1total, ms", "%.3f", timer2.get_time()*1000.0 ); - stat.AddStatisticValue( key[1], "1total, ms", "%.3f", timer1.diff_time(timer2)*1000.0 ); - stat.AddStatisticValue( key[0], "1total, ms", "%.3f", timer0.diff_time(timer1)*1000.0 ); + stat.AddStatisticValue( key[2], "1total, ms", "%.3f", timer2.get_time()*1e+3 ); + stat.AddStatisticValue( key[1], "1total, ms", "%.3f", timer1.diff_time(timer2)*1e+3 ); + stat.AddStatisticValue( key[0], "1total, ms", "%.3f", timer0.diff_time(timer1)*1e+3 ); //allocator statistics stat.AddStatisticValue( key[0], "2total allocations", "%d", int(timers_vector_t::allocator_type::allocations) ); stat.AddStatisticValue( key[1], "2total allocations", "%d", int(values_vector_t::allocator_type::allocations) ); @@ -104,13 +104,13 @@ public: stat.AddStatisticValue( key[1], "3total alloc#items", "%d", int(values_vector_t::allocator_type::items_allocated) ); stat.AddStatisticValue( key[2], "3total alloc#items", "%d", 0); //remarks - stat.AddStatisticValue( key[0], "9note", "segment creation time, ns:"); - stat.AddStatisticValue( key[2], "9note", "average op-time per item, ns:"); + stat.AddStatisticValue( key[0], "9note", "segment creation time, us:"); + stat.AddStatisticValue( key[2], "9note", "average op-time per item, us:"); Timer last_timer(timer2); double last_value = 0; for (size_t j = 0, i = 2; i < len; i *= 2, j++) { - stat.AddRoundResult( key[0], (dv[len-i-1]-last_value)*1000000.0 ); + stat.AddRoundResult( key[0], (dv[len-i-1]-last_value)*1e+6 ); last_value = dv[len-i-1]; - stat.AddRoundResult( key[2], last_timer.diff_time(tv[i])/double(i)*1000000.0 ); + stat.AddRoundResult( key[2], last_timer.diff_time(tv[i])/double(i)*1e+6 ); last_timer = tv[i]; stat.SetRoundTitle(j, i); } @@ -154,10 +154,10 @@ public: std::sort(v2.rbegin(), v2.rend()); std::set_intersection(v1.begin(), v1.end(), v2.rbegin(), v2.rend(), v1.begin()); Timer timer3; - stat.AddRoundResult( proc_key, timer2.diff_time(timer3)*1000.0 ); - stat.AddRoundResult( fill_key, timer1.diff_time(timer2)*1000.0 ); - stat.AddRoundResult( init_key, timer0.diff_time(timer1)*1000.0 ); - stat.AddRoundResult( full_key, timer0.diff_time(timer3)*1000.0 ); + stat.AddRoundResult( proc_key, timer2.diff_time(timer3)*1e+3 ); + stat.AddRoundResult( fill_key, timer1.diff_time(timer2)*1e+3 ); + stat.AddRoundResult( init_key, timer0.diff_time(timer1)*1e+3 ); + stat.AddRoundResult( full_key, timer0.diff_time(timer3)*1e+3 ); } stat.SetStatisticFormula("1Average", "=AVERAGE(ROUNDS)"); stat.SetStatisticFormula("2+/-", "=(MAX(ROUNDS)-MIN(ROUNDS))/2"); diff --git a/src/rml/client/index.html b/src/rml/client/index.html index 29d2c7bfbfacfddcd21b7bd61a420f0289b9ff46..2b58891836718c2619155c7538cd106c9c94e96b 100644 --- a/src/rml/client/index.html +++ b/src/rml/client/index.html @@ -31,7 +31,7 @@ This directory has source code that must be statically linked into an RML client
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/rml/client/library_assert.h b/src/rml/client/library_assert.h index b626bbe3612f8e7bc89de68bca31701d73717477..7c16fda422511edb875aad8d2666c4d2f153cee2 100644 --- a/src/rml/client/library_assert.h +++ b/src/rml/client/library_assert.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/client/omp_dynamic_link.cpp b/src/rml/client/omp_dynamic_link.cpp index 2c0d7ca700e48395dfef4ae7de2aa7b72f86d482..adcd0b120e747fb29efc379f1ee03be05bdb9a36 100644 --- a/src/rml/client/omp_dynamic_link.cpp +++ b/src/rml/client/omp_dynamic_link.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/client/omp_dynamic_link.h b/src/rml/client/omp_dynamic_link.h index 0c491e799c4a2ca90ff88c11881bf6d344d1b788..eb65fea6fef25e2c1b182202ce30fa8153da75ba 100644 --- a/src/rml/client/omp_dynamic_link.h +++ b/src/rml/client/omp_dynamic_link.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/client/rml_factory.h b/src/rml/client/rml_factory.h index 4dd421ce22ebfe51519783f97a43d429cd4055b9..6f5f4828c49e8ba6732c0fac372742d9f1ca0274 100644 --- a/src/rml/client/rml_factory.h +++ b/src/rml/client/rml_factory.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/client/rml_omp.cpp b/src/rml/client/rml_omp.cpp index e80afc7196ed5ad0a301686cc02d1a21488566de..f6dbe012a073921bd45ce9b82ab065c5d0d7840e 100644 --- a/src/rml/client/rml_omp.cpp +++ b/src/rml/client/rml_omp.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/client/rml_tbb.cpp b/src/rml/client/rml_tbb.cpp index fa71ff9f44b29f881b09a5cb64e0be592ee3b5af..ab95f81e5a78cc25d68721fd21810e241af1be84 100644 --- a/src/rml/client/rml_tbb.cpp +++ b/src/rml/client/rml_tbb.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/include/index.html b/src/rml/include/index.html index f740c666418c19451ed82161a980f34cfa48aea9..3e7653a7403450d13425a83211a81a2b5c240e19 100644 --- a/src/rml/include/index.html +++ b/src/rml/include/index.html @@ -18,7 +18,7 @@ This directory has the include files for the Resource Management Layer (RML).
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/rml/include/rml_base.h b/src/rml/include/rml_base.h index 7cee52e6e928d6da98e592e31e123b864e38e90f..e4f28529dd5ae5bb751b22a804924931f581bcfb 100644 --- a/src/rml/include/rml_base.h +++ b/src/rml/include/rml_base.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/include/rml_omp.h b/src/rml/include/rml_omp.h index 51757d7f133d68bfa982c3493c24dd3cc967a32f..3ff393a332ca34133e85b239a82d61b838d8e569 100644 --- a/src/rml/include/rml_omp.h +++ b/src/rml/include/rml_omp.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/include/rml_tbb.h b/src/rml/include/rml_tbb.h index e1cac103805f3f638f3fbde518870c9c8100984f..16dd11281e8ae02035410593069f7e00c1a4ffac 100644 --- a/src/rml/include/rml_tbb.h +++ b/src/rml/include/rml_tbb.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/index.html b/src/rml/index.html index 77aa70b9fed714187df4cdc990e5e326b4cf2ba8..07d80929a2f271bdf5dcad9217f6bd3981462b3a 100644 --- a/src/rml/index.html +++ b/src/rml/index.html @@ -20,7 +20,7 @@ The subdirectories pertain to the Resource Management Layer (RML).
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/rml/perfor/omp_nested.cpp b/src/rml/perfor/omp_nested.cpp index 9d5cbc0c759c59ef4c9dba30d41355b9875fd9c2..07819529cbdc16258301a17050f9ea43cecaf5b7 100644 --- a/src/rml/perfor/omp_nested.cpp +++ b/src/rml/perfor/omp_nested.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/perfor/omp_simple.cpp b/src/rml/perfor/omp_simple.cpp index f28db5af326497902854440366d3e9f915f08226..125d78e12072fdbd22983b2eb4c2608c774aaf4d 100644 --- a/src/rml/perfor/omp_simple.cpp +++ b/src/rml/perfor/omp_simple.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/perfor/tbb_multi_omp.cpp b/src/rml/perfor/tbb_multi_omp.cpp index 656c7bb438a342e954d63ab368f369fe30e556b3..0ec8d0f2c154fa40d6636120006cb3df8ad91cf9 100644 --- a/src/rml/perfor/tbb_multi_omp.cpp +++ b/src/rml/perfor/tbb_multi_omp.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/perfor/tbb_simple.cpp b/src/rml/perfor/tbb_simple.cpp index 5a42df89c93dc03add4a991b01b86c19578f84d3..a53b2aff0b36a794a873b7d749ef4b86761656eb 100644 --- a/src/rml/perfor/tbb_simple.cpp +++ b/src/rml/perfor/tbb_simple.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/perfor/thread_level.h b/src/rml/perfor/thread_level.h index 333b03e5870a8fa329638f66c27ed3da072b052a..b675d6d218ea45a105bf94544e1daacd41347f5b 100644 --- a/src/rml/perfor/thread_level.h +++ b/src/rml/perfor/thread_level.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/index.html b/src/rml/server/index.html index 932974bbc4ccfb5cb0ea231e071bc070bae38c21..784e39209207dcc3b880ca8ab4ff984b054765f1 100644 --- a/src/rml/server/index.html +++ b/src/rml/server/index.html @@ -7,7 +7,7 @@ This directory has source code internal to the server.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/rml/server/irml.rc b/src/rml/server/irml.rc index 7b4a71fa9089cb656e584d755089d8e2deae491c..322fa65b0c37fd24484e4fc478d733b1c83d62af 100644 --- a/src/rml/server/irml.rc +++ b/src/rml/server/irml.rc @@ -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 @@ -81,7 +81,7 @@ BEGIN VALUE "CompanyName", "Intel Corporation\0" VALUE "FileDescription", "Intel(R) Threading Building Blocks resource manager library\0" VALUE "FileVersion", TBB_VERSION "\0" - VALUE "LegalCopyright", "Copyright 2005-2015 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalCopyright", "Copyright 2005-2016 Intel Corporation. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" #ifndef TBB_USE_DEBUG VALUE "OriginalFilename", "irml.dll\0" diff --git a/src/rml/server/job_automaton.h b/src/rml/server/job_automaton.h index f359c31afac154cf2369ea03cebe7d817e9e3ff5..31086e4f0a058672866b92a1cf03c90ea9b682bb 100644 --- a/src/rml/server/job_automaton.h +++ b/src/rml/server/job_automaton.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/lin-rml-export.def b/src/rml/server/lin-rml-export.def index a493ca3ce0bb61a47631f645ada2fc9ac2b0cb91..c39b49cf2d2324191c38a498877961554e74e0af 100644 --- a/src/rml/server/lin-rml-export.def +++ b/src/rml/server/lin-rml-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/rml_server.cpp b/src/rml/server/rml_server.cpp index b7eaf553093d4ecae72fb82c23924b53aeeeb804..98e9a912e4f6d53f62a648edb6827119b50a0847 100644 --- a/src/rml/server/rml_server.cpp +++ b/src/rml/server/rml_server.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/thread_monitor.h b/src/rml/server/thread_monitor.h index 699f809cba1ba080d56ba500da487f8cb3455e4c..6286ce99459df08f19dd6b5470f6a41b2b1034cf 100644 --- a/src/rml/server/thread_monitor.h +++ b/src/rml/server/thread_monitor.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/wait_counter.h b/src/rml/server/wait_counter.h index 7c700e9b962826ace0ede7f86cb1a3b83350c154..aeffc9d2ac666e4cca37cc12d5f5c218a5c1b1f1 100644 --- a/src/rml/server/wait_counter.h +++ b/src/rml/server/wait_counter.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/server/win32-rml-export.def b/src/rml/server/win32-rml-export.def index 7fc36c47da22a0e12a4a7e605bd5a778160b6c24..2e6ae048e73b4b422778ed9c4af62f11840345fb 100644 --- a/src/rml/server/win32-rml-export.def +++ b/src/rml/server/win32-rml-export.def @@ -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 diff --git a/src/rml/server/win64-rml-export.def b/src/rml/server/win64-rml-export.def index 7fc36c47da22a0e12a4a7e605bd5a778160b6c24..2e6ae048e73b4b422778ed9c4af62f11840345fb 100644 --- a/src/rml/server/win64-rml-export.def +++ b/src/rml/server/win64-rml-export.def @@ -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 diff --git a/src/rml/test/rml_omp_stub.cpp b/src/rml/test/rml_omp_stub.cpp index c105e31ddeafc7553257f73c0398d8b874186537..bdf8ff6e02ebe6b7efd37b1d22c90d7fa49ec609 100644 --- a/src/rml/test/rml_omp_stub.cpp +++ b/src/rml/test/rml_omp_stub.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_job_automaton.cpp b/src/rml/test/test_job_automaton.cpp index 1cc38f08f10e4e29b4d002d922a29f0a07fe8a27..0b4fd04cc36636d2214da5782051a69b29b91a8d 100644 --- a/src/rml/test/test_job_automaton.cpp +++ b/src/rml/test/test_job_automaton.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_rml_mixed.cpp b/src/rml/test/test_rml_mixed.cpp index 3b2b06a41dab7a57c27712feec738603fdd7b3f4..b2b923f9d0200bba8e7a47e25eee762d4b5d1e7b 100644 --- a/src/rml/test/test_rml_mixed.cpp +++ b/src/rml/test/test_rml_mixed.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_rml_omp.cpp b/src/rml/test/test_rml_omp.cpp index 34c2e60227e5db71efe55ca281c0f01fb15926dd..02b48b8d6476968758a554720e1e78997b9aba4a 100644 --- a/src/rml/test/test_rml_omp.cpp +++ b/src/rml/test/test_rml_omp.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_rml_omp_c_linkage.c b/src/rml/test/test_rml_omp_c_linkage.c index 26475a264a638acccd5a357ae7f3eb05c73d998a..47bba19c2f499488d63090ed0e3f5b84374e9cd9 100644 --- a/src/rml/test/test_rml_omp_c_linkage.c +++ b/src/rml/test/test_rml_omp_c_linkage.c @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_rml_tbb.cpp b/src/rml/test/test_rml_tbb.cpp index 530c0fb4e141cdcdfdc6188a7f30d6f30b424c2f..0757cac28cc69ab7da77c6c78cc8a90e397a98c6 100644 --- a/src/rml/test/test_rml_tbb.cpp +++ b/src/rml/test/test_rml_tbb.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_server.h b/src/rml/test/test_server.h index dc936c82f1da7b82c4d526ea534fe553c19764dc..1348ab47d52e8a6d853ebf0ad61dce25023ecfb6 100644 --- a/src/rml/test/test_server.h +++ b/src/rml/test/test_server.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/rml/test/test_thread_monitor.cpp b/src/rml/test/test_thread_monitor.cpp index b780264936771ee6f6dd9cf224d4dd1dcd4e8dc4..af35562bbf724672a9f0acac1f5bd5d79f7fe1c3 100644 --- a/src/rml/test/test_thread_monitor.cpp +++ b/src/rml/test/test_thread_monitor.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/arena.cpp b/src/tbb/arena.cpp index 170786134df53656b18ac038f1015c8c3fbcf6c6..e9e10ea5fdf85450caf12be6914d823a2964f9f8 100644 --- a/src/tbb/arena.cpp +++ b/src/tbb/arena.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -137,12 +137,16 @@ void arena::process( generic_scheduler& s ) { for ( ;; ) { __TBB_ASSERT( is_alive(my_guard), NULL ); - __TBB_ASSERT ( __TBB_load_relaxed(s.my_arena_slot->head) == __TBB_load_relaxed(s.my_arena_slot->tail), - "Worker cannot leave arena while its task pool is not empty" ); + __TBB_ASSERT( s.is_quiescent_local_task_pool_reset(), + "Worker cannot leave arena while its task pool is not reset" ); __TBB_ASSERT( s.my_arena_slot->task_pool == EmptyTaskPool, "Empty task pool is not marked appropriately" ); // This check prevents relinquishing more than necessary workers because // of the non-atomicity of the decision making procedure - if (num_workers_active() > my_num_workers_allotted) + if ( num_workers_active() > my_num_workers_allotted +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + || recall_by_mandatory_request() +#endif + ) break; // Try to steal a task. // Passing reference count is technically unnecessary in this context, @@ -220,7 +224,9 @@ arena::arena ( market& m, unsigned num_slots, unsigned num_reserved_slots ) { } my_task_stream.initialize(my_num_slots); ITT_SYNC_CREATE(&my_task_stream, SyncType_Scheduler, SyncObj_TaskStream); - my_mandatory_concurrency = false; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + my_mandatory_mode = no_mandatory; +#endif #if !__TBB_FP_CONTEXT my_cpu_ctl_env.get_env(); #endif @@ -242,6 +248,9 @@ void arena::free_arena () { __TBB_ASSERT( !my_references, "There are threads in the dying arena" ); __TBB_ASSERT( !my_num_workers_requested && !my_num_workers_allotted, "Dying arena requests workers" ); __TBB_ASSERT( my_pool_state == SNAPSHOT_EMPTY || !my_max_num_workers, "Inconsistent state of a dying arena" ); +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + __TBB_ASSERT( my_mandatory_mode != global_mandatory, NULL ); +#endif #if !__TBB_STATISTICS_EARLY_DUMP GATHER_STATISTIC( dump_arena_statistics() ); #endif @@ -362,6 +371,37 @@ void arena::orphan_offloaded_tasks(generic_scheduler& s) { } #endif /* __TBB_TASK_PRIORITY */ +void arena::restore_priorities_if_need() { + // Check for the presence of enqueued tasks "lost" on some of + // priority levels because updating arena priority and switching + // arena into "populated" (FULL) state happen non-atomically. + // Imposing atomicity would require task::enqueue() to use a lock, + // which is unacceptable. +#if __TBB_TASK_PRIORITY + bool switch_back = false; + for ( int p = 0; p < num_priority_levels; ++p ) { + if ( !my_task_stream.empty(p) ) { + switch_back = true; + break; + } + } +#else + bool switch_back = !my_task_stream.empty(0); +#endif /* __TBB_TASK_PRIORITY */ + if ( switch_back ) { + advertise_new_work(); +#if __TBB_TASK_PRIORITY + // update_arena_priority() expects non-zero arena::my_num_workers_requested, + // so must be called after advertise_new_work() + for ( int p = 0; p < num_priority_levels; ++p ) + if ( !my_task_stream.empty(p) ) { + if ( p < my_bottom_priority || p > my_top_priority ) + my_market->update_arena_priority(*this, p); + } +#endif + } +} + bool arena::is_out_of_work() { // TODO: rework it to return at least a hint about where a task was found; better if the task itself. for(;;) { @@ -465,26 +505,18 @@ bool arena::is_out_of_work() { // to avoid race with advertise_new_work. int current_demand = (int)my_max_num_workers; if( my_pool_state.compare_and_swap( SNAPSHOT_EMPTY, busy )==busy ) { - // This thread transitioned pool to empty state, and thus is - // responsible for telling RML that there is no other work to do. - my_market->adjust_demand( *this, -current_demand ); -#if __TBB_TASK_PRIORITY - // Check for the presence of enqueued tasks "lost" on some of - // priority levels because updating arena priority and switching - // arena into "populated" (FULL) state happen non-atomically. - // Imposing atomicity would require task::enqueue() to use a lock, - // which is unacceptable. - bool switch_back = false; - for ( int p = 0; p < num_priority_levels; ++p ) { - if ( !my_task_stream.empty(p) ) { - switch_back = true; - if ( p < my_bottom_priority || p > my_top_priority ) - my_market->update_arena_priority(*this, p); - } +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if( my_mandatory_mode==global_mandatory ) { + // adjust_demand() called inside, if needed + my_market->mandatory_concurrency_disable( this ); + } else +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ + { + // This thread transitioned pool to empty state, and thus is + // responsible for telling RML that there is no other work to do. + my_market->adjust_demand( *this, -current_demand ); } - if ( switch_back ) - advertise_new_work(); -#endif /* __TBB_TASK_PRIORITY */ + restore_priorities_if_need(); return true; } return false; @@ -548,7 +580,7 @@ void arena::enqueue_task( task& t, intptr_t prio, FastRandom &random ) __TBB_ASSERT_EX(prio == 0, "the library is not configured to respect the task priority"); my_task_stream.push( &t, 0, random ); #endif /* !__TBB_TASK_PRIORITY */ - advertise_new_work< /*Spawned=*/ false >(); + advertise_new_work(); #if __TBB_TASK_PRIORITY if ( p != my_top_priority ) my_market->update_arena_priority( *this, p ); @@ -654,15 +686,11 @@ namespace internal { void task_arena_base::internal_initialize( ) { governor::one_time_init(); - bool default_concurrency_requested = false; - if( my_max_concurrency < 1 ) { + if( my_max_concurrency < 1 ) my_max_concurrency = (int)governor::default_num_threads(); - default_concurrency_requested = true; - } __TBB_ASSERT( my_master_slots <= (unsigned)my_max_concurrency, "Number of slots reserved for master should not exceed arena concurrency"); arena* new_arena = market::create_arena( my_max_concurrency, my_master_slots, - global_control::active_value(global_control::thread_stack_size), - default_concurrency_requested ); + global_control::active_value(global_control::thread_stack_size) ); // add an internal market reference; a public reference was added in create_arena market &m = market::global_market( /*is_public=*/false ); // allocate default context for task_arena @@ -742,7 +770,7 @@ class delegated_task : public task { __TBB_ASSERT(s.worker_outermost_level() || s.master_outermost_level(), "expected to be enqueued and received on the outermost level"); // but this task can mimics outermost level, detect it if( s.master_outermost_level() && s.my_dummy_task->state() == task::executing ) { -#if TBB_USE_EXCEPTIONS +#if __TBB_USE_OPTIONAL_RTTI // RTTI is available, check whether the cast is valid __TBB_ASSERT(dynamic_cast(s.my_dummy_task), 0); #endif @@ -871,7 +899,7 @@ class wait_task : public task { s->local_wait_for_all( *s->my_dummy_task, NULL ); __TBB_ASSERT( !s->my_dispatching_task && !s->my_innermost_running_task, NULL ); s->my_innermost_running_task = this; - } else s->my_arena->is_out_of_work(); // avoids starvation of internal_wait: issuing this task makes arena full + } else s->my_arena->is_out_of_work(); // avoids starvation of internal_wait: issuing this task makes arena full my_signal.V(); return NULL; } diff --git a/src/tbb/arena.h b/src/tbb/arena.h index 8ffa0156bdce34072cde7e59becd16c9742e3cb3..9654f017607b7cf7dfdec4fc6050fec05dd55e3c 100644 --- a/src/tbb/arena.h +++ b/src/tbb/arena.h @@ -1,5 +1,5 @@ /* - 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 @@ -46,7 +46,7 @@ class allocate_root_with_context_proxy; namespace internal { //! arena data except the array of slots -/** Separated in order to simplify padding. +/** Separated in order to simplify padding. Intrusive list node base class is used by market to form a list of arenas. **/ struct arena_base : padded { //! Number of workers that have been marked out by the resource manager to service the arena @@ -84,9 +84,9 @@ struct arena_base : padded { unsigned my_max_num_workers; //! Current task pool state and estimate of available tasks amount. - /** The estimate is either 0 (SNAPSHOT_EMPTY) or infinity (SNAPSHOT_FULL). - Special state is "busy" (any other unsigned value). - Note that the implementation of arena::is_busy_or_empty() requires + /** The estimate is either 0 (SNAPSHOT_EMPTY) or infinity (SNAPSHOT_FULL). + Special state is "busy" (any other unsigned value). + Note that the implementation of arena::is_busy_or_empty() requires my_pool_state to be unsigned. */ tbb::atomic my_pool_state; @@ -143,8 +143,16 @@ struct arena_base : padded { //! Number of reserved slots (can be occupied only by masters) unsigned my_num_reserved_slots; - //! Indicates if there is an oversubscribing worker created to service enqueued tasks. - bool my_mandatory_concurrency; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + enum mandatory_mode { + no_mandatory, + local_mandatory, + global_mandatory + }; + + //! Is mandatory concurrency subject of per-arena set or global control? + mandatory_mode my_mandatory_mode; +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ #if __TBB_TASK_ARENA //! exit notifications after arena slot is released @@ -159,9 +167,18 @@ struct arena_base : padded { class arena: public padded { + //! Restore priorities of arenas and task presence status of the arena, if new enqueued tasks found + void restore_priorities_if_need(); public: typedef padded base_type; + //! type of work that advertised by advertise_new_work() + enum new_work_type { + work_spawned, + wakeup, + work_enqueued + }; + //! Constructor arena ( market&, unsigned max_num_workers, unsigned num_reserved_slots ); @@ -211,7 +228,7 @@ public: } //! If necessary, raise a flag that there is new job in arena. - template void advertise_new_work(); + template void advertise_new_work(); //! Check if there is job anywhere in arena. /** Return true if no job or if arena is being cleaned up. */ @@ -246,6 +263,18 @@ public: intptr_t workers_task_node_count(); #endif +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + //! Recall worker if global mandatory is enabled, but not for this arena + bool recall_by_mandatory_request() const { + return my_market->my_mandatory_num_requested && my_mandatory_mode==arena_base::no_mandatory; + } + + //! Mandatory parallelism requested by this arena + bool mandatory_requested() const { + return my_num_workers_requested && my_market->my_mandatory_num_requested + && my_mandatory_mode!=arena_base::no_mandatory; + } +#endif static const size_t out_of_arena = ~size_t(0); //! Tries to occupy a slot in the arena. On success, returns the slot index; if no slot is available, returns out_of_arena. template @@ -321,40 +350,76 @@ inline void arena::on_thread_leaving ( ) { // If just one, dump statistics. if ( modulo_power_of_two(my_references,ref_worker)==ref_param ) // may only be true with ref_external GATHER_STATISTIC( dump_arena_statistics() ); +#endif +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + // When there is no workers someone must free arena, as + // without workers, no one calls is_out_of_work(). + // Skip workerless arenas because they have no demand for workers. + // TODO: consider more strict conditions for the cleanup, + // because it can create the demand of workers, + // but the arena can be already empty (and so ready for destroying) + if( ref_param==ref_external && my_num_slots != my_num_reserved_slots + && 0 == m->my_num_workers_soft_limit && my_mandatory_mode==no_mandatory ) { + bool is_out = false; +#if !__TBB_TASK_PRIORITY + const int num_priority_levels = 1; +#endif + for (int i=0; itry_destroy_arena( this, aba_epoch ); } -template void arena::advertise_new_work() { - if( !Spawned ) { // i.e. the work was enqueued - if( my_max_num_workers==0 ) { +template void arena::advertise_new_work() { + if( work_type == work_enqueued ) { +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if( my_market->my_num_workers_soft_limit == 0 ) { + if( my_mandatory_mode!=global_mandatory ) { + if( my_market->mandatory_concurrency_enable( this ) ) { + my_pool_state = SNAPSHOT_FULL; + return; + } + } + } else if( my_max_num_workers==0 ) { my_max_num_workers = 1; - __TBB_ASSERT(!my_mandatory_concurrency, ""); - my_mandatory_concurrency = true; - __TBB_ASSERT(!num_workers_active(), ""); + __TBB_ASSERT(my_mandatory_mode==no_mandatory, ""); + my_mandatory_mode = local_mandatory; my_pool_state = SNAPSHOT_FULL; my_market->adjust_demand( *this, 1 ); return; } - // Local memory fence is required to avoid missed wakeups; see the comment below. +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ + // Local memory fence here and below is required to avoid missed wakeups; see the comment below. // Starvation resistant tasks require mandatory concurrency, so missed wakeups are unacceptable. - atomic_fence(); + atomic_fence(); + } + else if( work_type == wakeup ) { + __TBB_ASSERT(my_max_num_workers!=0, "Not expect mandatory concurrency request."); + atomic_fence(); } // Double-check idiom that, in case of spawning, is deliberately sloppy about memory fences. - // Technically, to avoid missed wakeups, there should be a full memory fence between the point we - // released the task pool (i.e. spawned task) and read the arena's state. However, adding such a - // fence might hurt overall performance more than it helps, because the fence would be executed - // on every task pool release, even when stealing does not occur. Since TBB allows parallelism, + // Technically, to avoid missed wakeups, there should be a full memory fence between the point we + // released the task pool (i.e. spawned task) and read the arena's state. However, adding such a + // fence might hurt overall performance more than it helps, because the fence would be executed + // on every task pool release, even when stealing does not occur. Since TBB allows parallelism, // but never promises parallelism, the missed wakeup is not a correctness problem. pool_state_t snapshot = my_pool_state; if( is_busy_or_empty(snapshot) ) { - // Attempt to mark as full. The compare_and_swap below is a little unusual because the + // Attempt to mark as full. The compare_and_swap below is a little unusual because the // result is compared to a value that can be different than the comparand argument. if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, snapshot )==SNAPSHOT_EMPTY ) { if( snapshot!=SNAPSHOT_EMPTY ) { - // This thread read "busy" into snapshot, and then another thread transitioned - // my_pool_state to "empty" in the meantime, which caused the compare_and_swap above + // This thread read "busy" into snapshot, and then another thread transitioned + // my_pool_state to "empty" in the meantime, which caused the compare_and_swap above // to fail. Attempt to transition my_pool_state from "empty" to "full". if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, SNAPSHOT_EMPTY )!=SNAPSHOT_EMPTY ) { // Some other thread transitioned my_pool_state from "empty", and hence became @@ -364,19 +429,31 @@ template void arena::advertise_new_work() { } // This thread transitioned pool from empty to full state, and thus is responsible for // telling RML that there is work to do. - if( Spawned ) { - if( my_mandatory_concurrency ) { - __TBB_ASSERT(my_max_num_workers==1, ""); - __TBB_ASSERT(!governor::local_scheduler()->is_worker(), ""); - // There was deliberate oversubscription on 1 core for sake of starvation-resistant tasks. - // Now a single active thread (must be the master) supposedly starts a new parallel region - // with relaxed sequential semantics, and oversubscription should be avoided. - // Demand for workers has been decreased to 0 during SNAPSHOT_EMPTY, so just keep it. - my_max_num_workers = 0; - my_mandatory_concurrency = false; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if( work_type == work_spawned ) { + if( my_mandatory_mode!=no_mandatory ) { + switch( my_mandatory_mode ) { + case local_mandatory: + __TBB_ASSERT(my_max_num_workers==1, ""); + __TBB_ASSERT(!governor::local_scheduler()->is_worker(), ""); + // There was deliberate oversubscription on 1 core for sake of starvation-resistant tasks. + // Now a single active thread (must be the master) supposedly starts a new parallel region + // with relaxed sequential semantics, and oversubscription should be avoided. + // Demand for workers has been decreased to 0 during SNAPSHOT_EMPTY, so just keep it. + my_max_num_workers = 0; + my_mandatory_mode = no_mandatory; + break; + case global_mandatory: + my_market->mandatory_concurrency_disable( this ); + restore_priorities_if_need(); + break; + default: + break; + } return; } } +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ my_market->adjust_demand( *this, my_max_num_workers ); } } diff --git a/src/tbb/cache_aligned_allocator.cpp b/src/tbb/cache_aligned_allocator.cpp index 79343f5e2bb14e426bb8be49e2961442eadfd627..148ed659e6f7dbfdfb3b61b2eb4593c1047d920b 100644 --- a/src/tbb/cache_aligned_allocator.cpp +++ b/src/tbb/cache_aligned_allocator.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/cilk-tbb-interop.h b/src/tbb/cilk-tbb-interop.h index 5ac8453ef57aaf87bf73a8ce3c9c2946465be054..9c3f2112225b1eeb751d170845eefc45946430b9 100644 --- a/src/tbb/cilk-tbb-interop.h +++ b/src/tbb/cilk-tbb-interop.h @@ -1,5 +1,5 @@ /* - 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 @@ -18,7 +18,7 @@ reasons why the executable file might be covered by the GNU General Public License. */ -/* The API to enable interoperability between Intel(R) Cilk(TM) Plus and +/* The API to enable interoperability between Intel(R) Cilk(TM) Plus and Intel(R) Threading Building Blocks. */ #ifndef CILK_TBB_INTEROP_H @@ -71,7 +71,7 @@ typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_unwatch_stacks)(void *data); The thunk must be invoked on the thread doing the releasing, Must "happen before" the stack is used elsewhere. - When a non-empty stack is transferred between threads, the first thread must orphan it + When a non-empty stack is transferred between threads, the first thread must orphan it and the second thread must adopt it. An empty stack can be transferred similarly, or simply released by the first thread. @@ -85,7 +85,7 @@ typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_unwatch_stacks)(void *data); | \ / \ / | | --<-- --<-- | ^ RELEASE or ADOPT V - \ unwatch / + \ unwatch / \ / --------------------------<--------------------------- RELEASE @@ -98,11 +98,11 @@ struct __cilk_tbb_stack_op_thunk { /* Thunk invoked by TBB when it is no longer interested in watching the stack bound to the current thread. */ struct __cilk_tbb_unwatch_thunk { __cilk_tbb_pfn_unwatch_stacks routine; - void* data; + void* data; }; /* Defined by cilkrts, called by TBB. - Requests that cilkrts invoke __cilk_tbb_stack_op_thunk when it orphans a stack. + Requests that cilkrts invoke __cilk_tbb_stack_op_thunk when it orphans a stack. cilkrts sets *u to a thunk that TBB should call when it is no longer interested in watching the stack. */ CILK_EXPORT __cilk_tbb_retcode __cilkrts_watch_stack(struct __cilk_tbb_unwatch_thunk* u, diff --git a/src/tbb/concurrent_hash_map.cpp b/src/tbb/concurrent_hash_map.cpp index 2ca8833288c45a9c67352de04e9bccacc6244834..4b1edfa1af4c81d32a0b42f77287288569677d34 100644 --- a/src/tbb/concurrent_hash_map.cpp +++ b/src/tbb/concurrent_hash_map.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -45,7 +45,7 @@ struct hash_map_segment_base { }; bool hash_map_segment_base::internal_grow_predicate() const { - // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the + // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the // library so that Intel(R) Thread Checker will ignore them. The reads are used in a double-check // context, so the program is nonetheless correct despite the race. return my_logical_size >= my_physical_size && my_physical_size < max_physical_size; diff --git a/src/tbb/concurrent_monitor.cpp b/src/tbb/concurrent_monitor.cpp index f185d92e6ab353c92755b592adb21d137f2fe175..42c6f51c344e8c632bbd453db22539553ff33d98 100644 --- a/src/tbb/concurrent_monitor.cpp +++ b/src/tbb/concurrent_monitor.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/concurrent_monitor.h b/src/tbb/concurrent_monitor.h index 32afe3d1605063053a955215f4800080eb567d40..4937a0fcb48f4082e12c1a2939611982597ced0c 100644 --- a/src/tbb/concurrent_monitor.h +++ b/src/tbb/concurrent_monitor.h @@ -1,5 +1,5 @@ /* - 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 @@ -129,7 +129,7 @@ public: concurrent_monitor() {__TBB_store_relaxed(epoch, 0);} //! dtor - ~concurrent_monitor() ; + ~concurrent_monitor() ; //! prepare wait by inserting 'thr' into the wait queue void prepare_wait( thread_context& thr, uintptr_t ctx = 0 ); @@ -177,7 +177,7 @@ public: //! Abort any sleeping threads at the time of the call void abort_all() {atomic_fence(); abort_all_relaxed(); } - + //! Abort any sleeping threads at the time of the call; Relaxed version void abort_all_relaxed(); diff --git a/src/tbb/concurrent_queue.cpp b/src/tbb/concurrent_queue.cpp index a380d9f9bb54c93659dc5695bebb5e935041994f..a24461468a436e041453898ba629008e8f38110c 100644 --- a/src/tbb/concurrent_queue.cpp +++ b/src/tbb/concurrent_queue.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -168,7 +168,7 @@ public: #pragma warning( disable: 4146 ) #endif -static void* invalid_page; +static void* static_invalid_page; //------------------------------------------------------------------------ // micro_queue @@ -328,15 +328,15 @@ void micro_queue::make_invalid( ticket k ) { static concurrent_queue_base::page dummy = {static_cast((void*)1), 0}; // mark it so that no more pushes are allowed. - invalid_page = &dummy; + static_invalid_page = &dummy; { spin_mutex::scoped_lock lock( page_mutex ); tail_counter = k+concurrent_queue_rep::n_queue+1; if( page* q = tail_page ) - q->next = static_cast(invalid_page); + q->next = static_cast(static_invalid_page); else - head_page = static_cast(invalid_page); - tail_page = static_cast(invalid_page); + head_page = static_cast(static_invalid_page); + tail_page = static_cast(static_invalid_page); } __TBB_RETHROW(); } @@ -540,7 +540,7 @@ void concurrent_queue_base_v3::internal_finish_clear() { page* tp = my_rep->array[i].tail_page; __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" ); if( tp!=NULL) { - if( tp!=invalid_page ) deallocate_page( tp ); + if( tp!=static_invalid_page ) deallocate_page( tp ); my_rep->array[i].tail_page = NULL; } } diff --git a/src/tbb/concurrent_vector.cpp b/src/tbb/concurrent_vector.cpp index 4c03e781e9f6bca44c039a402a23d51f702170e9..09108e1977057325eed42a36ce31c621858ca164 100644 --- a/src/tbb/concurrent_vector.cpp +++ b/src/tbb/concurrent_vector.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/condition_variable.cpp b/src/tbb/condition_variable.cpp index 70a0ec36b4ece7e3969450f54410afb200b7350d..6b0599c4882968c7bb2bdea49e5825dc6d5b4be9 100644 --- a/src/tbb/condition_variable.cpp +++ b/src/tbb/condition_variable.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/critical_section.cpp b/src/tbb/critical_section.cpp index 9d4fd9152eb6937c196d6fc8b07018043ee172f2..88f8263321c5491bc0eb4ccba0eea00df07b4de1 100644 --- a/src/tbb/critical_section.cpp +++ b/src/tbb/critical_section.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/custom_scheduler.h b/src/tbb/custom_scheduler.h index e6e6505707eddcad58355f8012000c0b15aac7f9..7e1b24140ec5e6493e4bae87631c1443f294263d 100644 --- a/src/tbb/custom_scheduler.h +++ b/src/tbb/custom_scheduler.h @@ -1,5 +1,5 @@ /* - 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 @@ -174,7 +174,11 @@ task* custom_scheduler::receive_or_steal_task( __TBB_atomic ref break; // exit stealing loop and return; } // Check if the resource manager requires our arena to relinquish some threads - if ( outermost_worker_level && my_arena->my_num_workers_allotted < my_arena->num_workers_active() ) { + if ( outermost_worker_level && (my_arena->my_num_workers_allotted < my_arena->num_workers_active() +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + || my_arena->recall_by_mandatory_request() +#endif + ) ) { #if !__TBB_TASK_ARENA __TBB_ASSERT( is_worker(), NULL ); #endif @@ -438,7 +442,7 @@ void custom_scheduler::local_wait_for_all( task& parent, task* else { // Mark arena as full to unlock arena priority level adjustment // by arena::is_out_of_work(), and ensure worker's presence. - my_arena->advertise_new_work(); + my_arena->advertise_new_work(); } goto stealing_ground; } diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp index b979e9c2ff24e25c85fa049f2e708f3c7e8bf73e..edb7f1702a01d232214f23afee6a44199e075202 100644 --- a/src/tbb/dynamic_link.cpp +++ b/src/tbb/dynamic_link.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/dynamic_link.h b/src/tbb/dynamic_link.h index 526e9233637cce54c376317fed5eb2ca88ac71d8..23721381c9a9cf5003a5c9728645e6b4ea7957ab 100644 --- a/src/tbb/dynamic_link.h +++ b/src/tbb/dynamic_link.h @@ -1,5 +1,5 @@ /* - 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 @@ -55,7 +55,7 @@ typedef void (*pointer_to_handler)(); // prevent warnings from some compilers (g++ 4.1) #if __TBB_WEAK_SYMBOLS_PRESENT #define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h), (pointer_to_handler)&s} -#else +#else #define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h)} #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ //! Association between a handler name and location of pointer to it. diff --git a/src/tbb/governor.cpp b/src/tbb/governor.cpp index 50710a66a3b32594b79498e0dcf5c60c97f5392d..5ffcc1744d6dad2a3b9f1288e159546a9f4a423d 100644 --- a/src/tbb/governor.cpp +++ b/src/tbb/governor.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -81,6 +81,7 @@ void governor::acquire_resources () { void governor::release_resources () { theRMLServerFactory.close(); + destroy_process_mask(); #if TBB_USE_ASSERT if( __TBB_InitOnce::initialization_done() && theTLS.get() ) runtime_warning( "TBB is unloaded while tbb::task_scheduler_init object is alive?" ); @@ -186,7 +187,7 @@ generic_scheduler* governor::init_scheduler( int num_threads, stack_size_type st __TBB_ASSERT( s->my_ref_count == 1, "weakly initialized scheduler must have refcount equal to 1" ); __TBB_ASSERT( !s->my_arena, "weakly initialized scheduler must have no arena" ); __TBB_ASSERT( s->my_auto_initialized, "weakly initialized scheduler is supposed to be auto-initialized" ); - s->attach_arena( market::create_arena( default_num_threads(), 1, 0, true ), 0, /*is_master*/true ); + s->attach_arena( market::create_arena( default_num_threads(), 1, 0 ), 0, /*is_master*/true ); __TBB_ASSERT( s->my_arena_index == 0, "Master thread must occupy the first slot in its arena" ); s->my_arena_slot->my_scheduler = s; s->my_arena->my_default_ctx = s->default_context(); // it also transfers implied ownership @@ -199,10 +200,9 @@ generic_scheduler* governor::init_scheduler( int num_threads, stack_size_type st return s; } // Create new scheduler instance with arena - bool default_concurrency_requested = num_threads == task_scheduler_init::automatic; - if( default_concurrency_requested ) + if( num_threads == task_scheduler_init::automatic ) num_threads = default_num_threads(); - arena *a = market::create_arena( num_threads, 1, stack_size, default_concurrency_requested ); + arena *a = market::create_arena( num_threads, 1, stack_size ); generic_scheduler* s = generic_scheduler::create_master( a ); __TBB_ASSERT(s, "Somehow a local scheduler creation for a master thread failed"); __TBB_ASSERT( is_set(s), NULL ); @@ -264,7 +264,7 @@ void governor::print_version_info () { } void governor::initialize_rml_factory () { - ::rml::factory::status_type res = theRMLServerFactory.open(); + ::rml::factory::status_type res = theRMLServerFactory.open(); UsePrivateRML = res != ::rml::factory::st_success; } @@ -285,10 +285,10 @@ __cilk_tbb_retcode governor::stack_op_handler( __cilk_tbb_stack_op op, void* dat default: __TBB_ASSERT( 0, "invalid op" ); case CILK_TBB_STACK_ADOPT: { - __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || + __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid adoption" ); #if TBB_USE_ASSERT - if( current==s ) + if( current==s ) runtime_warning( "redundant adoption of %p by thread %p\n", s, (void*)thread_id ); s->my_cilk_state = generic_scheduler::cs_running; #endif /* TBB_USE_ASSERT */ @@ -296,7 +296,7 @@ __cilk_tbb_retcode governor::stack_op_handler( __cilk_tbb_stack_op op, void* dat break; } case CILK_TBB_STACK_ORPHAN: { - __TBB_ASSERT( current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid orphaning" ); + __TBB_ASSERT( current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid orphaning" ); #if TBB_USE_ASSERT s->my_cilk_state = generic_scheduler::cs_limbo; #endif /* TBB_USE_ASSERT */ @@ -304,14 +304,14 @@ __cilk_tbb_retcode governor::stack_op_handler( __cilk_tbb_stack_op op, void* dat break; } case CILK_TBB_STACK_RELEASE: { - __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || + __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid release" ); #if TBB_USE_ASSERT s->my_cilk_state = generic_scheduler::cs_freed; #endif /* TBB_USE_ASSERT */ s->my_cilk_unwatch_thunk.routine = NULL; auto_terminate( s ); - } + } } return 0; } @@ -355,7 +355,7 @@ void task_scheduler_init::initialize( int number_of_threads, stack_size_type thr : new_mode & propagation_mode_captured ? vt & ~task_group_context::exact_exception : vt; // Use least significant bit of the scheduler pointer to store previous mode. // This is necessary when components compiled with different compilers and/or - // TBB versions initialize the + // TBB versions initialize the my_scheduler = static_cast((generic_scheduler*)((uintptr_t)s | prev_mode)); } else diff --git a/src/tbb/governor.h b/src/tbb/governor.h index e45805f07fc5276b4c87a39550a5742a66537288..728271e120d80722e8d8212535bc6aec70770a69 100644 --- a/src/tbb/governor.h +++ b/src/tbb/governor.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/ia32-masm/atomic_support.asm b/src/tbb/ia32-masm/atomic_support.asm index 5b2bcbac5953a72f41ec6dfc0b5408cc065174d0..cf3e27433d7d968c33bfcdedb181be505790c02d 100644 --- a/src/tbb/ia32-masm/atomic_support.asm +++ b/src/tbb/ia32-masm/atomic_support.asm @@ -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 diff --git a/src/tbb/ia32-masm/itsx.asm b/src/tbb/ia32-masm/itsx.asm index 58c999bcaf77a338149acfb861786c71417251a3..3841de3f7cb6ddce7af1d8fc26f4b108c67c352a 100644 --- a/src/tbb/ia32-masm/itsx.asm +++ b/src/tbb/ia32-masm/itsx.asm @@ -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 diff --git a/src/tbb/ia32-masm/lock_byte.asm b/src/tbb/ia32-masm/lock_byte.asm index c96fe5b5a83336c4a242baca010483f4d8c7d4e4..bcccc92fb8873362b265ddadd9ce8a0d541933a9 100644 --- a/src/tbb/ia32-masm/lock_byte.asm +++ b/src/tbb/ia32-masm/lock_byte.asm @@ -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 diff --git a/src/tbb/ia64-gas/atomic_support.s b/src/tbb/ia64-gas/atomic_support.s index 9b3af7d91d6240cec9c4b719597c1d898070e867..6b6dc661f132689620f770438c200bf6d32691e3 100644 --- a/src/tbb/ia64-gas/atomic_support.s +++ b/src/tbb/ia64-gas/atomic_support.s @@ -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 diff --git a/src/tbb/ia64-gas/ia64_misc.s b/src/tbb/ia64-gas/ia64_misc.s index 839536dfc9350d5365c4e70f1b73a351e1710b11..7623e88a024c39be6dbab40b062a523aa839bc04 100644 --- a/src/tbb/ia64-gas/ia64_misc.s +++ b/src/tbb/ia64-gas/ia64_misc.s @@ -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 diff --git a/src/tbb/ia64-gas/lock_byte.s b/src/tbb/ia64-gas/lock_byte.s index 19b223447b7a210649fe0e1c98c0c913daa04614..ac715b9feb78cf6f32ed6ebd73cf1f5dc88d4700 100644 --- a/src/tbb/ia64-gas/lock_byte.s +++ b/src/tbb/ia64-gas/lock_byte.s @@ -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 diff --git a/src/tbb/ia64-gas/log2.s b/src/tbb/ia64-gas/log2.s index 4acac8ede385ecea0427d7c4513b998ce70f23d9..c86c83414f0d19d0c87dd5436fc4037d25fdefa3 100644 --- a/src/tbb/ia64-gas/log2.s +++ b/src/tbb/ia64-gas/log2.s @@ -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 diff --git a/src/tbb/ia64-gas/pause.s b/src/tbb/ia64-gas/pause.s index 5296d7f3b3057da065910e68ff1b7a90a6aaaecf..2312d39b65734c064b6fde34852a5247b5b58c50 100644 --- a/src/tbb/ia64-gas/pause.s +++ b/src/tbb/ia64-gas/pause.s @@ -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 diff --git a/src/tbb/ibm_aix51/atomic_support.c b/src/tbb/ibm_aix51/atomic_support.c index 10700e20843c83f285b25e35ce01777a3581f023..138b312e9d350ea967dc46a6c909bed9ec565389 100644 --- a/src/tbb/ibm_aix51/atomic_support.c +++ b/src/tbb/ibm_aix51/atomic_support.c @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/index.html b/src/tbb/index.html index c559d6ba7232622f45b97dfdd107bfbf9119e06e..d85d1daa58a2516fe5a5fc20024b41a026f72d30 100644 --- a/src/tbb/index.html +++ b/src/tbb/index.html @@ -21,7 +21,7 @@ This directory contains the source code of the TBB core components.
    Up to parent directory

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/tbb/intel64-masm/atomic_support.asm b/src/tbb/intel64-masm/atomic_support.asm index e19dafba5321fa3f274557210f37a0d7d7542c37..9e04310d57c4de7e56e031c3c55f9367e561eddb 100644 --- a/src/tbb/intel64-masm/atomic_support.asm +++ b/src/tbb/intel64-masm/atomic_support.asm @@ -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 diff --git a/src/tbb/intel64-masm/intel64_misc.asm b/src/tbb/intel64-masm/intel64_misc.asm index 0712bfd50495e7a668c85ca9c513642a1eeb7923..94f658981bd3594bd68bcb69fa69138e65a45350 100644 --- a/src/tbb/intel64-masm/intel64_misc.asm +++ b/src/tbb/intel64-masm/intel64_misc.asm @@ -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 diff --git a/src/tbb/intel64-masm/itsx.asm b/src/tbb/intel64-masm/itsx.asm index c20cff25607d2e78861ee213f01c0e32f2b3efd4..b954f8688078d8a742784cba0004feb6cbf6adea 100644 --- a/src/tbb/intel64-masm/itsx.asm +++ b/src/tbb/intel64-masm/itsx.asm @@ -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 diff --git a/src/tbb/intrusive_list.h b/src/tbb/intrusive_list.h index f131c8e2d9bf51eb8ce1339e558b29e6a9585fba..3a6c567a1dd5f9a41a241c995077ca06acaf62ce 100644 --- a/src/tbb/intrusive_list.h +++ b/src/tbb/intrusive_list.h @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ namespace internal { //! Data structure to be inherited by the types that can form intrusive lists. /** Intrusive list is formed by means of the member_intrusive_list template class. - Note that type T must derive from intrusive_list_node either publicly or + Note that type T must derive from intrusive_list_node either publicly or declare instantiation member_intrusive_list as a friend. This class implements a limited subset of std::list interface. **/ struct intrusive_list_node { @@ -112,7 +112,7 @@ class intrusive_list_base { }; // intrusive_list_base::iterator_impl void assert_ok () const { - __TBB_ASSERT( (my_head.my_prev_node == &my_head && !my_size) || + __TBB_ASSERT( (my_head.my_prev_node == &my_head && !my_size) || (my_head.my_next_node != &my_head && my_size >0), "intrusive_list_base corrupted" ); #if TBB_USE_ASSERT >= 2 size_t i = 0; @@ -167,9 +167,9 @@ public: const_iterator end () const { return const_iterator(&my_head); } void push_front ( T& val ) { - __TBB_ASSERT( node(val).my_prev_node == &node(val) && node(val).my_next_node == &node(val), + __TBB_ASSERT( node(val).my_prev_node == &node(val) && node(val).my_next_node == &node(val), "Object with intrusive list node can be part of only one intrusive list simultaneously" ); - // An object can be part of only one intrusive list at the given moment via the given node member + // An object can be part of only one intrusive list at the given moment via the given node member node(val).my_prev_node = &my_head; node(val).my_next_node = my_head.my_next_node; my_head.my_next_node->my_prev_node = &node(val); @@ -201,11 +201,11 @@ public: //! Double linked list of items of type T containing a member of type intrusive_list_node. -/** NodePtr is a member pointer to the node data field. Class U is either T or +/** NodePtr is a member pointer to the node data field. Class U is either T or a base class of T containing the node member. Default values exist for the sake of a partial specialization working with inheritance case. - The list does not have ownership of its items. Its purpose is to avoid dynamic + The list does not have ownership of its items. Its purpose is to avoid dynamic memory allocation when forming lists of existing objects. The class is not thread safe. **/ @@ -217,16 +217,16 @@ class memptr_intrusive_list : public intrusive_list_base" and "*" - // as member pointer dereferencing operator, and explicit usage of ## in + // as member pointer dereferencing operator, and explicit usage of ## in // __TBB_offsetof implementation breaks operations with normal member names. return *reinterpret_cast((char*)node - ((ptrdiff_t)&(reinterpret_cast(0x1000)->*NodePtr) - 0x1000)); } }; // intrusive_list //! Double linked list of items of type T that is derived from intrusive_list_node class. -/** The list does not have ownership of its items. Its purpose is to avoid dynamic +/** The list does not have ownership of its items. Its purpose is to avoid dynamic memory allocation when forming lists of existing objects. The class is not thread safe. **/ diff --git a/src/tbb/itt_notify.cpp b/src/tbb/itt_notify.cpp index ca34fe3f0e73eaf128dc195418b91fc92eabc608..82d052465bc20577b986893874ff2a25b7dc1229 100644 --- a/src/tbb/itt_notify.cpp +++ b/src/tbb/itt_notify.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -69,11 +69,11 @@ int __TBB_load_ittnotify() { namespace tbb { #if DO_ITT_NOTIFY - const tchar + const tchar *SyncType_GlobalLock = _T("TbbGlobalLock"), *SyncType_Scheduler = _T("%Constant") ; - const tchar + const tchar *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"), *SyncObj_SchedulersList = _T("TbbSchedulersList"), *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"), diff --git a/src/tbb/itt_notify.h b/src/tbb/itt_notify.h index ca8439408a44c27d18443ffbc8a52bb2aedd69bd..1d6a64e2bcfca7a4e5f0522e2769e187452174a4 100644 --- a/src/tbb/itt_notify.h +++ b/src/tbb/itt_notify.h @@ -1,5 +1,5 @@ /* - 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 @@ -58,7 +58,7 @@ namespace tbb { //! Unicode character type. Always wchar_t on Windows. /** We do not use typedefs from Windows TCHAR family to keep consistence of TBB coding style. **/ typedef wchar_t tchar; - //! Standard Windows macro to markup the string literals. + //! Standard Windows macro to markup the string literals. #define _T(string_literal) L ## string_literal #else /* !WIN */ typedef char tchar; @@ -70,11 +70,11 @@ namespace tbb { #if DO_ITT_NOTIFY namespace tbb { //! Display names of internal synchronization types - extern const tchar + extern const tchar *SyncType_GlobalLock, *SyncType_Scheduler; //! Display names of internal synchronization components/scenarios - extern const tchar + extern const tchar *SyncObj_SchedulerInitialization, *SyncObj_SchedulersList, *SyncObj_WorkerLifeCycleMgmt, @@ -89,7 +89,7 @@ namespace tbb { ; namespace internal { - void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name); + void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name); } // namespace internal diff --git a/src/tbb/lin32-tbb-export.def b/src/tbb/lin32-tbb-export.def index a083e3042deb3e6f8d02898a723160b352858a53..5184b8b56a320d92ac2a3174be29783808ebd548 100644 --- a/src/tbb/lin32-tbb-export.def +++ b/src/tbb/lin32-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/lin32-tbb-export.lst b/src/tbb/lin32-tbb-export.lst index a8a07b3bbd8ab7def52ced16516dc9fcfcbc4f42..9bbc8ea1b0df5b3abc6062a8fd1a257c6958adbd 100644 --- a/src/tbb/lin32-tbb-export.lst +++ b/src/tbb/lin32-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/lin64-tbb-export.def b/src/tbb/lin64-tbb-export.def index ea58c90d4561e28f707ced491811421785089b1b..2bcfbae65e3a1ab079c86e5fd1774386c4af48c8 100644 --- a/src/tbb/lin64-tbb-export.def +++ b/src/tbb/lin64-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/lin64-tbb-export.lst b/src/tbb/lin64-tbb-export.lst index 4a2a1ea6c2caddfda9e17f2e3d424ae5d6c069d2..7906d79587e0c67932990c4c8c2466b5451de776 100644 --- a/src/tbb/lin64-tbb-export.lst +++ b/src/tbb/lin64-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/lin64ipf-tbb-export.def b/src/tbb/lin64ipf-tbb-export.def index 71441cd0253177f20be2d5a625501e2dc6569104..cdd7546fc700872f4cd20482c0de222a23ec3895 100644 --- a/src/tbb/lin64ipf-tbb-export.def +++ b/src/tbb/lin64ipf-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/lin64ipf-tbb-export.lst b/src/tbb/lin64ipf-tbb-export.lst index 14145d1a22a2643a5adeebf7d8bcc16535c4af37..c30f169a68f58a49a003a233a361ff40c171bc17 100644 --- a/src/tbb/lin64ipf-tbb-export.lst +++ b/src/tbb/lin64ipf-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/mac32-tbb-export.def b/src/tbb/mac32-tbb-export.def index ed53e795edd56ab9907a479692cd6d61f30c7245..01b3952e4d29e2bb9f4f47c86846822d007865ff 100644 --- a/src/tbb/mac32-tbb-export.def +++ b/src/tbb/mac32-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/mac32-tbb-export.lst b/src/tbb/mac32-tbb-export.lst index a6980ba3a9564c474d7cd60982381864b315cfe3..516e3147d24746ed52cbf6c4a876fe25e8dd2f4e 100644 --- a/src/tbb/mac32-tbb-export.lst +++ b/src/tbb/mac32-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/mac64-tbb-export.def b/src/tbb/mac64-tbb-export.def index 71e8f5e562a6e1e5115cda923205595ff1babada..9b36e048205f99494fcc8e0d9cee87fc4bc57639 100644 --- a/src/tbb/mac64-tbb-export.def +++ b/src/tbb/mac64-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/mac64-tbb-export.lst b/src/tbb/mac64-tbb-export.lst index 068cbc3b05211080160e970f913a7b89921c1b7f..baa31f54ad3c4e24d99dd1ace11d1d02b9f178ac 100644 --- a/src/tbb/mac64-tbb-export.lst +++ b/src/tbb/mac64-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/mailbox.h b/src/tbb/mailbox.h index 47f40f50f01e10c4eda0fad24be73fdb99c94969..89400560e856d90aefde037c8a2bb2d473813754 100644 --- a/src/tbb/mailbox.h +++ b/src/tbb/mailbox.h @@ -1,5 +1,5 @@ /* - 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 @@ -88,7 +88,7 @@ class unpadded_mail_outbox { protected: typedef task_proxy*__TBB_atomic proxy_ptr; - //! Pointer to first task_proxy in mailbox, or NULL if box is empty. + //! Pointer to first task_proxy in mailbox, or NULL if box is empty. proxy_ptr my_first; //! Pointer to pointer that will point to next item in the queue. Never NULL. @@ -135,9 +135,9 @@ public: /** Implementation is wait-free. */ void push( task_proxy& t ) { __TBB_ASSERT(&t, NULL); - t.next_in_mailbox = NULL; + t.next_in_mailbox = NULL; proxy_ptr * const link = (proxy_ptr *)__TBB_FetchAndStoreW(&my_last,(intptr_t)&t.next_in_mailbox); - // No release fence required for the next store, because there are no memory operations + // No release fence required for the next store, because there are no memory operations // between the previous fully fenced atomic operation and the store. __TBB_store_relaxed(*link, &t); } @@ -160,7 +160,7 @@ public: suppress_unused_warning(pad); } - //! Drain the mailbox + //! Drain the mailbox intptr_t drain() { intptr_t k = 0; // No fences here because other threads have already quit. @@ -168,7 +168,7 @@ public: my_first = t->next_in_mailbox; NFS_Free((char*)t - task_prefix_reservation_size); } - return k; + return k; } //! True if thread that owns this mailbox is looking for work. @@ -185,7 +185,7 @@ public: //! Construct unattached inbox mail_inbox() : my_putter(NULL) {} - //! Attach inbox to a corresponding outbox. + //! Attach inbox to a corresponding outbox. void attach( mail_outbox& putter ) { my_putter = &putter; } @@ -218,7 +218,7 @@ public: #if DO_ITT_NOTIFY //! Get pointer to corresponding outbox used for ITT_NOTIFY calls. void* outbox() const {return my_putter;} -#endif /* DO_ITT_NOTIFY */ +#endif /* DO_ITT_NOTIFY */ }; // class mail_inbox } // namespace internal diff --git a/src/tbb/market.cpp b/src/tbb/market.cpp index 4d77960e3114ba5c0eaefd74a11362c427b36abb..7eadfefc1be8b26df8f1b363e64d3f24a16918af 100644 --- a/src/tbb/market.cpp +++ b/src/tbb/market.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -74,13 +74,14 @@ market::market ( unsigned workers_soft_limit, unsigned workers_hard_limit, size_ #endif /* __TBB_TASK_PRIORITY */ , my_ref_count(1) , my_stack_size(stack_size) + , my_workers_soft_limit_to_report(workers_soft_limit) { #if __TBB_TASK_PRIORITY __TBB_ASSERT( my_global_reload_epoch == 0, NULL ); my_priority_levels[normalized_normal_priority].workers_available = my_num_workers_soft_limit; #endif /* __TBB_TASK_PRIORITY */ - // Once created RML server will start initializing workers that will need + // Once created RML server will start initializing workers that will need // global market instance to get worker stack size my_server = governor::create_rml_server( *this ); __TBB_ASSERT( my_server, "Failed to create RML server" ); @@ -91,30 +92,38 @@ static unsigned calc_workers_soft_limit(unsigned workers_soft_limit, unsigned wo workers_soft_limit = soft_limit-1; else // if user set no limits (yet), use market's parameter workers_soft_limit = max( governor::default_num_threads() - 1, workers_soft_limit ); - // at least 1 worker is required to support starvation resistant tasks - if( workers_soft_limit == 0 ) - workers_soft_limit = 1; - else if( workers_soft_limit >= workers_hard_limit ) + if( workers_soft_limit >= workers_hard_limit ) workers_soft_limit = workers_hard_limit-1; return workers_soft_limit; } -market& market::global_market ( bool is_public, unsigned workers_soft_limit, size_t stack_size, - bool default_concurrency_requested ) { +market& market::global_market ( bool is_public, unsigned workers_requested, size_t stack_size ) { global_market_mutex_type::scoped_lock lock( theMarketMutex ); market *m = theMarket; if( m ) { ++m->my_ref_count; const unsigned old_public_count = is_public? m->my_public_ref_count++ : /*any non-zero value*/1; lock.release(); - if( old_public_count==0 ) { - workers_soft_limit = calc_workers_soft_limit(workers_soft_limit, m->my_num_workers_hard_limit); - set_active_num_workers( workers_soft_limit ); + if( old_public_count==0 ) + set_active_num_workers( calc_workers_soft_limit(workers_requested, m->my_num_workers_hard_limit) ); + + // do not warn if default number of workers is requested + if( workers_requested != governor::default_num_threads()-1 ) { + __TBB_ASSERT( skip_soft_limit_warning > workers_requested, + "skip_soft_limit_warning must be larger than any valid workers_requested" ); + unsigned soft_limit_to_report = m->my_workers_soft_limit_to_report; + if( soft_limit_to_report < workers_requested ) { + runtime_warning( "The number of workers is currently limited to %u. " + "The request for %u workers is ignored. Further requests for more workers " + "will be silently ignored until the limit changes.\n", + soft_limit_to_report, workers_requested ); + // The race is possible when multiple threads report warnings. + // We are OK with that, as there are just multiple warnings. + internal::as_atomic(m->my_workers_soft_limit_to_report). + compare_and_swap(skip_soft_limit_warning, soft_limit_to_report); + } + } - if( m->my_num_workers_soft_limit < workers_soft_limit && !default_concurrency_requested ) - runtime_warning( "Max number of workers has been already set to %u. " - "The request for %u workers is ignored.\n", - m->my_num_workers_soft_limit, workers_soft_limit ); if( m->my_stack_size < stack_size ) runtime_warning( "Thread stack size has been already set to %u. " "The request for larger stack (%u) cannot be satisfied.\n", @@ -128,8 +137,8 @@ market& market::global_market ( bool is_public, unsigned workers_soft_limit, siz // Limit to 2P for large thread number. // TODO: ask RML for max concurrency and possibly correct hard_limit const unsigned factor = governor::default_num_threads()<=128? 4 : 2; - unsigned workers_hard_limit = max(factor*governor::default_num_threads(), app_parallelism_limit()); - workers_soft_limit = calc_workers_soft_limit(workers_soft_limit, workers_hard_limit); + const unsigned workers_hard_limit = max(factor*governor::default_num_threads(), app_parallelism_limit()); + const unsigned workers_soft_limit = calc_workers_soft_limit(workers_requested, workers_hard_limit); // Create the global market instance size_t size = sizeof(market); #if __TBB_TASK_GROUP_CONTEXT @@ -183,7 +192,7 @@ void market::release ( bool is_public ) { void market::wait_workers () { // usable for this kind of scheduler only - __TBB_ASSERT(join_workers, NULL); + __TBB_ASSERT(my_join_workers, NULL); // to guarantee that request_close_connection() is called by master, // wait till terminating last worker decresed my_ref_count while (__TBB_load_with_acquire(my_ref_count) > 1) @@ -192,11 +201,9 @@ void market::wait_workers () { } void market::set_active_num_workers ( unsigned soft_limit ) { - int old_requested, requested; + int old_requested=0, requested=0; + bool need_mandatory = false; market *m; - // at least 1 worker is required to support starvation resistant tasks - if( soft_limit == 0 ) - soft_limit = 1; { global_market_mutex_type::scoped_lock lock( theMarketMutex ); @@ -210,19 +217,61 @@ void market::set_active_num_workers ( unsigned soft_limit ) { arenas_list_mutex_type::scoped_lock lock(m->my_arenas_list_mutex); __TBB_ASSERT(soft_limit <= m->my_num_workers_hard_limit, NULL); m->my_num_workers_soft_limit = soft_limit; - requested = min(m->my_total_demand, (int)soft_limit); - old_requested = m->my_num_workers_requested; - m->my_num_workers_requested = requested; - m->my_priority_levels[m->my_global_top_priority].workers_available = soft_limit; - m->update_allotment( + // report only once after new soft limit value is set + m->my_workers_soft_limit_to_report = soft_limit; + +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + // updates soft_limit to zero must be postponed + // while mandatory parallelism is enabled + if( !(m->my_mandatory_num_requested && !soft_limit) ) +#endif + { + const int demand = +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + m->my_mandatory_num_requested? 0 : +#endif + m->my_total_demand; + requested = min(demand, (int)soft_limit); + old_requested = m->my_num_workers_requested; + m->my_num_workers_requested = requested; #if __TBB_TASK_PRIORITY - m->my_global_top_priority + m->my_priority_levels[m->my_global_top_priority].workers_available = soft_limit; + m->update_allotment(m->my_global_top_priority); +#else + m->update_allotment(); #endif - ); + } +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if( !m->my_mandatory_num_requested && !soft_limit ) { + // enable mandatory concurrency, if enqueued tasks are found + // and zero soft_limit requested +#if __TBB_TASK_PRIORITY + for ( int p = m->my_global_top_priority; + p >= m->my_global_bottom_priority; --p ) { + priority_level_info &pl = m->my_priority_levels[p]; + arena_list_type &arenas = pl.arenas; +#else + const int p = 0; + arena_list_type &arenas = m->my_arenas; +#endif /* __TBB_TASK_PRIORITY */ + for (arena_list_type::iterator it = arenas.begin(); + it != arenas.end(); ++it ) + if( !it->my_task_stream.empty(p) ) { + // switch local_mandatory to global_mandatory unconditionally + if( m->mandatory_concurrency_enable_impl( &*it ) ) + need_mandatory = true; + } +#if __TBB_TASK_PRIORITY + } +#endif /* __TBB_TASK_PRIORITY */ + } +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ } // Must be called outside of any locks if ( requested != old_requested ) m->my_server->adjust_job_count_estimate( requested - old_requested ); + if( need_mandatory ) + m->my_server->adjust_job_count_estimate( 1 ); // release internal market reference to match ++m->my_ref_count above m->release(); } @@ -231,12 +280,11 @@ bool governor::does_client_join_workers (const tbb::internal::rml::tbb_client &c return ((const market&)client).must_join_workers(); } -arena* market::create_arena ( int num_slots, int num_reserved_slots, size_t stack_size, bool default_concurrency_requested ) { +arena* market::create_arena ( int num_slots, int num_reserved_slots, size_t stack_size ) { __TBB_ASSERT( num_slots > 0, NULL ); __TBB_ASSERT( num_reserved_slots <= num_slots, NULL ); // Add public market reference for master thread/task_arena (that adds an internal reference in exchange). - market &m = global_market( /*is_public=*/true, num_slots-num_reserved_slots, stack_size, - default_concurrency_requested ); + market &m = global_market( /*is_public=*/true, num_slots-num_reserved_slots, stack_size ); arena& a = arena::allocate_arena( m, num_slots, num_reserved_slots ); // Add newly created arena into the existing market's list. @@ -255,13 +303,16 @@ void market::detach_arena ( arena& a ) { } void market::try_destroy_arena ( arena* a, uintptr_t aba_epoch ) { + bool locked = true; // master thread holds reference to the market, so it cannot be destroyed at any moment here __TBB_ASSERT( this == theMarket, NULL ); __TBB_ASSERT( a, NULL ); - arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + my_arenas_list_mutex.lock(); assert_market_valid(); #if __TBB_TASK_PRIORITY - for ( int p = my_global_top_priority; p >= my_global_bottom_priority; --p ) { + // scan all priority levels, not only in [my_global_bottom_priority;my_global_top_priority] + // range, because arena to be destoyed can have no outstanding request for workers + for ( int p = num_priority_levels-1; p >= 0; --p ) { priority_level_info &pl = my_priority_levels[p]; arena_list_type &my_arenas = pl.arenas; #endif /* __TBB_TASK_PRIORITY */ @@ -274,16 +325,20 @@ void market::try_destroy_arena ( arena* a, uintptr_t aba_epoch ) { __TBB_ASSERT( !a->my_num_workers_allotted && (a->my_pool_state == arena::SNAPSHOT_EMPTY || !a->my_max_num_workers), "Inconsistent arena state" ); // Arena is abandoned. Destroy it. detach_arena( *a ); - lock.release(); + my_arenas_list_mutex.unlock(); + locked = false; a->free_arena(); } } + if (locked) + my_arenas_list_mutex.unlock(); return; } } #if __TBB_TASK_PRIORITY } #endif /* __TBB_TASK_PRIORITY */ + my_arenas_list_mutex.unlock(); } /** This method must be invoked under my_arenas_list_mutex. **/ @@ -296,7 +351,11 @@ arena* market::arena_in_need ( arena_list_type &arenas, arena *&next ) { arena& a = *it; if ( ++it == arenas.end() ) it = arenas.begin(); - if ( a.num_workers_active() < a.my_num_workers_allotted ) { + if( a.num_workers_active() < a.my_num_workers_allotted +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + && !a.recall_by_mandatory_request() +#endif + ) { a.my_references += arena::ref_worker; as_atomic(next) = &*it; // a subject for innocent data race under the reader lock // TODO: rework global round robin policy to local or random to avoid this write @@ -325,6 +384,10 @@ void market::update_allotment ( arena_list_type& arenas, int workers_demand, int carry = tmp % workers_demand; // a.my_num_workers_requested may temporarily exceed a.my_max_num_workers a.my_num_workers_allotted = min( allotted, (int)a.my_max_num_workers ); +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if ( !a.my_num_workers_allotted && a.mandatory_requested() ) + a.my_num_workers_allotted = 1; +#endif #if TBB_USE_ASSERT assigned += a.my_num_workers_allotted; #endif /* TBB_USE_ASSERT */ @@ -336,7 +399,11 @@ void market::update_allotment ( arena_list_type& arenas, int workers_demand, int inline void market::update_global_top_priority ( intptr_t newPriority ) { GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.market_prio_switches ); my_global_top_priority = newPriority; - my_priority_levels[newPriority].workers_available = my_num_workers_soft_limit; + my_priority_levels[newPriority].workers_available = +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + my_mandatory_num_requested && !my_num_workers_soft_limit ? 1 : +#endif + my_num_workers_soft_limit; advance_global_reload_epoch(); } @@ -385,12 +452,107 @@ void market::update_allotment ( intptr_t highest_affected_priority ) { arena_list_type::iterator it = pl.arenas.begin(); for ( ; it != pl.arenas.end(); ++it ) { __TBB_ASSERT( it->my_num_workers_requested >= 0 || !it->my_num_workers_allotted, NULL ); - it->my_num_workers_allotted = 0; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + if ( it->mandatory_requested() ) + it->my_num_workers_allotted = 1; + else +#endif + it->my_num_workers_allotted = 0; } } } #endif /* __TBB_TASK_PRIORITY */ +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY +bool market::mandatory_concurrency_enable_impl ( arena *a, bool *enabled ) { + if( a->my_mandatory_mode==arena_base::global_mandatory ) { + if( enabled ) + *enabled = false; + return false; + } + if( enabled ) + *enabled = true; + a->my_max_num_workers = 1; + a->my_mandatory_mode = arena_base::global_mandatory; +#if __TBB_TASK_PRIORITY + priority_level_info &pl = my_priority_levels[a->my_top_priority]; + pl.workers_requested++; + if( my_global_top_priority < a->my_top_priority ) { + my_global_top_priority = a->my_top_priority; + advance_global_reload_epoch(); + } +#endif + a->my_num_workers_requested++; + a->my_num_workers_allotted++; + if( 1 == ++my_mandatory_num_requested ) { + my_total_demand++; + return true; + } + return false; +} + +bool market::mandatory_concurrency_enable ( arena *a ) { + bool add_thread; + bool enabled; + { + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + add_thread = mandatory_concurrency_enable_impl(a, &enabled); + } + if( add_thread ) + my_server->adjust_job_count_estimate( 1 ); + return enabled; +} + +void market::mandatory_concurrency_disable ( arena *a ) { + bool remove_thread = false; + int delta_adjust_demand = 0; + + { + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + + if( a->my_mandatory_mode!=arena_base::global_mandatory ) + return; + __TBB_ASSERT( a->my_max_num_workers==1, NULL ); + a->my_max_num_workers = 0; +#if __TBB_TASK_PRIORITY + if ( a->my_top_priority != normalized_normal_priority ) { + update_arena_top_priority( *a, normalized_normal_priority ); + } + a->my_bottom_priority = normalized_normal_priority; +#endif + + int val = --my_mandatory_num_requested; + __TBB_ASSERT_EX( val >= 0, NULL ); + if( val == 0 ) { + my_total_demand--; + remove_thread = true; + } + a->my_num_workers_requested--; + if (a->my_num_workers_requested > 0) + delta_adjust_demand = a->my_num_workers_requested; + else + a->my_num_workers_allotted = 0; + +#if __TBB_TASK_PRIORITY + priority_level_info &pl = my_priority_levels[a->my_top_priority]; + pl.workers_requested--; + intptr_t p = my_global_top_priority; + for (; !my_priority_levels[p].workers_requested && p>0; p--) + ; + if( !p ) + reset_global_priority(); + else if( p!= my_global_top_priority ) + update_global_top_priority(p); +#endif + a->my_mandatory_mode = arena::no_mandatory; + } + if( delta_adjust_demand ) + adjust_demand( *a, -delta_adjust_demand ); + if( remove_thread ) + my_server->adjust_job_count_estimate( -1 ); +} +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ + void market::adjust_demand ( arena& a, int delta ) { __TBB_ASSERT( theMarket, "market instance was destroyed prematurely?" ); if ( !delta ) @@ -399,7 +561,13 @@ void market::adjust_demand ( arena& a, int delta ) { int prev_req = a.my_num_workers_requested; a.my_num_workers_requested += delta; if ( a.my_num_workers_requested <= 0 ) { - a.my_num_workers_allotted = 0; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + // must not recall worker from arena with mandatory parallelism + if ( a.my_market->my_mandatory_num_requested && a.my_mandatory_mode!=arena_base::no_mandatory ) + a.my_num_workers_allotted = 1; + else +#endif + a.my_num_workers_allotted = 0; if ( prev_req <= 0 ) { my_arenas_list_mutex.unlock(); return; @@ -441,6 +609,12 @@ void market::adjust_demand ( arena& a, int delta ) { __TBB_ASSERT( a.my_num_workers_requested >= 0, NULL ); update_global_top_priority(p); a.my_num_workers_allotted = min( (int)my_num_workers_soft_limit, a.my_num_workers_requested ); +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + // must not recall worker from arena with mandatory parallelism + if ( !a.my_num_workers_allotted && a.my_num_workers_requested + && a.my_market->my_mandatory_num_requested && a.my_mandatory_mode!=arena_base::no_mandatory ) + a.my_num_workers_allotted = 1; +#endif my_priority_levels[p - 1].workers_available = my_num_workers_soft_limit - a.my_num_workers_allotted; update_allotment( p - 1 ); } @@ -457,7 +631,6 @@ void market::adjust_demand ( arena& a, int delta ) { update_allotment( p ); } else if ( p < my_global_bottom_priority ) { - __TBB_ASSERT( a.my_num_workers_requested > 0, NULL ); int prev_bottom = my_global_bottom_priority; my_global_bottom_priority = p; update_allotment( prev_bottom ); @@ -595,8 +768,7 @@ bool market::lower_arena_priority ( arena& a, intptr_t new_priority, uintptr_t o } if ( p == my_global_top_priority && !my_priority_levels[p].workers_requested ) { // Global top level became empty - for ( --p; !my_priority_levels[p].workers_requested; --p ) continue; - __TBB_ASSERT( p >= my_global_bottom_priority, NULL ); + for ( --p; p>my_global_bottom_priority && !my_priority_levels[p].workers_requested; --p ) continue; update_global_top_priority(p); } update_allotment( p ); @@ -651,12 +823,18 @@ bool market::update_arena_priority ( arena& a, intptr_t new_priority ) { } if ( p == my_global_bottom_priority ) { // Arena priority was increased from the global bottom level. - __TBB_ASSERT( p < new_priority, NULL ); // n + __TBB_ASSERT( p < new_priority, NULL ); __TBB_ASSERT( new_priority <= my_global_top_priority, NULL ); - while ( !my_priority_levels[my_global_bottom_priority].workers_requested ) + while ( my_global_bottom_priority < my_global_top_priority + && !my_priority_levels[my_global_bottom_priority].workers_requested ) ++my_global_bottom_priority; __TBB_ASSERT( my_global_bottom_priority <= new_priority, NULL ); - __TBB_ASSERT( my_priority_levels[my_global_bottom_priority].workers_requested > 0, NULL ); +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + const bool active_mandatory = my_mandatory_num_requested && a.my_mandatory_mode!=arena_base::no_mandatory; +#else + const bool active_mandatory = false; +#endif + __TBB_ASSERT_EX(active_mandatory || my_priority_levels[my_global_bottom_priority].workers_requested > 0, NULL ); } update_allotment( highest_affected_level ); diff --git a/src/tbb/market.h b/src/tbb/market.h index 14a5f6f8a1ac73ea53325761547e191482ccdce2..5ab8fe524e63cf087164f2249d969c6d191dca3f 100644 --- a/src/tbb/market.h +++ b/src/tbb/market.h @@ -1,5 +1,5 @@ /* - 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 @@ -92,11 +92,16 @@ private: //! Number of workers that were requested by all arenas int my_total_demand; +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + //! How many times mandatory concurrency was requested from the market + int my_mandatory_num_requested; +#endif + #if __TBB_TASK_PRIORITY //! Highest priority among active arenas in the market. /** Arena priority level is its tasks highest priority (specified by arena's my_top_priority member). - Arena is active when it has outstanding request for workers. Note that + Arena is active when it has outstanding request for workers. Note that inactive arena may have workers lingering there for some time. **/ intptr_t my_global_top_priority; @@ -151,8 +156,13 @@ private: size_t my_stack_size; //! Shutdown mode - bool join_workers; + bool my_join_workers; + + //! The value indicating that the soft limit warning is unnecessary + static const unsigned skip_soft_limit_warning = ~0U; + //! Either workers soft limit to be reported via runtime_warning() or skip_soft_limit_warning + unsigned my_workers_soft_limit_to_report; #if __TBB_COUNT_TASK_NODES //! Net number of nodes that have been allocated from heap. /** Updated each time a scheduler or arena is destroyed. */ @@ -163,8 +173,7 @@ private: market ( unsigned workers_soft_limit, unsigned workers_hard_limit, size_t stack_size ); //! Factory method creating new market object - static market& global_market ( bool is_public, unsigned max_num_workers = 0, size_t stack_size = 0, - bool default_concurrency_requested = false); + static market& global_market ( bool is_public, unsigned max_num_workers = 0, size_t stack_size = 0 ); //! Destroys and deallocates market object created by market::create() void destroy (); @@ -174,7 +183,7 @@ private: arena* arena_in_need ( arena* prev_arena ); //! Recalculates the number of workers assigned to each arena at and below the specified priority. - /** The actual number of workers servicing a particular arena may temporarily + /** The actual number of workers servicing a particular arena may temporarily deviate from the calculated value. **/ void update_allotment ( intptr_t highest_affected_priority ); @@ -201,11 +210,11 @@ private: #else /* !__TBB_TASK_PRIORITY */ //! Recalculates the number of workers assigned to each arena in the list. - /** The actual number of workers servicing a particular arena may temporarily + /** The actual number of workers servicing a particular arena may temporarily deviate from the calculated value. **/ void update_allotment () { if ( my_total_demand ) - update_allotment( my_arenas, my_total_demand, (int)my_max_num_workers ); + update_allotment( my_arenas, my_total_demand, (int)my_num_workers_soft_limit ); } //! Returns next arena that needs more workers, or NULL. @@ -256,7 +265,7 @@ public: //! Creates an arena object /** If necessary, also creates global market instance, and boosts its ref count. Each call to create_arena() must be matched by the call to arena::free_arena(). **/ - static arena* create_arena ( int num_slots, int num_reserved_slots, size_t stack_size, bool default_concurrency_requested ); + static arena* create_arena ( int num_slots, int num_reserved_slots, size_t stack_size ); //! Removes the arena from the market's list void try_destroy_arena ( arena*, uintptr_t aba_epoch ); @@ -267,6 +276,17 @@ public: //! Decrements market's refcount and destroys it in the end void release ( bool is_public = false ); +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + //! Imlpementation of mandatory concurrency enabling + bool mandatory_concurrency_enable_impl ( arena *a, bool *enabled = NULL ); + + //! Inform the master that there is an arena with mandatory concurrency + bool mandatory_concurrency_enable ( arena *a ); + + //! Inform the master that the arena is no more interested in mandatory concurrency + void mandatory_concurrency_disable ( arena *a ); +#endif /* __TBB_ENQUEUE_ENFORCED_CONCURRENCY */ + //! Request that arena's need in workers should be adjusted. /** Concurrent invocations are possible only on behalf of different arenas. **/ void adjust_demand ( arena&, int delta ); @@ -274,7 +294,7 @@ public: //! Wait workers termination void wait_workers (); - bool must_join_workers () const { return join_workers; } + bool must_join_workers () const { return my_join_workers; } //! Returns the requested stack size of worker threads. size_t worker_stack_size () const { return my_stack_size; } @@ -310,11 +330,11 @@ public: #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_TASK_PRIORITY - //! Lowers arena's priority is not higher than newPriority - /** Returns true if arena priority was actually elevated. **/ + //! Lowers arena's priority is not higher than newPriority + /** Returns true if arena priority was actually elevated. **/ bool lower_arena_priority ( arena& a, intptr_t new_priority, uintptr_t old_reload_epoch ); - //! Makes sure arena's priority is not lower than newPriority + //! Makes sure arena's priority is not lower than newPriority /** Returns true if arena priority was elevated. Also updates arena's bottom priority boundary if necessary. diff --git a/src/tbb/mutex.cpp b/src/tbb/mutex.cpp index 6b15072231f53a9cf25a21a2573358da72206fc0..2cbae1b6a40272f71d37097aa0c8929cc607b450 100644 --- a/src/tbb/mutex.cpp +++ b/src/tbb/mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -29,7 +29,7 @@ namespace tbb { #if _WIN32||_WIN64 switch( m.state ) { - case INITIALIZED: + case INITIALIZED: case HELD: EnterCriticalSection( &m.impl ); // If a thread comes here, and another thread holds the lock, it will block @@ -57,19 +57,19 @@ namespace tbb { void mutex::scoped_lock::internal_release() { __TBB_ASSERT( my_mutex, "mutex::scoped_lock: not holding a mutex" ); -#if _WIN32||_WIN64 +#if _WIN32||_WIN64 switch( my_mutex->state ) { - case INITIALIZED: + case INITIALIZED: __TBB_ASSERT(false,"mutex::scoped_lock: try to release the lock without acquisition"); break; case HELD: my_mutex->state = INITIALIZED; LeaveCriticalSection(&my_mutex->impl); break; - case DESTROYED: - __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); + case DESTROYED: + __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); break; - default: + default: __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); break; } @@ -83,13 +83,13 @@ void mutex::scoped_lock::internal_release() { bool mutex::scoped_lock::internal_try_acquire( mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { - case INITIALIZED: + case INITIALIZED: case HELD: break; - case DESTROYED: - __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); + case DESTROYED: + __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); break; - default: + default: __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); break; } @@ -105,7 +105,7 @@ bool mutex::scoped_lock::internal_try_acquire( mutex& m ) { #else result = pthread_mutex_trylock(&m.impl)==0; #endif /* _WIN32||_WIN64 */ - if( result ) + if( result ) my_mutex = &m; return result; } @@ -113,12 +113,12 @@ bool mutex::scoped_lock::internal_try_acquire( mutex& m ) { void mutex::internal_construct() { #if _WIN32||_WIN64 InitializeCriticalSectionEx(&impl, 4000, 0); - state = INITIALIZED; + state = INITIALIZED; #else int error_code = pthread_mutex_init(&impl,NULL); if( error_code ) tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed"); -#endif /* _WIN32||_WIN64*/ +#endif /* _WIN32||_WIN64*/ ITT_SYNC_CREATE(&impl, _T("tbb::mutex"), _T("")); } @@ -128,16 +128,16 @@ void mutex::internal_destroy() { case INITIALIZED: DeleteCriticalSection(&impl); break; - case DESTROYED: + case DESTROYED: __TBB_ASSERT(false,"mutex: already destroyed"); break; - default: + default: __TBB_ASSERT(false,"mutex: illegal state for destruction"); break; } state = DESTROYED; #else - int error_code = pthread_mutex_destroy(&impl); + int error_code = pthread_mutex_destroy(&impl); __TBB_ASSERT_EX(!error_code,"mutex: pthread_mutex_destroy failed"); #endif /* _WIN32||_WIN64 */ } diff --git a/src/tbb/observer_proxy.cpp b/src/tbb/observer_proxy.cpp index 07544ec01b482789271f1889e6688284deafadfa..a905b6ca57ad384891a6e034b6c67e8ecbec4cf5 100644 --- a/src/tbb/observer_proxy.cpp +++ b/src/tbb/observer_proxy.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/observer_proxy.h b/src/tbb/observer_proxy.h index 1855884dfc5990297ea5872b01d6efda3d0bb045..e46652717c19ca2cbc0625e76e516c0e8111175e 100644 --- a/src/tbb/observer_proxy.h +++ b/src/tbb/observer_proxy.h @@ -1,5 +1,5 @@ /* - 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 @@ -106,7 +106,7 @@ class observer_proxy { friend class observer_list; //! Reference count used for garbage collection. /** 1 for reference from my task_scheduler_observer. - 1 for each task dispatcher's last observer pointer. + 1 for each task dispatcher's last observer pointer. No accounting for neighbors in the shared list. */ atomic my_ref_count; //! Reference to the list this observer belongs to. diff --git a/src/tbb/pipeline.cpp b/src/tbb/pipeline.cpp index d469029cbd374160171c3883c8d6a3ed0f41a298..c985f80d26709144ddf0fdd44f3811c4048bc4be 100644 --- a/src/tbb/pipeline.cpp +++ b/src/tbb/pipeline.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/private_server.cpp b/src/tbb/private_server.cpp index 5dc32bc5d0a664a3fdb9efa816c2c8dc01519fef..bd827ac9373941cbd208e9d0227cbd876484d05a 100644 --- a/src/tbb/private_server.cpp +++ b/src/tbb/private_server.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -56,12 +56,12 @@ private: st_quit }; atomic my_state; - + //! Associated server - private_server& my_server; + private_server& my_server; //! Associated client - tbb_client& my_client; + tbb_client& my_client; //! index used for avoiding the 64K aliasing problem const size_t my_index; @@ -79,7 +79,7 @@ private: friend class private_server; - //! Actions executed by the associated thread + //! Actions executed by the associated thread void run(); //! Wake up associated thread (or launch a thread if there is none) @@ -93,7 +93,7 @@ private: static void release_handle(thread_handle my_handle, bool join); protected: - private_worker( private_server& server, tbb_client& client, const size_t i ) : + private_worker( private_server& server, tbb_client& client, const size_t i ) : my_server(server), my_client(client), my_index(i) @@ -132,7 +132,7 @@ private: //! Number of jobs that could use their associated thread minus number of active threads. /** If negative, indicates oversubscription. - If positive, indicates that more threads should run. + If positive, indicates that more threads should run. Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex, because raising it impacts the invariant for sleeping threads. */ atomic my_slack; @@ -158,7 +158,7 @@ private: which in turn each wake up two threads, etc. */ void propagate_chain_reaction() { // First test of a double-check idiom. Second test is inside wake_some(0). - if( my_asleep_list_root ) + if( my_asleep_list_root ) wake_some(0); } @@ -169,13 +169,13 @@ private: void wake_some( int additional_slack ); virtual ~private_server(); - + void remove_server_ref() { if( --my_ref_count==0 ) { my_client.acknowledge_close_connection(); this->~private_server(); tbb::cache_aligned_allocator().deallocate( this, 1 ); - } + } } friend class private_worker; @@ -184,7 +184,7 @@ public: /*override*/ version_type version() const { return 0; - } + } /*override*/ void request_close_connection( bool /*exiting*/ ) { for( size_t i=0; i().allocate( my_n_thread ); memset( my_thread_array, 0, sizeof(private_worker)*my_n_thread ); for( size_t i=0; imy_next = my_asleep_list_root; my_asleep_list_root = t; - } + } } private_server::~private_server() { __TBB_ASSERT( my_net_slack_requests==0, NULL ); - for( size_t i=my_n_thread; i--; ) + for( size_t i=my_n_thread; i--; ) my_thread_array[i].~padded_private_worker(); tbb::cache_aligned_allocator().deallocate( my_thread_array, my_n_thread ); tbb::internal::poison_pointer( my_thread_array ); @@ -396,7 +396,7 @@ void private_server::wake_some( int additional_slack ) { } } done: - while( w>wakee ) + while( w>wakee ) (*--w)->wake_or_launch(); } diff --git a/src/tbb/queuing_mutex.cpp b/src/tbb/queuing_mutex.cpp index 7650a79db03c4362c2b169f2c8149295987a4bae..2bdff016eaf99a36a117132291137f7602a09cce 100644 --- a/src/tbb/queuing_mutex.cpp +++ b/src/tbb/queuing_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -75,7 +75,6 @@ bool queuing_mutex::scoped_lock::try_acquire( queuing_mutex& m ) // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. - // try_acquire should always have acquire semantic, even if failed. __TBB_load_with_acquire(going); mutex = &m; ITT_NOTIFY(sync_acquired, mutex); diff --git a/src/tbb/queuing_rw_mutex.cpp b/src/tbb/queuing_rw_mutex.cpp index e693b048c1a4be4a2d2579ffb3153266234e2a8d..b0a2ad9239dd5ae34fea0152e4d45613c75d0071 100644 --- a/src/tbb/queuing_rw_mutex.cpp +++ b/src/tbb/queuing_rw_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -248,7 +248,6 @@ bool queuing_rw_mutex::scoped_lock::try_acquire( queuing_rw_mutex& m, bool write return false; // Someone already took the lock // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. - // try_acquire should always have acquire semantic, even if failed. __TBB_load_with_acquire(my_going); my_mutex = &m; ITT_NOTIFY(sync_acquired, my_mutex); @@ -367,20 +366,18 @@ bool queuing_rw_mutex::scoped_lock::downgrade_to_reader() __TBB_ASSERT( my_state==STATE_WRITER, "no sense to downgrade a reader" ); ITT_NOTIFY(sync_releasing, my_mutex); - - if( ! __TBB_load_with_acquire(my_next) ) { - my_state = STATE_READER; - if( this==my_mutex->q_tail ) { + my_state = STATE_READER; + if( ! __TBB_load_relaxed(my_next) ) { + // the following load of q_tail must not be reordered with setting STATE_READER above + if( this==my_mutex->q_tail.load() ) { unsigned short old_state = my_state.compare_and_swap(STATE_ACTIVEREADER, STATE_READER); - if( old_state==STATE_READER ) { - // Downgrade completed - return true; - } + if( old_state==STATE_READER ) + return true; // Downgrade completed } /* wait for the next to register */ spin_wait_while_eq( my_next, (void*)NULL ); } - scoped_lock *const n = __TBB_load_relaxed(my_next); + scoped_lock *const n = __TBB_load_with_acquire(my_next); __TBB_ASSERT( n, "still no successor at this point!" ); if( n->my_state & STATE_COMBINED_WAITINGREADER ) __TBB_store_with_release(n->my_going,1); diff --git a/src/tbb/reader_writer_lock.cpp b/src/tbb/reader_writer_lock.cpp index 87ecbe44c91f3d42811331600ccf3514be40e3f2..21b8808733514764b8ec857c3b6ed3a6b6700157 100644 --- a/src/tbb/reader_writer_lock.cpp +++ b/src/tbb/reader_writer_lock.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -307,7 +307,7 @@ void reader_writer_lock::scoped_lock::internal_construct (reader_writer_lock& lo } } -inline reader_writer_lock::scoped_lock::scoped_lock() : mutex(NULL), next(NULL) { +inline reader_writer_lock::scoped_lock::scoped_lock() : mutex(NULL), next(NULL) { status = waiting; } diff --git a/src/tbb/recursive_mutex.cpp b/src/tbb/recursive_mutex.cpp index ff5b5824f94828fc1517edeeda8aee6fa4ee9599..abae4b5f55db0fcd66ecc53b630064d2e62e4c56 100644 --- a/src/tbb/recursive_mutex.cpp +++ b/src/tbb/recursive_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -51,15 +51,15 @@ void recursive_mutex::scoped_lock::internal_acquire( recursive_mutex& m ) { void recursive_mutex::scoped_lock::internal_release() { __TBB_ASSERT( my_mutex, "recursive_mutex::scoped_lock: not holding a mutex" ); -#if _WIN32||_WIN64 +#if _WIN32||_WIN64 switch( my_mutex->state ) { - case INITIALIZED: + case INITIALIZED: LeaveCriticalSection( &my_mutex->impl ); break; - case DESTROYED: - __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); break; - default: + default: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); break; } @@ -73,12 +73,12 @@ void recursive_mutex::scoped_lock::internal_release() { bool recursive_mutex::scoped_lock::internal_try_acquire( recursive_mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { - case INITIALIZED: + case INITIALIZED: break; - case DESTROYED: - __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); break; - default: + default: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); break; } @@ -109,7 +109,7 @@ void recursive_mutex::internal_construct() { if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed"); pthread_mutexattr_destroy( &mtx_attr ); -#endif /* _WIN32||_WIN64*/ +#endif /* _WIN32||_WIN64*/ ITT_SYNC_CREATE(&impl, _T("tbb::recursive_mutex"), _T("")); } @@ -119,16 +119,16 @@ void recursive_mutex::internal_destroy() { case INITIALIZED: DeleteCriticalSection(&impl); break; - case DESTROYED: + case DESTROYED: __TBB_ASSERT(false,"recursive_mutex: already destroyed"); break; - default: + default: __TBB_ASSERT(false,"recursive_mutex: illegal state for destruction"); break; } state = DESTROYED; #else - int error_code = pthread_mutex_destroy(&impl); + int error_code = pthread_mutex_destroy(&impl); __TBB_ASSERT_EX(!error_code,"recursive_mutex: pthread_mutex_destroy failed"); #endif /* _WIN32||_WIN64 */ } diff --git a/src/tbb/scheduler.cpp b/src/tbb/scheduler.cpp index 9a23e2e0d46cced4ae211520ef5e8995737163ae..eef3387841838e09916d913ce84e6c81949a89d1 100644 --- a/src/tbb/scheduler.cpp +++ b/src/tbb/scheduler.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -202,7 +202,7 @@ void generic_scheduler::init_stack_info () { // IA-64 architecture stack is split into RSE backup and memory parts my_rsb_stealing_threshold = (uintptr_t)((char*)rsb_base + stack_size/2); #endif /* __TBB_ipf */ - // Size of the stack free part + // Size of the stack free part stack_size = size_t((char*)stack_base - (char*)stack_limit); } pthread_attr_destroy(&np_attr_stack); @@ -582,10 +582,10 @@ void generic_scheduler::local_spawn( task& first, task*& next ) { if ( &first.prefix().next == &next ) { // Single task is being spawned #if __TBB_TODO - // TODO: + // TODO: // In the future we need to add overloaded spawn method for a single task, // and a method accepting an array of task pointers (we may also want to - // change the implementation of the task_list class). But since such changes + // change the implementation of the task_list class). But since such changes // may affect the binary compatibility, we postpone them for a while. #endif size_t T = prepare_task_pool( 1 ); @@ -624,7 +624,7 @@ void generic_scheduler::local_spawn( task& first, task*& next ) { } if ( !is_task_pool_published() ) publish_task_pool(); - my_arena->advertise_new_work(); + my_arena->advertise_new_work(); assert_task_pool_valid(); } @@ -686,9 +686,9 @@ task* generic_scheduler::winnow_task_pool () { // The purpose of the synchronization algorithm here is for the owner thread // to avoid locking task pool most of the time. #if __TBB_TODO - // Just locking the task pool unconditionally would produce simpler code, - // scalability of which should not suffer unless priority jitter takes place. - // Since priority jitter is nocuous by itself, we may want to evaluate + // Just locking the task pool unconditionally would produce simpler code, + // scalability of which should not suffer unless priority jitter takes place. + // Since priority jitter is nocuous by itself, we may want to evaluate // applicability of the simpler variant... // Non-blocking variant also prevent us from relocating remaining tasks to // the beginning of the task pool, not sure if it makes much sense. @@ -808,7 +808,7 @@ task* generic_scheduler::reload_tasks ( task*& offloaded_tasks, task**& offloade if ( --num_tasks ) { commit_spawned_tasks( T += num_tasks ); publish_task_pool(); - my_arena->advertise_new_work(); + my_arena->advertise_new_work(); } __TBB_ASSERT( T == __TBB_load_relaxed(my_arena_slot->tail), NULL ); __TBB_ASSERT( T < my_arena_slot->my_task_pool_size, NULL ); @@ -838,14 +838,14 @@ task* generic_scheduler::reload_tasks () { // are still present. This results in both bottom and top priority bounds // becoming 'normal', which makes offloaded low priority tasks unreachable. // Update arena's bottom priority to accommodate them. - // NOTE: If the number of priority levels is increased, we may want + // NOTE: If the number of priority levels is increased, we may want // to calculate minimum of priorities in my_offloaded_tasks. // First indicate the presence of lower-priority tasks my_market->update_arena_priority( *my_arena, priority(*my_offloaded_tasks) ); // Then mark arena as full to unlock arena priority level adjustment // by arena::is_out_of_work(), and ensure worker's presence - my_arena->advertise_new_work(); + my_arena->advertise_new_work(); } my_local_reload_epoch = reload_epoch; return t; @@ -972,7 +972,7 @@ retry: if( --skip_and_bump > 0 ) { // if both: task skipped and head&tail bumped // Synchronize with snapshot as we bumped head and tail which can falsely trigger EMPTY state atomic_fence(); - my_arena->advertise_new_work(); + my_arena->advertise_new_work(); } return result; } @@ -1125,7 +1125,7 @@ void generic_scheduler::cleanup_master( bool needs_wait_workers ) { my_arena_slot = NULL; // detached from slot free_scheduler(); // TODO: read global settings for the parameter at that point - m->join_workers = needs_wait_workers; + m->my_join_workers = needs_wait_workers; if( a ) a->on_thread_leaving(); if( needs_wait_workers ) @@ -1196,8 +1196,8 @@ void generic_scheduler::cleanup_master( bool needs_wait_workers ) { enough information for the main thread on IA-64 architecture (RSE spill area and memory stack are allocated as two separate discontinuous chunks of memory), and there is no portable way to discern the main and the secondary threads. - Thus for OS X* and IA-64 Linux architecture we use the TBB worker stack size for - all threads and use the current stack top as the stack base. This simplified + Thus for OS X* and IA-64 Linux architecture we use the TBB worker stack size for + all threads and use the current stack top as the stack base. This simplified approach is based on the following assumptions: 1) If the default stack size is insufficient for the user app needs, the required amount will be explicitly specified by the user at the point of the diff --git a/src/tbb/scheduler.h b/src/tbb/scheduler.h index 16685af17b1f9acec290621603b9c5b7827ee55a..084a079d9eee546f938279ae928bf887fd93d8de 100644 --- a/src/tbb/scheduler.h +++ b/src/tbb/scheduler.h @@ -1,5 +1,5 @@ /* - 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 @@ -222,15 +222,15 @@ public: // almost every class in TBB uses generic_scheduler //! Get a task from the local pool. /** Called only by the pool owner. - Returns the pointer to the task or NULL if the pool is empty. + Returns the pointer to the task or NULL if the pool is empty. In the latter case compacts the pool. **/ task* get_task(); //! Attempt to get a task from the mailbox. - /** Gets a task only if it has not been executed by its sender or a thief + /** Gets a task only if it has not been executed by its sender or a thief that has stolen it from the sender's task pool. Otherwise returns NULL. - This method is intended to be used only by the thread extracting the proxy + This method is intended to be used only by the thread extracting the proxy from its mailbox. (In contrast to local task pool, mailbox can be read only by its owner). **/ task* get_mailbox_task(); @@ -284,13 +284,13 @@ public: void wait_until_empty(); #endif - /*override*/ + /*override*/ void spawn( task& first, task*& next ); - /*override*/ + /*override*/ void spawn_root_and_wait( task& first, task*& next ); - /*override*/ + /*override*/ void enqueue( task&, void* reserved ); void local_spawn( task& first, task*& next ); @@ -302,7 +302,7 @@ public: //! Allocate task object, either from the heap or a free list. /** Returns uninitialized task object with initialized prefix. */ - task& allocate_task( size_t number_of_bytes, + task& allocate_task( size_t number_of_bytes, __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ); //! Put task on free list. @@ -318,7 +318,7 @@ public: //! True if the scheduler is on the outermost dispatch level in a master thread. /** Returns true when this scheduler instance is associated with an application - thread, and is not executing any TBB task. This includes being in a TBB + thread, and is not executing any TBB task. This includes being in a TBB dispatch loop (one of wait_for_all methods) invoked directly from that thread. **/ inline bool master_outermost_level () const; @@ -335,7 +335,7 @@ public: //! Special value used to mark my_return_list as not taking any more entries. static task* plugged_return_list() {return (task*)(intptr_t)(-1);} - //! Number of small tasks that have been allocated by this scheduler. + //! Number of small tasks that have been allocated by this scheduler. __TBB_atomic intptr_t my_small_task_count; //! List of small tasks that have been returned to this scheduler by other schedulers. @@ -346,8 +346,8 @@ public: /** Returns obtained task or NULL if all attempts fail. */ virtual task* receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count ) = 0; - //! Free a small task t that that was allocated by a different scheduler - void free_nonlocal_small_task( task& t ); + //! Free a small task t that that was allocated by a different scheduler + void free_nonlocal_small_task( task& t ); #if __TBB_TASK_GROUP_CONTEXT //! Returns task group context used by this scheduler instance. @@ -368,18 +368,18 @@ public: // TODO: check whether it can be deadly preempted and replace by spinning/sleeping mutex spin_mutex my_context_list_mutex; - //! Last state propagation epoch known to this thread + //! Last state propagation epoch known to this thread /** Together with the_context_state_propagation_epoch constitute synchronization protocol - that keeps hot path of task group context construction destruction mostly + that keeps hot path of task group context construction destruction mostly lock-free. When local epoch equals the global one, the state of task group contexts registered with this thread is consistent with that of the task group trees they belong to. **/ uintptr_t my_context_state_propagation_epoch; - //! Flag indicating that a context is being destructed by its owner thread + //! Flag indicating that a context is being destructed by its owner thread /** Together with my_nonlocal_ctx_list_update constitute synchronization protocol - that keeps hot path of context destruction (by the owner thread) mostly + that keeps hot path of context destruction (by the owner thread) mostly lock-free. **/ tbb::atomic my_local_ctx_list_update; @@ -554,7 +554,7 @@ inline void generic_scheduler::deallocate_task( task& t ) { #if TBB_USE_ASSERT task_prefix& p = t.prefix(); p.state = 0xFF; - p.extra_state = 0xFF; + p.extra_state = 0xFF; poison_pointer(p.next); #endif /* TBB_USE_ASSERT */ NFS_Free((char*)&t-task_prefix_reservation_size); @@ -591,7 +591,7 @@ void generic_scheduler::commit_relocated_tasks ( size_t new_tail ) { __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool must be locked when calling commit_relocated_tasks()" ); __TBB_store_relaxed( my_arena_slot->head, 0 ); - // Tail is updated last to minimize probability of a thread making arena + // Tail is updated last to minimize probability of a thread making arena // snapshot being misguided into thinking that this task pool is empty. __TBB_store_relaxed( my_arena_slot->tail, new_tail ); release_task_pool(); @@ -645,9 +645,12 @@ inline intptr_t generic_scheduler::effective_reference_priority () const { // a lower priority arena, they should use arena's priority as a reference, lest // be trapped in a futile spinning (because market's priority would prohibit // executing ANY tasks in this arena). - return !worker_outermost_level() || - my_arena->my_num_workers_allotted < my_arena->num_workers_active() - ? *my_ref_top_priority : my_arena->my_top_priority; + return !worker_outermost_level() || + (my_arena->my_num_workers_allotted < my_arena->num_workers_active() +#if __TBB_ENQUEUE_ENFORCED_CONCURRENCY + && my_arena->my_mandatory_mode!=arena_base::global_mandatory +#endif + ) ? *my_ref_top_priority : my_arena->my_top_priority; } inline void generic_scheduler::offload_task ( task& t, intptr_t /*priority*/ ) { diff --git a/src/tbb/scheduler_common.h b/src/tbb/scheduler_common.h index 3570e620c199f971ad0fb3f962fa1bd7460929c7..16848590ac4b0aacc6e1cceeaeaab82176da12aa 100644 --- a/src/tbb/scheduler_common.h +++ b/src/tbb/scheduler_common.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/scheduler_utility.h b/src/tbb/scheduler_utility.h index fc268a0f035c3bcaa3fe90fe0b816d95875bddd7..f0ef95f109c6f2acbdd39a9ffd778133f02370f7 100644 --- a/src/tbb/scheduler_utility.h +++ b/src/tbb/scheduler_utility.h @@ -1,5 +1,5 @@ /* - 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 @@ -35,7 +35,7 @@ class auto_empty_task { task* my_task; generic_scheduler* my_scheduler; public: - auto_empty_task ( __TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context* context) ) + auto_empty_task ( __TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context* context) ) : my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_CONTEXT_ARG(NULL, context))) empty_task ) , my_scheduler(s) {} @@ -54,7 +54,7 @@ public: //! Vector that grows without reallocations, and stores items in the reverse order. /** Requires to initialize its first segment with a preallocated memory chunk (usually it is static array or an array allocated on the stack). - The second template parameter specifies maximal number of segments. Each next + The second template parameter specifies maximal number of segments. Each next segment is twice as large as the previous one. **/ template class fast_reverse_vector @@ -91,7 +91,7 @@ public: m_cur_segment[--m_pos] = val; } - //! Copies the contents of the vector into the dst array. + //! Copies the contents of the vector into the dst array. /** Can only be used when T is a POD type, as copying does not invoke copy constructors. **/ void copy_memory ( T* dst ) const { @@ -118,7 +118,7 @@ protected: //! Array of segments (has fixed size specified by the second template parameter) T *m_segments[max_segments]; - + //! Number of segments (the size of m_segments) size_t m_num_segments; diff --git a/src/tbb/semaphore.cpp b/src/tbb/semaphore.cpp index 8c5a5316f139b0c754d24174031a28f516393302..691c01fafc00af5619e8ed5754361eb40d4eb740 100644 --- a/src/tbb/semaphore.cpp +++ b/src/tbb/semaphore.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -74,7 +74,7 @@ inline void init_concmon_module() binary_semaphore::binary_semaphore() { atomic_do_once( &init_concmon_module, concmon_module_inited ); - __TBB_init_binsem( &my_sem.lock ); + __TBB_init_binsem( &my_sem.lock ); if( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event ) P(); } diff --git a/src/tbb/semaphore.h b/src/tbb/semaphore.h index 57628aa19a96fd18535efb8ac831d28378e27ae5..2fed823c7d2d7c247a88661d5694b6be723224f7 100644 --- a/src/tbb/semaphore.h +++ b/src/tbb/semaphore.h @@ -1,5 +1,5 @@ /* - 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 @@ -55,7 +55,7 @@ public: ~semaphore() {CloseHandle( sem );} //! wait/acquire void P() {WaitForSingleObjectEx( sem, INFINITE, FALSE );} - //! post/release + //! post/release void V() {ReleaseSemaphore( sem, 1, NULL );} private: HANDLE sem; @@ -75,14 +75,14 @@ public: __TBB_ASSERT_EX( ret==err_none, NULL ); } //! wait/acquire - void P() { + void P() { int ret; do { ret = semaphore_wait( sem ); } while( ret==KERN_ABORTED ); __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); } - //! post/release + //! post/release void V() { semaphore_signal( sem ); } private: semaphore_t sem; @@ -109,7 +109,7 @@ public: while( sem_wait( &sem )!=0 ) __TBB_ASSERT( errno==EINTR, NULL ); } - //! post/release + //! post/release void V() { sem_post( &sem ); } private: sem_t sem; @@ -133,7 +133,7 @@ public: ~binary_semaphore() { CloseHandle( my_sem ); } //! wait/acquire void P() { WaitForSingleObjectEx( my_sem, INFINITE, FALSE ); } - //! post/release + //! post/release void V() { SetEvent( my_sem ); } private: HANDLE my_sem; @@ -154,7 +154,7 @@ public: ~binary_semaphore(); //! wait/acquire void P(); - //! post/release + //! post/release void V(); private: srwl_or_handle my_sem; @@ -175,14 +175,14 @@ public: __TBB_ASSERT_EX( ret==err_none, NULL ); } //! wait/acquire - void P() { + void P() { int ret; do { ret = semaphore_wait( my_sem ); } while( ret==KERN_ABORTED ); __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); } - //! post/release + //! post/release void V() { semaphore_signal( my_sem ); } private: semaphore_t my_sem; @@ -208,8 +208,8 @@ public: } } } - //! post/release - void V() { + //! post/release + void V() { __TBB_ASSERT( my_sem>=1, "multiple V()'s in a row?" ); if( my_sem--!=1 ) { //if old value was 2 @@ -240,7 +240,7 @@ public: while( sem_wait( &my_sem )!=0 ) __TBB_ASSERT( errno==EINTR, NULL ); } - //! post/release + //! post/release void V() { sem_post( &my_sem ); } private: sem_t my_sem; diff --git a/src/tbb/spin_mutex.cpp b/src/tbb/spin_mutex.cpp index 759194d6de8556826f2062d168081d600d83a81f..fb2c5c655c3549d92e6b66a7468765ff9403043d 100644 --- a/src/tbb/spin_mutex.cpp +++ b/src/tbb/spin_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/spin_rw_mutex.cpp b/src/tbb/spin_rw_mutex.cpp index f21bb61e5670fd758015f48290c4ae5403bebad0..c7a512ef80aeee80aa084779584ced29bd95ffe7 100644 --- a/src/tbb/spin_rw_mutex.cpp +++ b/src/tbb/spin_rw_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -70,7 +70,7 @@ void spin_rw_mutex_v3::internal_acquire_reader() state_t s = const_cast(state); // ensure reloading if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER ); - if( !( t&WRITER )) + if( !( t&WRITER )) break; // successfully stored increased number of readers // writer got there first, undo the increment __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER ); diff --git a/src/tbb/task.cpp b/src/tbb/task.cpp index e42460bd7140aab1067c0f87400ed3f9bb78e087..c9254d40f8c5a55434502002f2b4752de5f472c1 100644 --- a/src/tbb/task.cpp +++ b/src/tbb/task.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/task_group_context.cpp b/src/tbb/task_group_context.cpp index 83a009c7c94bec152a871c507994f1200a55912b..9d3de7fab38ff4583a475b80d763fcdaede06d9b 100644 --- a/src/tbb/task_group_context.cpp +++ b/src/tbb/task_group_context.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/task_stream.h b/src/tbb/task_stream.h index 3eb9cee13bb97f48fa22b254cd83be51779b94d0..5f5b5e9c164e1c811f634a60ae4a1e26c5ddeeb7 100644 --- a/src/tbb/task_stream.h +++ b/src/tbb/task_stream.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tbb_assert_impl.h b/src/tbb/tbb_assert_impl.h index 224b15f28193ff90982318c6c1f0dc107f7ee9f5..b5b632829213822b55e9505e40f18e6667e67ea9 100644 --- a/src/tbb/tbb_assert_impl.h +++ b/src/tbb/tbb_assert_impl.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tbb_main.cpp b/src/tbb/tbb_main.cpp index aa44dddd365413ac6e75ab08eb9d783d42a7b744..e639c24fa2f26134ff6c9f017bf0aac84262b897 100644 --- a/src/tbb/tbb_main.cpp +++ b/src/tbb/tbb_main.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -127,7 +127,7 @@ void __TBB_InitOnce::add_ref() { void __TBB_InitOnce::remove_ref() { int k = --count; - __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); + __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); if( k==0 ) { governor::release_resources(); ITT_FINI_ITTLIB(); @@ -161,7 +161,7 @@ struct resource_string { #define TBB_STRING_RESOURCE( index_name, str ) { str, NULL }, static resource_string strings_for_itt[] = { #include "tbb/internal/_tbb_strings.h" - { "num_resource_strings", NULL } + { "num_resource_strings", NULL } }; #undef TBB_STRING_RESOURCE @@ -276,7 +276,7 @@ void* itt_load_pointer_with_acquire_v3( const void* src ) { ITT_NOTIFY(sync_acquired, const_cast(src)); return result; } - + #if DO_ITT_NOTIFY void call_itt_notify_v5(int t, void *ptr) { switch (t) { @@ -308,7 +308,7 @@ static inline void itt_id_create(const __itt_domain *domain, __itt_id id) { ITTNOTIFY_VOID_D1(id_create, domain, id); } -void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, +void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id group_id = itt_null_id; @@ -323,7 +323,7 @@ void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long } } -void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, +void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id id = itt_null_id; @@ -338,18 +338,18 @@ void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long } } -void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, +void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { - __itt_id id0 = itt_null_id; + __itt_id id0 = itt_null_id; __itt_id id1 = itt_null_id; itt_id_make( &id0, addr0, addr0_extra ); itt_id_make( &id1, addr1, addr1_extra ); - ITTNOTIFY_VOID_D3(relation_add, d, id0, (__itt_relation)relation, id1); + ITTNOTIFY_VOID_D3(relation_add, d, id0, (__itt_relation)relation, id1); } } -void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, +void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id task_id = itt_null_id; @@ -369,7 +369,7 @@ void itt_task_end_v7( itt_domain_enum domain ) { } } -void itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, +void itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, void *parent, unsigned long long parent_extra, string_index /* name_index */ ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id region_id = itt_null_id; @@ -392,21 +392,21 @@ void itt_region_end_v9( itt_domain_enum domain, void *region, unsigned long long #else // DO_ITT_NOTIFY -void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, +void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { } -void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, +void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { } -void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, +void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { } -void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, +void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, void * /*parent*/, unsigned long long /* parent_extra */, string_index /* name_index */ ) { } void itt_task_end_v7( itt_domain_enum domain ) { } -void itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, +void itt_region_begin_v9( itt_domain_enum domain, void *region, unsigned long long region_extra, void *parent, unsigned long long parent_extra, string_index /* name_index */ ) { } void itt_region_end_v9( itt_domain_enum domain, void *region, unsigned long long region_extra ) { } @@ -446,14 +446,13 @@ protected: class allowed_parallelism_control : public padded { virtual size_t default_value() const { - // current implementation can't have effective active value below 2 - return max(2U, governor::default_num_threads()); + return max(1U, governor::default_num_threads()); } virtual bool is_first_arg_preferred(size_t a, size_t b) const { return a=2, NULL ); + __TBB_ASSERT( my_active_value>=1, NULL ); // -1 to take master into account market::set_active_num_workers( my_active_value-1 ); } diff --git a/src/tbb/tbb_main.h b/src/tbb/tbb_main.h index e36ade889640e7f93e30db74e9e74843e85a794b..7ae6bee4ec2a069914eb592c37abe22ff4f6a424 100644 --- a/src/tbb/tbb_main.h +++ b/src/tbb/tbb_main.h @@ -1,5 +1,5 @@ /* - 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 @@ -33,7 +33,7 @@ void DoOneTimeInitializations (); // __TBB_InitOnce //------------------------------------------------------------------------ -//! Class that supports TBB initialization. +//! Class that supports TBB initialization. /** It handles acquisition and release of global resources (e.g. TLS) during startup and shutdown, as well as synchronization for DoOneTimeInitializations. */ class __TBB_InitOnce { @@ -53,7 +53,7 @@ class __TBB_InitOnce { //! Global initialization lock /** Scenarios are possible when tools interop has to be initialized before the - TBB itself. This imposes a requirement that the global initialization lock + TBB itself. This imposes a requirement that the global initialization lock has to support valid static initialization, and does not issue any tool notifications in any build mode. **/ static __TBB_atomic_flag InitializationLock; @@ -65,8 +65,8 @@ public: static bool initialization_done() { return __TBB_load_with_acquire(InitializationDone); } - //! Add initial reference to resources. - /** We assume that dynamic loading of the library prevents any other threads + //! Add initial reference to resources. + /** We assume that dynamic loading of the library prevents any other threads from entering the library until this constructor has finished running. **/ __TBB_InitOnce() { add_ref(); } @@ -78,9 +78,9 @@ public: // start running, and thus no race on InitializationDone is possible. if( initialization_done() ) { // Remove an extra reference that was added in DoOneTimeInitializations. - remove_ref(); + remove_ref(); } - } + } //! Add reference to resources. If first reference added, acquire the resources. static void add_ref(); diff --git a/src/tbb/tbb_misc.cpp b/src/tbb/tbb_misc.cpp index f4f58d36cd42eca1b3bcce681cc61a3354ca73c8..c78d2d3c007a33e36f79e4e2de09b4ad003d843b 100644 --- a/src/tbb/tbb_misc.cpp +++ b/src/tbb/tbb_misc.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -18,7 +18,7 @@ reasons why the executable file might be covered by the GNU General Public License. */ -// Source file for miscellaneous entities that are infrequently referenced by +// Source file for miscellaneous entities that are infrequently referenced by // an executing program. #include "tbb/tbb_stddef.h" @@ -94,7 +94,7 @@ void handle_perror( int error_code, const char* what ) { #endif /* !TBB_USE_EXCEPTIONS */ } -#if _WIN32||_WIN64 +#if _WIN32||_WIN64 void handle_win_error( int error_code ) { char buf[512]; #if !__TBB_WIN8UI_SUPPORT @@ -210,7 +210,7 @@ bool cpu_has_speculation() { "cpuid\n" "movl %%ebx, %0\n" "movl %%esi, %%ebx\n" - : "=a"(reg_ebx) : "0" (reg_eax), "c" (reg_ecx) : "esi", + : "=a"(reg_ebx) : "0" (reg_eax), "c" (reg_ecx) : "esi", #if __TBB_x86_64 "ebx", #endif @@ -251,8 +251,8 @@ extern "C" void __TBB_machine_store8_slow_perf_warning( volatile void *ptr ) { const unsigned n = 4; static tbb::atomic cache[n]; static tbb::atomic k; - for( unsigned i=0; i(ptr); tbb::internal::runtime_warning( "atomic store on misaligned 8-byte location %p is slow", ptr ); @@ -263,7 +263,7 @@ done:; extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) { for( tbb::internal::atomic_backoff b;;b.pause() ) { int64_t tmp = *(int64_t*)ptr; - if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) + if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) break; } } diff --git a/src/tbb/tbb_misc.h b/src/tbb/tbb_misc.h index c8085845f0352a74c556690c8c14e559637d372c..70350c4d049e152bf4d05f8ff53670f9148a1aec 100644 --- a/src/tbb/tbb_misc.h +++ b/src/tbb/tbb_misc.h @@ -1,5 +1,5 @@ /* - 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 @@ -255,12 +255,14 @@ inline void run_initializer( bool (*f)(), atomic& state ) { void protect_affinity_mask( bool restore_process_mask ); void dismiss(); }; + void destroy_process_mask(); #else class affinity_helper : no_copy { public: void protect_affinity_mask( bool ) {} void dismiss() {} }; + inline void destroy_process_mask(){} #endif /* __TBB_USE_OS_AFFINITY_SYSCALL */ extern bool cpu_has_speculation(); diff --git a/src/tbb/tbb_misc_ex.cpp b/src/tbb/tbb_misc_ex.cpp index 57c8ce1f490605ecae36ac8136869a85d7107f14..5a0373e97e40b8b9d9a518dddb9eb4dde88c9547 100644 --- a/src/tbb/tbb_misc_ex.cpp +++ b/src/tbb/tbb_misc_ex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -18,7 +18,7 @@ reasons why the executable file might be covered by the GNU General Public License. */ -// Source file for miscellaneous entities that are infrequently referenced by +// Source file for miscellaneous entities that are infrequently referenced by // an executing program, and implementation of which requires dynamic linking. #include "tbb_misc.h" @@ -85,14 +85,12 @@ static void get_thread_affinity_mask( size_t maskSize, basic_mask_t* threadMask static basic_mask_t* process_mask; static int num_masks; -struct process_mask_cleanup_helper { - ~process_mask_cleanup_helper() { - if( process_mask ) { - delete [] process_mask; - } - } -}; -static process_mask_cleanup_helper process_mask_cleanup; + +void destroy_process_mask() { + if( process_mask ) { + delete [] process_mask; + } +} #define curMaskSize sizeof(basic_mask_t) * num_masks affinity_helper::~affinity_helper() { @@ -256,12 +254,12 @@ struct ProcessorGroupInfo { int numProcsRunningTotal; ///< Subtotal of processors in this and preceding groups //! Total number of processor groups in the system - static int NumGroups; + static int NumGroups; //! Index of the group with a slot reserved for the first master thread /** In the context of multiple processor groups support current implementation defines "the first master thread" as the first thread to invoke - AvailableHwConcurrency(). + AvailableHwConcurrency(). TODO: Implement a dynamic scheme remapping workers depending on the pending master threads affinity. **/ @@ -281,7 +279,7 @@ struct TBB_GROUP_AFFINITY { static DWORD (WINAPI *TBB_GetActiveProcessorCount)( WORD groupIndex ) = NULL; static WORD (WINAPI *TBB_GetActiveProcessorGroupCount)() = NULL; -static BOOL (WINAPI *TBB_SetThreadGroupAffinity)( HANDLE hThread, +static BOOL (WINAPI *TBB_SetThreadGroupAffinity)( HANDLE hThread, const TBB_GROUP_AFFINITY* newAff, TBB_GROUP_AFFINITY *prevAff ); static BOOL (WINAPI *TBB_GetThreadGroupAffinity)( HANDLE hThread, TBB_GROUP_AFFINITY* ); @@ -398,7 +396,7 @@ int AvailableHwConcurrency() { /* End of _WIN32||_WIN64 implementation */ #else - #error AvailableHwConcurrency is not implemented for this OS + #error AvailableHwConcurrency is not implemented for this OS #endif } // namespace internal diff --git a/src/tbb/tbb_resource.rc b/src/tbb/tbb_resource.rc index 0e584ad1d3d7f5383949a3c5f2f49306745d6414..f2d6a2ee23e0355ea99688a76be559652a2c56b1 100644 --- a/src/tbb/tbb_resource.rc +++ b/src/tbb/tbb_resource.rc @@ -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 @@ -81,7 +81,7 @@ BEGIN VALUE "CompanyName", "Intel Corporation\0" VALUE "FileDescription", "Intel(R) Threading Building Blocks library\0" VALUE "FileVersion", TBB_VERSION "\0" - VALUE "LegalCopyright", "Copyright 2005-2015 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalCopyright", "Copyright 2005-2016 Intel Corporation. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" #ifndef TBB_USE_DEBUG VALUE "OriginalFilename", "tbb.dll\0" diff --git a/src/tbb/tbb_statistics.cpp b/src/tbb/tbb_statistics.cpp index fcf366d23428083df4cf0a99b477a99dde74403b..0e28c0026c1f4b20e1fa0e1582ca38471d42f0e1 100644 --- a/src/tbb/tbb_statistics.cpp +++ b/src/tbb/tbb_statistics.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -34,14 +34,14 @@ namespace tbb { namespace internal { //! Human readable titles of statistics groups defined by statistics_groups enum. -/** The order of this vector elements must correspond to the statistics_counters +/** The order of this vector elements must correspond to the statistics_counters structure layout. **/ -const char* StatGroupTitles[] = { +const char* StatGroupTitles[] = { "task objects", "tasks executed", "stealing attempts", "task proxies", "arena", "market", "priority ops", "prio ops details" }; //! Human readable titles of statistics elements defined by statistics_counters struct. -/** The order of this vector elements must correspond to the statistics_counters +/** The order of this vector elements must correspond to the statistics_counters structure layout (with NULLs interspersed to separate groups). **/ const char* StatFieldTitles[] = { /*task objects*/ "active", "freed", "big", NULL, @@ -55,7 +55,7 @@ const char* StatFieldTitles[] = { }; //! Class for logging statistics -/** There should be only one instance of this class. +/** There should be only one instance of this class. Results are written to a file "statistics.txt" in tab-separated format. */ class statistics_logger { public: diff --git a/src/tbb/tbb_statistics.h b/src/tbb/tbb_statistics.h index 5427961c744280c433f3274bd90fc1c2d0c46b7b..9497b811872d302cf3a9965d4f5533506c4be050 100644 --- a/src/tbb/tbb_statistics.h +++ b/src/tbb/tbb_statistics.h @@ -1,5 +1,5 @@ /* - 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 @@ -24,25 +24,25 @@ /** This file defines parameters of the internal statistics collected by the TBB library (currently by the task scheduler only). - - Statistics is accumulated separately in each thread and is dumped when + + Statistics is accumulated separately in each thread and is dumped when the scheduler instance associated with the given thread is destroyed. For apps with multiple master threads or with the same master repeatedly initializing and then deinitializing task scheduler this results in TBB workers statistics getting inseparably mixed. - + Therefore statistics is accumulated in arena slots, and should be dumped when arena is destroyed. This separates statistics collected for each scheduler activity region in each master thread. - With the current RML implementation (TBB 2.2, 3.0) to avoid complete loss of - statistics data during app shutdown (because of lazy workers deinitialization - logic) set __TBB_STATISTICS_EARLY_DUMP macro to write the statistics at the - moment a master thread deinitializes its scheduler. This may happen a little + With the current RML implementation (TBB 2.2, 3.0) to avoid complete loss of + statistics data during app shutdown (because of lazy workers deinitialization + logic) set __TBB_STATISTICS_EARLY_DUMP macro to write the statistics at the + moment a master thread deinitializes its scheduler. This may happen a little earlier than the moment of arena destruction resulting in the following undesired (though usually tolerable) effects: - a few events related to unsuccessful stealing or thread pool activity may be lost, - - statistics may be substantially incomplete in case of FIFO tasks used in + - statistics may be substantially incomplete in case of FIFO tasks used in the FAF mode. Macro __TBB_STATISTICS_STDOUT and global variable __TBB_ActiveStatisticsGroups @@ -50,12 +50,12 @@ To add new counter: 1) Insert it into the appropriate group range in statistics_counters; - 2) Insert the corresponding field title into StatFieldTitles (preserving + 2) Insert the corresponding field title into StatFieldTitles (preserving relative order of the fields). To add new counters group: 1) Insert new group bit flag into statistics_groups; - 2) Insert the new group title into StatGroupTitles (preserving + 2) Insert the new group title into StatGroupTitles (preserving relative order of the groups). 3) Add counter belonging to the new group as described above **/ @@ -116,10 +116,10 @@ struct statistics_counters { typedef long counter_type; // Group: sg_task_allocation - // Counters in this group can have negative values as the tasks migrate across + // Counters in this group can have negative values as the tasks migrate across // threads while the associated counters are updated in the current thread only // to avoid data races - + //! Number of tasks allocated and not yet destroyed counter_type active_tasks; //! Number of task corpses stored for future reuse @@ -127,14 +127,14 @@ struct statistics_counters { //! Number of big tasks allocated during the run /** To find total number of tasks malloc'd, compute (big_tasks+my_small_task_count) */ counter_type big_tasks; - + // Group: sg_task_execution //! Number of tasks executed counter_type tasks_executed; //! Number of elided spawns counter_type spawns_bypassed; - + // Group: sg_stealing //! Number of tasks successfully stolen @@ -153,7 +153,7 @@ struct statistics_counters { //! Number of affinitized tasks executed by the owner /** Goes as "revoked" in statistics printout. **/ counter_type proxies_executed; - //! Number of affinitized tasks intercepted by thieves + //! Number of affinitized tasks intercepted by thieves counter_type proxies_stolen; //! Number of proxy bypasses by thieves during stealing counter_type proxies_bypassed; diff --git a/src/tbb/tbb_thread.cpp b/src/tbb/tbb_thread.cpp index 2b5f36fc39e096a4ec1d81f653904c89ecc02ace..15ab20dcf6dbc3fc63e05cb7f0b1f566b1cccee3 100644 --- a/src/tbb/tbb_thread.cpp +++ b/src/tbb/tbb_thread.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -147,7 +147,7 @@ tbb_thread_v3::id thread_get_id_v3() { return tbb_thread_v3::id( pthread_self() ); #endif // _WIN32||_WIN64 } - + void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ) { if (t1.joinable()) diff --git a/src/tbb/tbb_version.h b/src/tbb/tbb_version.h index 1c30cfc861b7e4f72b94f757df843f2a75902115..9427cd510dbbd868af556b53bf9501725d429c88 100644 --- a/src/tbb/tbb_version.h +++ b/src/tbb/tbb_version.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tls.h b/src/tbb/tls.h index 685e855e7736101c38de42a0cbc20c1da97a07c9..a180887040f703af3a4e63efdaa84f8f67d7afd5 100644 --- a/src/tbb/tls.h +++ b/src/tbb/tls.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tools_api/disable_warnings.h b/src/tbb/tools_api/disable_warnings.h index 62745a192c2d32048b67fb567b54aea13cf5c718..690041545be5a6115bf9cd850991fe8ee644d349 100644 --- a/src/tbb/tools_api/disable_warnings.h +++ b/src/tbb/tools_api/disable_warnings.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tools_api/internal/ittnotify.h b/src/tbb/tools_api/internal/ittnotify.h deleted file mode 100644 index 43317b2eb51b12144d960f5b78dca2d70220234e..0000000000000000000000000000000000000000 --- a/src/tbb/tools_api/internal/ittnotify.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - Copyright 2005-2015 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. -*/ - -#ifndef _INTERNAL_ITTNOTIFY_H_ -#define _INTERNAL_ITTNOTIFY_H_ - -/** - * @file - * @brief Internal User API functions and types - */ - -/** @cond exclude_from_documentation */ -#ifndef ITT_OS_WIN -# define ITT_OS_WIN 1 -#endif /* ITT_OS_WIN */ - -#ifndef ITT_OS_LINUX -# define ITT_OS_LINUX 2 -#endif /* ITT_OS_LINUX */ - -#ifndef ITT_OS_MAC -# define ITT_OS_MAC 3 -#endif /* ITT_OS_MAC */ - -#ifndef ITT_OS -# if defined WIN32 || defined _WIN32 -# define ITT_OS ITT_OS_WIN -# elif defined( __APPLE__ ) && defined( __MACH__ ) -# define ITT_OS ITT_OS_MAC -# else -# define ITT_OS ITT_OS_LINUX -# endif -#endif /* ITT_OS */ - -#ifndef ITT_PLATFORM_WIN -# define ITT_PLATFORM_WIN 1 -#endif /* ITT_PLATFORM_WIN */ - -#ifndef ITT_PLATFORM_POSIX -# define ITT_PLATFORM_POSIX 2 -#endif /* ITT_PLATFORM_POSIX */ - -#ifndef ITT_PLATFORM_MAC -# define ITT_PLATFORM_MAC 3 -#endif /* ITT_PLATFORM_MAC */ - -#ifndef ITT_PLATFORM -# if ITT_OS==ITT_OS_WIN -# define ITT_PLATFORM ITT_PLATFORM_WIN -# elif ITT_OS==ITT_OS_MAC -# define ITT_PLATFORM ITT_PLATFORM_MAC -# else -# define ITT_PLATFORM ITT_PLATFORM_POSIX -# endif -#endif /* ITT_PLATFORM */ - -#if defined(_UNICODE) && !defined(UNICODE) -#define UNICODE -#endif - -#include -#if ITT_PLATFORM==ITT_PLATFORM_WIN -#include -#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#include -#if defined(UNICODE) || defined(_UNICODE) -#include -#endif /* UNICODE || _UNICODE */ -#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ - -#ifndef CDECL -# if ITT_PLATFORM==ITT_PLATFORM_WIN -# define CDECL __cdecl -# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ -# define CDECL __attribute__ ((cdecl)) -# else /* _M_IX86 || __i386__ */ -# define CDECL /* actual only on x86 platform */ -# endif /* _M_IX86 || __i386__ */ -# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#endif /* CDECL */ - -#ifndef STDCALL -# if ITT_PLATFORM==ITT_PLATFORM_WIN -# define STDCALL __stdcall -# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ -# define STDCALL __attribute__ ((stdcall)) -# else /* _M_IX86 || __i386__ */ -# define STDCALL /* supported only on x86 platform */ -# endif /* _M_IX86 || __i386__ */ -# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#endif /* STDCALL */ - -#define ITTAPI CDECL -#define LIBITTAPI CDECL - -/* TODO: Temporary for compatibility! */ -#define ITTAPI_CALL CDECL -#define LIBITTAPI_CALL CDECL - -#if ITT_PLATFORM==ITT_PLATFORM_WIN -/* use __forceinline (VC++ specific) */ -#define ITT_INLINE __forceinline -#define ITT_INLINE_ATTRIBUTE /* nothing */ -#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -/* - * Generally, functions are not inlined unless optimization is specified. - * For functions declared inline, this attribute inlines the function even - * if no optimization level was specified. - */ -#ifdef __STRICT_ANSI__ -#define ITT_INLINE static -#else /* __STRICT_ANSI__ */ -#define ITT_INLINE static inline -#endif /* __STRICT_ANSI__ */ -#define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) -#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -/** @endcond */ - -/** @cond exclude_from_documentation */ -/* Helper macro for joining tokens */ -#define ITT_JOIN_AUX(p,n) p##n -#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) - -#ifdef ITT_MAJOR -#undef ITT_MAJOR -#endif -#ifdef ITT_MINOR -#undef ITT_MINOR -#endif -#define ITT_MAJOR 3 -#define ITT_MINOR 0 - -/* Standard versioning of a token with major and minor version numbers */ -#define ITT_VERSIONIZE(x) \ - ITT_JOIN(x, \ - ITT_JOIN(_, \ - ITT_JOIN(ITT_MAJOR, \ - ITT_JOIN(_, ITT_MINOR)))) - -#ifndef INTEL_ITTNOTIFY_PREFIX -# define INTEL_ITTNOTIFY_PREFIX __itt_ -#endif /* INTEL_ITTNOTIFY_PREFIX */ -#ifndef INTEL_ITTNOTIFY_POSTFIX -# define INTEL_ITTNOTIFY_POSTFIX _ptr_ -#endif /* INTEL_ITTNOTIFY_POSTFIX */ - -#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) -#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) - -#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) -#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) - -#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) -#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) -#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) -#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) -#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) -#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) -#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) -#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) -#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) -#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) -#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) -#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) -#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) -#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) - -#ifdef ITT_STUB -#undef ITT_STUB -#endif -#ifdef ITT_STUBV -#undef ITT_STUBV -#endif -#define ITT_STUBV(api,type,name,args) \ - typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ - extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); -#define ITT_STUB ITT_STUBV -/** @endcond */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define INTEL_ITTNOTIFY_API_PRIVATE -#include "../ittnotify.h" - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _INTERNAL_ITTNOTIFY_H_ */ diff --git a/src/tbb/tools_api/ittnotify.h b/src/tbb/tools_api/ittnotify.h index d6db08fffcf7fb2e77e353b8e32d5d1b508e7a99..f0da2a67fb88e8d3a0255fa6abc4a95496e27ce4 100644 --- a/src/tbb/tools_api/ittnotify.h +++ b/src/tbb/tools_api/ittnotify.h @@ -1,5 +1,5 @@ /* - 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 @@ -29,8 +29,7 @@ The ITT API is used to annotate a user's program with additional information that can be used by correctness and performance tools. The user inserts calls in their program. Those calls generate information that is collected -at runtime, and used by tools such as Intel(R) Parallel Amplifier and -Intel(R) Parallel Inspector. +at runtime, and used by Intel(R) Threading Tools. @section API Concepts The following general concepts are used throughout the API. @@ -101,11 +100,17 @@ The same ID may not be reused for different instances, unless a previous # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ +#ifndef ITT_OS_FREEBSD +# define ITT_OS_FREEBSD 4 +#endif /* ITT_OS_FREEBSD */ + #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC +# elif defined( __FreeBSD__ ) +# define ITT_OS ITT_OS_FREEBSD # else # define ITT_OS ITT_OS_LINUX # endif @@ -123,11 +128,17 @@ The same ID may not be reused for different instances, unless a previous # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ +#ifndef ITT_PLATFORM_FREEBSD +# define ITT_PLATFORM_FREEBSD 4 +#endif /* ITT_PLATFORM_FREEBSD */ + #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC +# elif ITT_OS==ITT_OS_FREEBSD +# define ITT_PLATFORM ITT_PLATFORM_FREEBSD # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif @@ -151,7 +162,7 @@ The same ID may not be reused for different instances, unless a previous # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ +# if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ @@ -164,7 +175,7 @@ The same ID may not be reused for different instances, unless a previous # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ -# define STDCALL __attribute__ ((stdcall)) +# define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ @@ -189,11 +200,12 @@ The same ID may not be reused for different instances, unless a previous * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ -#define ITT_INLINE static inline +#define ITT_INLINE static +#define ITT_INLINE_ATTRIBUTE __attribute__((unused)) #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline +#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused)) #endif /* __STRICT_ANSI__ */ -#define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ @@ -304,25 +316,33 @@ extern "C" { void ITTAPI __itt_pause(void); /** @brief Resume collection */ void ITTAPI __itt_resume(void); +/** @brief Detach collection */ +void ITTAPI __itt_detach(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, pause, (void)) ITT_STUBV(ITTAPI, void, resume, (void)) +ITT_STUBV(ITTAPI, void, detach, (void)) #define __itt_pause ITTNOTIFY_VOID(pause) #define __itt_pause_ptr ITTNOTIFY_NAME(pause) #define __itt_resume ITTNOTIFY_VOID(resume) #define __itt_resume_ptr ITTNOTIFY_NAME(resume) +#define __itt_detach ITTNOTIFY_VOID(detach) +#define __itt_detach_ptr ITTNOTIFY_NAME(detach) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_pause() #define __itt_pause_ptr 0 #define __itt_resume() #define __itt_resume_ptr 0 +#define __itt_detach() +#define __itt_detach_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_pause_ptr 0 #define __itt_resume_ptr 0 +#define __itt_detach_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} control group */ @@ -427,19 +447,19 @@ ITT_STUBV(ITTAPI, void, thread_ignore, (void)) *********************************************************************/ /** @{ */ /** - * @hideinitializer + * @hideinitializer * @brief possible value for suppression mask */ #define __itt_suppress_all_errors 0x7fffffff /** - * @hideinitializer + * @hideinitializer * @brief possible value for suppression mask (suppresses errors from threading analysis) */ #define __itt_suppress_threading_errors 0x000000ff /** - * @hideinitializer + * @hideinitializer * @brief possible value for suppression mask (suppresses errors from memory analysis) */ #define __itt_suppress_memory_errors 0x0000ff00 @@ -465,7 +485,7 @@ ITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask)) /** @endcond */ /** - * @brief Undo the effects of the matching call to __itt_suppress_push + * @brief Undo the effects of the matching call to __itt_suppress_push */ void ITTAPI __itt_suppress_pop(void); @@ -1595,13 +1615,13 @@ ITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void)) * @brief Specify the type of heap detection/reporting to modify. */ /** - * @hideinitializer + * @hideinitializer * @brief Report on memory leaks. */ #define __itt_heap_leaks 0x00000001 /** - * @hideinitializer + * @hideinitializer * @brief Report on memory growth. */ #define __itt_heap_growth 0x00000002 @@ -1678,7 +1698,7 @@ typedef struct ___itt_domain * @ingroup domains * @brief Create a domain. * Create domain using some domain name: the URI naming style is recommended. - * Because the set of domains is expected to be static over the application's + * Because the set of domains is expected to be static over the application's * execution time, there is no mechanism to destroy a domain. * Any domain can be accessed by any thread in the process, regardless of * which thread created the domain. This call is thread-safe. @@ -1762,7 +1782,7 @@ static const __itt_id __itt_null = { 0, 0, 0 }; * @ingroup ids * @brief A convenience function is provided to create an ID without domain control. * @brief This is a convenience function to initialize an __itt_id structure. This function - * does not affect the trace collector runtime in any way. After you make the ID with this + * does not affect the collector runtime in any way. After you make the ID with this * function, you still must create it with the __itt_id_create function before using the ID * to identify a named entity. * @param[in] addr The address of object; high QWORD of the ID value. @@ -1813,7 +1833,7 @@ ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id)) * @brief Destroy an instance of identifier. * This ends the lifetime of the current instance of the given ID value in the trace. * Any relationships that are established after this lifetime ends are invalid. - * This call must be performed before the given ID value can be reused for a different + * This call must be performed before the given ID value can be reused for a different * named entity instance. * @param[in] domain The domain controlling the execution of this call. * @param[in] id The ID to destroy. @@ -1931,7 +1951,7 @@ ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *na typedef unsigned long long __itt_timestamp; /** @endcond */ -static const __itt_timestamp __itt_timestamp_none = (__itt_timestamp)-1LL; +#define __itt_timestamp_none ((__itt_timestamp)-1LL) /** @cond exclude_from_gpa_documentation */ @@ -2170,18 +2190,42 @@ void ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __i */ void ITTAPI __itt_task_end(const __itt_domain *domain); +/** + * @ingroup tasks + * @brief Begin an overlapped task instance. + * @param[in] domain The domain for this task. + * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. + * @param[in] parentid The parent of this task, or __itt_null. + * @param[in] name The name of this task. + */ +void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); + +/** + * @ingroup tasks + * @brief End an overlapped task instance. + * @param[in] domain The domain for this task + * @param[in] taskid Explicit ID of finished task + */ +void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid); + /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn)) ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain)) +ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid)) #define __itt_task_begin(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin,d,x,y,z) #define __itt_task_begin_ptr ITTNOTIFY_NAME(task_begin) #define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z) #define __itt_task_begin_fn_ptr ITTNOTIFY_NAME(task_begin_fn) #define __itt_task_end(d) ITTNOTIFY_VOID_D0(task_end,d) #define __itt_task_end_ptr ITTNOTIFY_NAME(task_end) +#define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z) +#define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped) +#define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x) +#define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_task_begin(domain,id,parentid,name) #define __itt_task_begin_ptr 0 @@ -2189,11 +2233,17 @@ ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain)) #define __itt_task_begin_fn_ptr 0 #define __itt_task_end(domain) #define __itt_task_end_ptr 0 +#define __itt_task_begin_overlapped(domain,taskid,parentid,name) +#define __itt_task_begin_overlapped_ptr 0 +#define __itt_task_end_overlapped(domain,taskid) +#define __itt_task_end_overlapped_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_task_begin_ptr 0 #define __itt_task_begin_fn_ptr 0 #define __itt_task_end_ptr 0 +#define __itt_task_begin_overlapped_ptr 0 +#define __itt_task_end_overlapped_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} tasks group */ @@ -2372,7 +2422,7 @@ ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task * @param[in] key The name of the metadata * @param[in] data The metadata itself - * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated + * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); @@ -2408,9 +2458,9 @@ ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN -#define __itt_metadata_str_addA(d,x,y,z,a) +#define __itt_metadata_str_addA(d,x,y,z,a) #define __itt_metadata_str_addA_ptr 0 -#define __itt_metadata_str_addW(d,x,y,z,a) +#define __itt_metadata_str_addW(d,x,y,z,a) #define __itt_metadata_str_addW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add(d,x,y,z,a) @@ -2434,7 +2484,7 @@ ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id * @param[in] scope The scope of the instance to which the metadata is to be added * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task - + * @param[in] key The name of the metadata * @param[in] type The type of the metadata * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. @@ -2467,7 +2517,7 @@ ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __ * @param[in] key The name of the metadata * @param[in] data The metadata itself - * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated + * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); @@ -2503,9 +2553,9 @@ ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN -#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) #define __itt_metadata_str_add_with_scopeA_ptr 0 -#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) #define __itt_metadata_str_add_with_scopeW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add_with_scope(d,x,y,z,a) @@ -3091,9 +3141,9 @@ ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) /** * @enum __itt_av_data_type - * @brief Defines types of arrays data (for C/C++ intrinsic types) + * @brief Defines types of arrays data (for C/C++ intrinsic types) */ -typedef enum +typedef enum { __itt_e_first = 0, __itt_e_char = 0, /* 1-byte integer */ @@ -3113,8 +3163,8 @@ typedef enum * @brief Save an array data to a file. * Output format is defined by the file extension. The csv and bmp formats are supported (bmp - for 2-dimensional array only). * @param[in] data - pointer to the array data - * @param[in] rank - the rank of the array - * @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions. + * @param[in] rank - the rank of the array + * @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions. * The size of dimensions must be equal to the rank * @param[in] type - the type of the array, specified as one of the __itt_av_data_type values (for intrinsic types) * @param[in] filePath - the file path; the output format is defined by the file extension @@ -3214,16 +3264,6 @@ ITT_STUBV(ITTAPI, void, enable_attach, (void)) extern "C" { #endif /* __cplusplus */ -/** - * @ingroup tasks - * @brief Begin an overlapped task instance. - * @param[in] domain The domain for this task. - * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. - * @param[in] parentid The parent of this task, or __itt_null. - * @param[in] name The name of this task. - */ -void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); - /** * @ingroup clockdomain * @brief Begin an overlapped task instance. @@ -3236,14 +3276,6 @@ void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id tas */ void ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); -/** - * @ingroup tasks - * @brief End an overlapped task instance. - * @param[in] domain The domain for this task - * @param[in] taskid Explicit ID of finished task - */ -void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid); - /** * @ingroup clockdomain * @brief End an overlapped task instance. @@ -3257,30 +3289,19 @@ void ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API -ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name)) -ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid)) ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid)) -#define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z) -#define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped) #define __itt_task_begin_overlapped_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b) #define __itt_task_begin_overlapped_ex_ptr ITTNOTIFY_NAME(task_begin_overlapped_ex) -#define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x) -#define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped) #define __itt_task_end_overlapped_ex(d,x,y,z) ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z) #define __itt_task_end_overlapped_ex_ptr ITTNOTIFY_NAME(task_end_overlapped_ex) #else /* INTEL_NO_ITTNOTIFY_API */ -#define __itt_task_begin_overlapped(domain,taskid,parentid,name) -#define __itt_task_begin_overlapped_ptr 0 #define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name) #define __itt_task_begin_overlapped_ex_ptr 0 -#define __itt_task_end_overlapped(domain,taskid) -#define __itt_task_end_overlapped_ptr 0 #define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid) #define __itt_task_end_overlapped_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ -#define __itt_task_begin_overlapped_ptr 0 #define __itt_task_begin_overlapped_ex_ptr 0 #define __itt_task_end_overlapped_ptr 0 #define __itt_task_end_overlapped_ex_ptr 0 diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h index 3cdf4a66fe4f1f6a9c5363629c50af520494367f..8863125580e0b020767cb89303f3b5914a9a79c2 100644 --- a/src/tbb/tools_api/ittnotify_config.h +++ b/src/tbb/tools_api/ittnotify_config.h @@ -1,5 +1,5 @@ /* - 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 @@ -34,11 +34,17 @@ # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ +#ifndef ITT_OS_FREEBSD +# define ITT_OS_FREEBSD 4 +#endif /* ITT_OS_FREEBSD */ + #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC +# elif defined( __FreeBSD__ ) +# define ITT_OS ITT_OS_FREEBSD # else # define ITT_OS ITT_OS_LINUX # endif @@ -56,11 +62,17 @@ # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ +#ifndef ITT_PLATFORM_FREEBSD +# define ITT_PLATFORM_FREEBSD 4 +#endif /* ITT_PLATFORM_FREEBSD */ + #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC +# elif ITT_OS==ITT_OS_FREEBSD +# define ITT_PLATFORM ITT_PLATFORM_FREEBSD # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif @@ -84,7 +96,7 @@ # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ +# if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ @@ -97,7 +109,7 @@ # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ -# define STDCALL __attribute__ ((stdcall)) +# define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ @@ -122,11 +134,12 @@ * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ -#define ITT_INLINE static inline +#define ITT_INLINE static +#define ITT_INLINE_ATTRIBUTE __attribute__((unused)) #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline +#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused)) #endif /* __STRICT_ANSI__ */ -#define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ @@ -142,6 +155,10 @@ # define ITT_ARCH_ARM 4 #endif /* ITT_ARCH_ARM */ +#ifndef ITT_ARCH_PPC64 +# define ITT_ARCH_PPC64 5 +#endif /* ITT_ARCH_PPC64 */ + #ifndef ITT_ARCH # if defined _M_IX86 || defined __i386__ # define ITT_ARCH ITT_ARCH_IA32 @@ -151,13 +168,19 @@ # define ITT_ARCH ITT_ARCH_IA64 # elif defined _M_ARM || __arm__ # define ITT_ARCH ITT_ARCH_ARM +# elif defined __powerpc64__ +# define ITT_ARCH ITT_ARCH_PPC64 # endif #endif #ifdef __cplusplus # define ITT_EXTERN_C extern "C" +# define ITT_EXTERN_C_BEGIN extern "C" { +# define ITT_EXTERN_C_END } #else # define ITT_EXTERN_C /* nothing */ +# define ITT_EXTERN_C_BEGIN /* nothing */ +# define ITT_EXTERN_C_END /* nothing */ #endif /* __cplusplus */ #define ITT_TO_STR_AUX(x) #x @@ -220,8 +243,8 @@ typedef pthread_mutex_t mutex_t; #define __itt_unload_lib(handle) FreeLibrary(handle) #define __itt_system_error() (int)GetLastError() #define __itt_fstrcmp(s1, s2) lstrcmpA(s1, s2) -#define __itt_fstrlen(s) lstrlenA(s) -#define __itt_fstrcpyn(s1, s2, l) lstrcpynA(s1, s2, l) +#define __itt_fstrnlen(s, l) strnlen_s(s, l) +#define __itt_fstrcpyn(s1, b, s2, l) strncpy_s(s1, b, s2, l) #define __itt_fstrdup(s) _strdup(s) #define __itt_thread_id() GetCurrentThreadId() #define __itt_thread_yield() SwitchToThread() @@ -261,8 +284,19 @@ ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) #define __itt_unload_lib(handle) dlclose(handle) #define __itt_system_error() errno #define __itt_fstrcmp(s1, s2) strcmp(s1, s2) -#define __itt_fstrlen(s) strlen(s) -#define __itt_fstrcpyn(s1, s2, l) strncpy(s1, s2, l) + +/* makes customer code define safe APIs for SDL_STRNLEN_S and SDL_STRNCPY_S */ +#ifdef SDL_STRNLEN_S +#define __itt_fstrnlen(s, l) SDL_STRNLEN_S(s, l) +#else +#define __itt_fstrnlen(s, l) strlen(s) +#endif /* SDL_STRNLEN_S */ +#ifdef SDL_STRNCPY_S +#define __itt_fstrcpyn(s1, b, s2, l) SDL_STRNCPY_S(s1, b, s2, l) +#else +#define __itt_fstrcpyn(s1, b, s2, l) strncpy(s1, s2, l) +#endif /* SDL_STRNCPY_S */ + #define __itt_fstrdup(s) strdup(s) #define __itt_thread_id() pthread_self() #define __itt_thread_yield() sched_yield() @@ -284,7 +318,7 @@ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) : "memory"); return result; } -#elif ITT_ARCH==ITT_ARCH_ARM +#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64 #define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val) #endif /* ITT_ARCH==ITT_ARCH_IA64 */ #ifndef ITT_SIMPLE_INIT @@ -407,7 +441,7 @@ typedef struct ___itt_global #define NEW_DOMAIN_W(gptr,h,h_tail,name) { \ h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ if (h != NULL) { \ - h->flags = 0; /* domain is disabled by default */ \ + h->flags = 1; /* domain is enabled by default */ \ h->nameA = NULL; \ h->nameW = name ? _wcsdup(name) : NULL; \ h->extra1 = 0; /* reserved */ \ @@ -423,7 +457,7 @@ typedef struct ___itt_global #define NEW_DOMAIN_A(gptr,h,h_tail,name) { \ h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ if (h != NULL) { \ - h->flags = 0; /* domain is disabled by default */ \ + h->flags = 1; /* domain is enabled by default */ \ h->nameA = name ? __itt_fstrdup(name) : NULL; \ h->nameW = NULL; \ h->extra1 = 0; /* reserved */ \ diff --git a/src/tbb/tools_api/ittnotify_static.c b/src/tbb/tools_api/ittnotify_static.c index 1d1af20df51bc43fd53dfb8c0728d2e032bd60cf..5a611491917a813f935950a77e478f6780f58c60 100644 --- a/src/tbb/tools_api/ittnotify_static.c +++ b/src/tbb/tools_api/ittnotify_static.c @@ -1,5 +1,5 @@ /* - 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 @@ -39,13 +39,13 @@ #include "disable_warnings.h" -static const char api_version[] = API_VERSION "\0\n@(#) $Revision: 336044 $\n"; +static const char api_version[] = API_VERSION "\0\n@(#) $Revision: 413915 $\n"; #define _N_(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #if ITT_OS==ITT_OS_WIN static const char* ittnotify_lib_name = "libittnotify.dll"; -#elif ITT_OS==ITT_OS_LINUX +#elif ITT_OS==ITT_OS_LINUX || ITT_OS==ITT_OS_FREEBSD static const char* ittnotify_lib_name = "libittnotify.so"; #elif ITT_OS==ITT_OS_MAC static const char* ittnotify_lib_name = "libittnotify.dylib"; @@ -76,7 +76,15 @@ static const char* ittnotify_lib_name = "libittnotify.dylib"; #endif /* default location of userapi collector on Android */ -#define ANDROID_ITTNOTIFY_DEFAULT_PATH "/data/data/com.intel.vtune/intel/libittnotify.so" +#define ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(x) "/data/data/com.intel.vtune/perfrun/lib" \ + #x "/runtime/libittnotify.so" + +#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM +#define ANDROID_ITTNOTIFY_DEFAULT_PATH ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(32) +#else +#define ANDROID_ITTNOTIFY_DEFAULT_PATH ANDROID_ITTNOTIFY_DEFAULT_PATH_MASK(64) +#endif + #endif @@ -129,7 +137,7 @@ static __itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib); #define ITT_STUB(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ -ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ +ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ { \ __itt_init_ittlib_name(NULL, __itt_group_all); \ @@ -142,7 +150,7 @@ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ #define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ -ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ +ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ { \ __itt_init_ittlib_name(NULL, __itt_group_all); \ @@ -160,12 +168,12 @@ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ #define ITT_STUB(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ -ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } +ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END #define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ -ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } +ITT_EXTERN_C_BEGIN ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); ITT_EXTERN_C_END #define __ITT_INTERNAL_INIT #include "ittnotify_static.h" @@ -217,48 +225,6 @@ static __itt_api_info api_list[] = { #pragma warning(pop) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -/* private, init thread info item. used for internal purposes */ -static __itt_thread_info init_thread_info = { - (const char*)NULL, /* nameA */ -#if defined(UNICODE) || defined(_UNICODE) - (const wchar_t*)NULL, /* nameW */ -#else - (void*)NULL, /* nameW */ -#endif - 0, /* tid */ - __itt_thread_normal, /* state */ - 0, /* extra1 */ - (void*)NULL, /* extra2 */ - (__itt_thread_info*)NULL /* next */ -}; - -/* private, NULL domain item. used for internal purposes */ -static __itt_domain null_domain = { - 0, /* flags: disabled by default */ - (const char*)NULL, /* nameA */ -#if defined(UNICODE) || defined(_UNICODE) - (const wchar_t*)NULL, /* nameW */ -#else - (void*)NULL, /* nameW */ -#endif - 0, /* extra1 */ - (void*)NULL, /* extra2 */ - (__itt_domain*)NULL /* next */ -}; - -/* private, NULL string handle item. used for internal purposes */ -static __itt_string_handle null_string_handle = { - (const char*)NULL, /* strA */ -#if defined(UNICODE) || defined(_UNICODE) - (const wchar_t*)NULL, /* strW */ -#else - (void*)NULL, /* strW */ -#endif - 0, /* extra1 */ - (void*)NULL, /* extra2 */ - (__itt_string_handle*)NULL /* next */ -}; - static const char dll_path[PATH_MAX] = { 0 }; /* static part descriptor which handles. all notification api attributes. */ @@ -274,9 +240,9 @@ __itt_global _N_(_ittapi_global) = { (const char**)&dll_path, /* dll_path_ptr */ (__itt_api_info*)&api_list, /* api_list_ptr */ NULL, /* next __itt_global */ - (__itt_thread_info*)&init_thread_info, /* thread_list */ - (__itt_domain*)&null_domain, /* domain_list */ - (__itt_string_handle*)&null_string_handle, /* string_list */ + NULL, /* thread_list */ + NULL, /* domain_list */ + NULL, /* string_list */ __itt_collection_normal /* collection state */ }; @@ -316,23 +282,28 @@ static void __itt_report_error(__itt_error_code code, ...) #if ITT_PLATFORM==ITT_PLATFORM_WIN static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))(const wchar_t* name) { - __itt_domain *h_tail, *h; + __itt_domain *h_tail = NULL, *h = NULL; - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (name == NULL) { - __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))) - return ITTNOTIFY_NAME(domain_createW)(name); + return NULL; } - if (name == NULL) - return _N_(_ittapi_global).domain_list; - ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); + if (_N_(_ittapi_global).api_initialized) + { + if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return ITTNOTIFY_NAME(domain_createW)(name); + } + } for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) - if (h->nameW != NULL && !wcscmp(h->nameW, name)) - break; - if (h == NULL) { + { + if (h->nameW != NULL && !wcscmp(h->nameW, name)) break; + } + if (h == NULL) + { NEW_DOMAIN_W(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); @@ -344,28 +315,36 @@ static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))( static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { - __itt_domain *h_tail, *h; + __itt_domain *h_tail = NULL, *h = NULL; - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (name == NULL) + { + return NULL; + } + + ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); + if (_N_(_ittapi_global).api_initialized) { - __itt_init_ittlib_name(NULL, __itt_group_all); #if ITT_PLATFORM==ITT_PLATFORM_WIN if (ITTNOTIFY_NAME(domain_createA) && ITTNOTIFY_NAME(domain_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(domain_createA)(name); + } #else if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(domain_create)(name); + } #endif } - - if (name == NULL) - return _N_(_ittapi_global).domain_list; - - ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) - if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) - break; - if (h == NULL) { + { + if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) break; + } + if (h == NULL) + { NEW_DOMAIN_A(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); @@ -375,23 +354,28 @@ static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(c #if ITT_PLATFORM==ITT_PLATFORM_WIN static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))(const wchar_t* name) { - __itt_string_handle *h_tail, *h; + __itt_string_handle *h_tail = NULL, *h = NULL; - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (name == NULL) { - __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))) - return ITTNOTIFY_NAME(string_handle_createW)(name); + return NULL; } - if (name == NULL) - return _N_(_ittapi_global).string_list; - ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); + if (_N_(_ittapi_global).api_initialized) + { + if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); + return ITTNOTIFY_NAME(string_handle_createW)(name); + } + } for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) - if (h->strW != NULL && !wcscmp(h->strW, name)) - break; - if (h == NULL) { + { + if (h->strW != NULL && !wcscmp(h->strW, name)) break; + } + if (h == NULL) + { NEW_STRING_HANDLE_W(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); @@ -403,28 +387,36 @@ static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_cre static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { - __itt_string_handle *h_tail, *h; + __itt_string_handle *h_tail = NULL, *h = NULL; - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (name == NULL) + { + return NULL; + } + + ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); + if (_N_(_ittapi_global).api_initialized) { - __itt_init_ittlib_name(NULL, __itt_group_all); #if ITT_PLATFORM==ITT_PLATFORM_WIN if (ITTNOTIFY_NAME(string_handle_createA) && ITTNOTIFY_NAME(string_handle_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(string_handle_createA)(name); + } #else if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))) + { + __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return ITTNOTIFY_NAME(string_handle_create)(name); + } #endif } - - if (name == NULL) - return _N_(_ittapi_global).string_list; - - ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) - if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) - break; - if (h == NULL) { + { + if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) break; + } + if (h == NULL) + { NEW_STRING_HANDLE_A(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); @@ -435,65 +427,52 @@ static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_cre static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))(void) { - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) { __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))) - { - ITTNOTIFY_NAME(pause)(); - return; - } } - _N_(_ittapi_global).state = __itt_collection_paused; + if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))) + { + ITTNOTIFY_NAME(pause)(); + } + else + { + _N_(_ittapi_global).state = __itt_collection_paused; + } } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))(void) { - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) { __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))) - { - ITTNOTIFY_NAME(resume)(); - return; - } } - _N_(_ittapi_global).state = __itt_collection_normal; + if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))) + { + ITTNOTIFY_NAME(resume)(); + } + else + { + _N_(_ittapi_global).state = __itt_collection_normal; + } } #if ITT_PLATFORM==ITT_PLATFORM_WIN static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(const wchar_t* name) { - TIDT tid = __itt_thread_id(); - __itt_thread_info *h_tail, *h; - - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) { __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))) - { - ITTNOTIFY_NAME(thread_set_nameW)(name); - return; - } - } - - __itt_mutex_lock(&_N_(_ittapi_global).mutex); - for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) - if (h->tid == tid) - break; - if (h == NULL) { - NEW_THREAD_INFO_W(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_normal, name); } - else + if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))) { - h->nameW = name ? _wcsdup(name) : NULL; + ITTNOTIFY_NAME(thread_set_nameW)(name); } - __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setW),_init))(const wchar_t* name, int namelen) { - namelen = namelen; + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name); return 0; } @@ -503,51 +482,34 @@ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(const c static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { - TIDT tid = __itt_thread_id(); - __itt_thread_info *h_tail, *h; - - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) { __itt_init_ittlib_name(NULL, __itt_group_all); -#if ITT_PLATFORM==ITT_PLATFORM_WIN - if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))) - { - ITTNOTIFY_NAME(thread_set_nameA)(name); - return; - } -#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ - if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))) - { - ITTNOTIFY_NAME(thread_set_name)(name); - return; - } -#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ } - - __itt_mutex_lock(&_N_(_ittapi_global).mutex); - for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) - if (h->tid == tid) - break; - if (h == NULL) { - NEW_THREAD_INFO_A(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_normal, name); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))) + { + ITTNOTIFY_NAME(thread_set_nameA)(name); } - else +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))) { - h->nameA = name ? __itt_fstrdup(name) : NULL; + ITTNOTIFY_NAME(thread_set_name)(name); } - __itt_mutex_unlock(&_N_(_ittapi_global).mutex); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ } #if ITT_PLATFORM==ITT_PLATFORM_WIN static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setA),_init))(const char* name, int namelen) { - namelen = namelen; + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name); return 0; } #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen) { + (void)namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name); return 0; } @@ -555,32 +517,14 @@ static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(void) { - TIDT tid = __itt_thread_id(); - __itt_thread_info *h_tail, *h; - - if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) + if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list == NULL) { __itt_init_ittlib_name(NULL, __itt_group_all); - if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))) - { - ITTNOTIFY_NAME(thread_ignore)(); - return; - } } - - __itt_mutex_lock(&_N_(_ittapi_global).mutex); - for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) - if (h->tid == tid) - break; - if (h == NULL) { - static const char* name = "unknown"; - NEW_THREAD_INFO_A(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_ignored, name); - } - else + if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))) { - h->state = __itt_thread_ignored; + ITTNOTIFY_NAME(thread_ignore)(); } - __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_ignore),_init))(void) @@ -697,12 +641,12 @@ static const char* __itt_get_env_var(const char* name) char* env = getenv(name); if (env != NULL) { - size_t len = strlen(env); + size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE); size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff); if (len < max_len) { const char* ret = (const char*)env_value; - strncpy(env_value, env, len + 1); + __itt_fstrcpyn(env_value, max_len, env, len + 1); env_value += len + 1; return ret; } else @@ -720,10 +664,25 @@ static const char* __itt_get_lib_name(void) #ifdef __ANDROID__ if (lib_name == NULL) { - const char* const system_wide_marker_filename = "/data/local/tmp/com.intel.itt.collector_lib"; - int itt_marker_file_fd = open(system_wide_marker_filename, O_RDONLY); + +#if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM + const char* const marker_filename = "com.intel.itt.collector_lib_32"; +#else + const char* const marker_filename = "com.intel.itt.collector_lib_64"; +#endif + + char system_wide_marker_filename[PATH_MAX] = {0}; + int itt_marker_file_fd = -1; ssize_t res = 0; + res = snprintf(system_wide_marker_filename, PATH_MAX - 1, "%s%s", "/data/local/tmp/", marker_filename); + if (res < 0) + { + ITT_ANDROID_LOGE("Unable to concatenate marker file string."); + return lib_name; + } + itt_marker_file_fd = open(system_wide_marker_filename, O_RDONLY); + if (itt_marker_file_fd == -1) { const pid_t my_pid = getpid(); @@ -733,7 +692,13 @@ static const char* __itt_get_lib_name(void) int cmdline_fd = 0; ITT_ANDROID_LOGI("Unable to open system-wide marker file."); - snprintf(cmdline_path, PATH_MAX - 1, "/proc/%d/cmdline", my_pid); + res = snprintf(cmdline_path, PATH_MAX - 1, "/proc/%d/cmdline", my_pid); + if (res < 0) + { + ITT_ANDROID_LOGE("Unable to get cmdline path string."); + return lib_name; + } + ITT_ANDROID_LOGI("CMD file: %s\n", cmdline_path); cmdline_fd = open(cmdline_path, O_RDONLY); if (cmdline_fd == -1) @@ -759,7 +724,13 @@ static const char* __itt_get_lib_name(void) return lib_name; } ITT_ANDROID_LOGI("Package name: %s\n", package_name); - snprintf(app_sandbox_file, PATH_MAX - 1, "/data/data/%s/com.intel.itt.collector_lib", package_name); + res = snprintf(app_sandbox_file, PATH_MAX - 1, "/data/data/%s/%s", package_name, marker_filename); + if (res < 0) + { + ITT_ANDROID_LOGE("Unable to concatenate marker file string."); + return lib_name; + } + ITT_ANDROID_LOGI("Lib marker file name: %s\n", app_sandbox_file); itt_marker_file_fd = open(app_sandbox_file, O_RDONLY); if (itt_marker_file_fd == -1) @@ -790,7 +761,7 @@ static const char* __itt_get_lib_name(void) ITT_ANDROID_LOGE("Unable to close %s file!", itt_marker_file_fd); return lib_name; } - ITT_ANDROID_LOGI("Set env"); + ITT_ANDROID_LOGI("Set env %s to %s", ITT_TO_STR(LIB_VAR_NAME), itt_lib_name); res = setenv(ITT_TO_STR(LIB_VAR_NAME), itt_lib_name, 0); if (res == -1) { @@ -798,7 +769,7 @@ static const char* __itt_get_lib_name(void) return lib_name; } lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME)); - ITT_ANDROID_LOGI("ITT Lib path from env: %s", itt_lib_name); + ITT_ANDROID_LOGI("ITT Lib path from env: %s", lib_name); } } #endif @@ -806,12 +777,13 @@ static const char* __itt_get_lib_name(void) return lib_name; } -/* Avoid clashes with std::min */ -#define __itt_min(a,b) (a) < (b) ? (a) : (b) +#ifndef min +#define min(a,b) (a) < (b) ? (a) : (b) +#endif /* min */ static __itt_group_id __itt_get_groups(void) { - int i; + register int i; __itt_group_id res = __itt_group_none; const char* var_name = "INTEL_ITTNOTIFY_GROUPS"; const char* group_str = __itt_get_env_var(var_name); @@ -823,8 +795,8 @@ static __itt_group_id __itt_get_groups(void) const char* chunk; while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != NULL) { - __itt_fstrcpyn(gr, chunk, sizeof(gr) - 1); - gr[__itt_min(len, (int)(sizeof(gr) - 1))] = 0; + __itt_fstrcpyn(gr, sizeof(gr) - 1, chunk, len + 1); + gr[min(len, (int)(sizeof(gr) - 1))] = 0; for (i = 0; group_list[i].name != NULL; i++) { @@ -878,7 +850,7 @@ static void __itt_reinit_all_pointers(void) static void __itt_nullify_all_pointers(void) { - int i; + register int i; /* Nulify all pointers except domain_create and string_handle_create */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; @@ -892,7 +864,7 @@ static void __itt_nullify_all_pointers(void) ITT_EXTERN_C void _N_(fini_ittlib)(void) { - __itt_api_fini_t* __itt_api_fini_ptr; + __itt_api_fini_t* __itt_api_fini_ptr = NULL; static volatile TIDT current_thread = 0; if (_N_(_ittapi_global).api_initialized) @@ -903,13 +875,16 @@ ITT_EXTERN_C void _N_(fini_ittlib)(void) if (current_thread == 0) { current_thread = __itt_thread_id(); - if (_N_(_ittapi_global).lib) { + if (_N_(_ittapi_global).lib != NULL) + { __itt_api_fini_ptr = (__itt_api_fini_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_fini"); - if (__itt_api_fini_ptr) - __itt_api_fini_ptr(&_N_(_ittapi_global)); - - __itt_nullify_all_pointers(); } + if (__itt_api_fini_ptr) + { + __itt_api_fini_ptr(&_N_(_ittapi_global)); + } + + __itt_nullify_all_pointers(); /* TODO: !!! not safe !!! don't support unload so far. * if (_N_(_ittapi_global).lib != NULL) @@ -926,7 +901,7 @@ ITT_EXTERN_C void _N_(fini_ittlib)(void) ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups) { - int i; + register int i; __itt_group_id groups; #ifdef ITT_COMPLETE_GROUP __itt_group_id zero_group = __itt_group_none; @@ -944,9 +919,10 @@ ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_grou if (current_thread == 0) { current_thread = __itt_thread_id(); - _N_(_ittapi_global).thread_list->tid = current_thread; if (lib_name == NULL) + { lib_name = __itt_get_lib_name(); + } groups = __itt_get_groups(); if (groups != __itt_group_none || lib_name != NULL) { @@ -1041,9 +1017,13 @@ ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_grou /* Evaluating if any function ptr is non empty and it's in init_groups */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) + { if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func && _N_(_ittapi_global).api_list_ptr[i].group & init_groups) + { return 1; + } + } return 0; } diff --git a/src/tbb/tools_api/ittnotify_static.h b/src/tbb/tools_api/ittnotify_static.h index c46e45ae81a58b33c52f27ccb4ab2e43ff039816..7728240bf156a47f9e830ccbb514b37cadb4050c 100644 --- a/src/tbb/tools_api/ittnotify_static.h +++ b/src/tbb/tools_api/ittnotify_static.h @@ -1,5 +1,5 @@ /* - 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 @@ -74,6 +74,8 @@ ITT_STUBV(ITTAPI, void, enable_attach, (void), (ITT_NO_PARAMS), enable_attach, _ #else /* __ITT_INTERNAL_INIT */ +ITT_STUBV(ITTAPI, void, detach, (void), (ITT_NO_PARAMS), detach, __itt_group_control | __itt_group_legacy, "no args") + #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createA, __itt_group_sync | __itt_group_fsync, "%p, \"%s\", \"%s\", %x") ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createW, __itt_group_sync | __itt_group_fsync, "%p, \"%S\", \"%S\", %x") diff --git a/src/tbb/tools_api/ittnotify_types.h b/src/tbb/tools_api/ittnotify_types.h index b9a04c218b5ae903f5a8c0c409e81a75de9bcdef..b04d1c924adb2b50961fbe7775fcd8d5f4646999 100644 --- a/src/tbb/tools_api/ittnotify_types.h +++ b/src/tbb/tools_api/ittnotify_types.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/tools_api/legacy/ittnotify.h b/src/tbb/tools_api/legacy/ittnotify.h index 115f086b3b9773517175fedf6709c2236ead26fa..a6659fdfb41de89c6a8c79a8120dbcce9de2589f 100644 --- a/src/tbb/tools_api/legacy/ittnotify.h +++ b/src/tbb/tools_api/legacy/ittnotify.h @@ -1,5 +1,5 @@ /* - 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 @@ -39,11 +39,17 @@ # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ +#ifndef ITT_OS_FREEBSD +# define ITT_OS_FREEBSD 4 +#endif /* ITT_OS_FREEBSD */ + #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC +# elif defined( __FreeBSD__ ) +# define ITT_OS ITT_OS_FREEBSD # else # define ITT_OS ITT_OS_LINUX # endif @@ -61,11 +67,17 @@ # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ +#ifndef ITT_PLATFORM_FREEBSD +# define ITT_PLATFORM_FREEBSD 4 +#endif /* ITT_PLATFORM_FREEBSD */ + #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC +# elif ITT_OS==ITT_OS_FREEBSD +# define ITT_PLATFORM ITT_PLATFORM_FREEBSD # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif @@ -127,11 +139,12 @@ * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ -#define ITT_INLINE static inline +#define ITT_INLINE static +#define ITT_INLINE_ATTRIBUTE __attribute__((unused)) #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline +#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused)) #endif /* __STRICT_ANSI__ */ -#define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ @@ -232,25 +245,33 @@ extern "C" { void ITTAPI __itt_pause(void); /** @brief Resume collection */ void ITTAPI __itt_resume(void); +/** @brief Detach collection */ +void ITTAPI __itt_detach(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, pause, (void)) ITT_STUBV(ITTAPI, void, resume, (void)) +ITT_STUBV(ITTAPI, void, detach, (void)) #define __itt_pause ITTNOTIFY_VOID(pause) #define __itt_pause_ptr ITTNOTIFY_NAME(pause) #define __itt_resume ITTNOTIFY_VOID(resume) #define __itt_resume_ptr ITTNOTIFY_NAME(resume) +#define __itt_detach ITTNOTIFY_VOID(detach) +#define __itt_detach_ptr ITTNOTIFY_NAME(detach) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_pause() #define __itt_pause_ptr 0 #define __itt_resume() #define __itt_resume_ptr 0 +#define __itt_detach() +#define __itt_detach_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_pause_ptr 0 #define __itt_resume_ptr 0 +#define __itt_detach_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ #endif /* _ITTNOTIFY_H_ */ diff --git a/src/tbb/tools_api/prototype/ittnotify.h b/src/tbb/tools_api/prototype/ittnotify.h deleted file mode 100644 index 7af8614e1097b4ebddd8a2fdce0689e5df40d340..0000000000000000000000000000000000000000 --- a/src/tbb/tools_api/prototype/ittnotify.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - Copyright 2005-2015 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. -*/ - -#ifndef _PROTOTYPE_ITTNOTIFY_H_ -#define _PROTOTYPE_ITTNOTIFY_H_ - -/** - * @file - * @brief Prototype User API functions and types - */ - -/** @cond exclude_from_documentation */ -#ifndef ITT_OS_WIN -# define ITT_OS_WIN 1 -#endif /* ITT_OS_WIN */ - -#ifndef ITT_OS_LINUX -# define ITT_OS_LINUX 2 -#endif /* ITT_OS_LINUX */ - -#ifndef ITT_OS_MAC -# define ITT_OS_MAC 3 -#endif /* ITT_OS_MAC */ - -#ifndef ITT_OS -# if defined WIN32 || defined _WIN32 -# define ITT_OS ITT_OS_WIN -# elif defined( __APPLE__ ) && defined( __MACH__ ) -# define ITT_OS ITT_OS_MAC -# else -# define ITT_OS ITT_OS_LINUX -# endif -#endif /* ITT_OS */ - -#ifndef ITT_PLATFORM_WIN -# define ITT_PLATFORM_WIN 1 -#endif /* ITT_PLATFORM_WIN */ - -#ifndef ITT_PLATFORM_POSIX -# define ITT_PLATFORM_POSIX 2 -#endif /* ITT_PLATFORM_POSIX */ - -#ifndef ITT_PLATFORM_MAC -# define ITT_PLATFORM_MAC 3 -#endif /* ITT_PLATFORM_MAC */ - -#ifndef ITT_PLATFORM -# if ITT_OS==ITT_OS_WIN -# define ITT_PLATFORM ITT_PLATFORM_WIN -# elif ITT_OS==ITT_OS_MAC -# define ITT_PLATFORM ITT_PLATFORM_MAC -# else -# define ITT_PLATFORM ITT_PLATFORM_POSIX -# endif -#endif /* ITT_PLATFORM */ - -#if defined(_UNICODE) && !defined(UNICODE) -#define UNICODE -#endif - -#include -#if ITT_PLATFORM==ITT_PLATFORM_WIN -#include -#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#include -#if defined(UNICODE) || defined(_UNICODE) -#include -#endif /* UNICODE || _UNICODE */ -#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ - -#ifndef CDECL -# if ITT_PLATFORM==ITT_PLATFORM_WIN -# define CDECL __cdecl -# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ -# define CDECL __attribute__ ((cdecl)) -# else /* _M_IX86 || __i386__ */ -# define CDECL /* actual only on x86 platform */ -# endif /* _M_IX86 || __i386__ */ -# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#endif /* CDECL */ - -#ifndef STDCALL -# if ITT_PLATFORM==ITT_PLATFORM_WIN -# define STDCALL __stdcall -# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -# if defined _M_IX86 || defined __i386__ -# define STDCALL __attribute__ ((stdcall)) -# else /* _M_IX86 || __i386__ */ -# define STDCALL /* supported only on x86 platform */ -# endif /* _M_IX86 || __i386__ */ -# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -#endif /* STDCALL */ - -#define ITTAPI CDECL -#define LIBITTAPI CDECL - -/* TODO: Temporary for compatibility! */ -#define ITTAPI_CALL CDECL -#define LIBITTAPI_CALL CDECL - -#if ITT_PLATFORM==ITT_PLATFORM_WIN -/* use __forceinline (VC++ specific) */ -#define ITT_INLINE __forceinline -#define ITT_INLINE_ATTRIBUTE /* nothing */ -#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -/* - * Generally, functions are not inlined unless optimization is specified. - * For functions declared inline, this attribute inlines the function even - * if no optimization level was specified. - */ -#ifdef __STRICT_ANSI__ -#define ITT_INLINE static -#else /* __STRICT_ANSI__ */ -#define ITT_INLINE static inline -#endif /* __STRICT_ANSI__ */ -#define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) -#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -/** @endcond */ - -/** @cond exclude_from_documentation */ -/* Helper macro for joining tokens */ -#define ITT_JOIN_AUX(p,n) p##n -#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) - -#ifdef ITT_MAJOR -#undef ITT_MAJOR -#endif -#ifdef ITT_MINOR -#undef ITT_MINOR -#endif -#define ITT_MAJOR 3 -#define ITT_MINOR 0 - -/* Standard versioning of a token with major and minor version numbers */ -#define ITT_VERSIONIZE(x) \ - ITT_JOIN(x, \ - ITT_JOIN(_, \ - ITT_JOIN(ITT_MAJOR, \ - ITT_JOIN(_, ITT_MINOR)))) - -#ifndef INTEL_ITTNOTIFY_PREFIX -# define INTEL_ITTNOTIFY_PREFIX __itt_ -#endif /* INTEL_ITTNOTIFY_PREFIX */ -#ifndef INTEL_ITTNOTIFY_POSTFIX -# define INTEL_ITTNOTIFY_POSTFIX _ptr_ -#endif /* INTEL_ITTNOTIFY_POSTFIX */ - -#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) -#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) - -#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) -#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) - -#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) -#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) -#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) -#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) -#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) -#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) -#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) -#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) -#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) -#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) -#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) -#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) -#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) -#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) - -#ifdef ITT_STUB -#undef ITT_STUB -#endif -#ifdef ITT_STUBV -#undef ITT_STUBV -#endif -#define ITT_STUBV(api,type,name,args) \ - typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ - extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); -#define ITT_STUB ITT_STUBV -/** @endcond */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * @defgroup prototype Prototype API - * @{ - * @} - */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _PROTOTYPE_ITTNOTIFY_H_ */ diff --git a/src/tbb/win32-tbb-export.def b/src/tbb/win32-tbb-export.def index b5895ed7286447033f132374f8db0472b849113b..4e11c36cbb237f81044bb8ef19ddec1abdbd097c 100644 --- a/src/tbb/win32-tbb-export.def +++ b/src/tbb/win32-tbb-export.def @@ -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 diff --git a/src/tbb/win32-tbb-export.lst b/src/tbb/win32-tbb-export.lst index 993ef470371f8f8ccc963ff51dee97371986360a..a424e2e72adca3115420d72f911b0c4613b479da 100644 --- a/src/tbb/win32-tbb-export.lst +++ b/src/tbb/win32-tbb-export.lst @@ -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 diff --git a/src/tbb/win64-gcc-tbb-export.def b/src/tbb/win64-gcc-tbb-export.def index 8be96728edf1e1df3b4a0f1a4249d47c20e8392f..d39c8191360eb449d4ab9feb1b37cd7eabbe41ea 100644 --- a/src/tbb/win64-gcc-tbb-export.def +++ b/src/tbb/win64-gcc-tbb-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/win64-gcc-tbb-export.lst b/src/tbb/win64-gcc-tbb-export.lst index be7fafdecf3e77a22e868c339ff93fdb017b8618..2a06fc0d6f759d1c4c7fde0029181f6096c4f324 100644 --- a/src/tbb/win64-gcc-tbb-export.lst +++ b/src/tbb/win64-gcc-tbb-export.lst @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbb/win64-tbb-export.def b/src/tbb/win64-tbb-export.def index 094e33758626fb9ec7789375b75d5fa18d826a3b..694767f4db47de49d751ec0e728a2498cd8ea2ab 100644 --- a/src/tbb/win64-tbb-export.def +++ b/src/tbb/win64-tbb-export.def @@ -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 diff --git a/src/tbb/win64-tbb-export.lst b/src/tbb/win64-tbb-export.lst index ed1ae0081d955bd4aa5af0543354ff85a277d921..e615d133cbf02b88243608dd0a75716db3640036 100644 --- a/src/tbb/win64-tbb-export.lst +++ b/src/tbb/win64-tbb-export.lst @@ -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 diff --git a/src/tbb/winrt-tbb-export.lst b/src/tbb/winrt-tbb-export.lst index beeaad9a256a3830cb210739495a46807b4702f9..44b7f4bf25299f78b7dacef5e09188d51e7f9e64 100644 --- a/src/tbb/winrt-tbb-export.lst +++ b/src/tbb/winrt-tbb-export.lst @@ -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 diff --git a/src/tbb/x86_rtm_rw_mutex.cpp b/src/tbb/x86_rtm_rw_mutex.cpp index 157cdfc05f97471e61ebdafba39e75e1ac31bba7..3282e648e80dc362c60b18885d383f4bb7039b85 100644 --- a/src/tbb/x86_rtm_rw_mutex.cpp +++ b/src/tbb/x86_rtm_rw_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -28,9 +28,10 @@ // __TBB_RW_MUTEX_DELAY_TEST shifts the point where flags aborting speculation are // added to the read-set of the operation. If 1, will add the test just before -// the transaction is ended. +// the transaction is ended; this technique is called lazy subscription. +// CAUTION: due to proven issues of lazy subscription, use of __TBB_RW_MUTEX_DELAY_TEST is discouraged! #ifndef __TBB_RW_MUTEX_DELAY_TEST - #define __TBB_RW_MUTEX_DELAY_TEST 1 + #define __TBB_RW_MUTEX_DELAY_TEST 0 #endif #if defined(_MSC_VER) && defined(_Wp64) @@ -202,10 +203,18 @@ bool x86_rtm_rw_mutex::internal_upgrade(x86_rtm_rw_mutex::scoped_lock& s) return no_release; } case RTM_transacting_reader: - s.transaction_state = RTM_transacting_writer; - // don't need to add w_flag to read_set even if __TBB_RW_MUTEX_DELAY_TEST - // because the this pointer (the spin_rw_mutex) will be sufficient on release. - return true; +#if !__TBB_RW_MUTEX_DELAY_TEST + if(this->state) { // add spin_rw_mutex to read-set. + // Real reader or writer holds the lock; so commit the read and re-acquire for write. + internal_release(s); + internal_acquire_writer(s); + return false; + } else +#endif + { + s.transaction_state = RTM_transacting_writer; + return true; + } default: __TBB_ASSERT(false, "Invalid state for upgrade"); return false; diff --git a/src/tbb/xbox360-tbb-export.def b/src/tbb/xbox360-tbb-export.def index a6914c732b4eee2fb5fcded98e163b639b9b3e0d..31147b7c76370b5a6a0d18e1d74525dbce67a7da 100644 --- a/src/tbb/xbox360-tbb-export.def +++ b/src/tbb/xbox360-tbb-export.def @@ -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 diff --git a/src/tbbmalloc/Customize.h b/src/tbbmalloc/Customize.h index d32001ffb1598ea3ef1ed45243e3d9694efd3d45..2bb6e1838bb38df6b187043a9ce62f6c99440db0 100644 --- a/src/tbbmalloc/Customize.h +++ b/src/tbbmalloc/Customize.h @@ -1,5 +1,5 @@ /* - 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 @@ -200,7 +200,7 @@ namespace tbb { #if TBB_USE_THREADING_TOOLS call_itt_notify(releasing, &dst); #endif // TBB_USE_THREADING_TOOLS - FencedStore(*(intptr_t*)&dst, src); + FencedStore(*(intptr_t*)&dst, src); } template diff --git a/src/tbbmalloc/MapMemory.h b/src/tbbmalloc/MapMemory.h index 137d7cc0b9415d1d18098e931fc90a71b5923d78..29ecdd5864bdd161a2323b445ca2ad311766b129 100644 --- a/src/tbbmalloc/MapMemory.h +++ b/src/tbbmalloc/MapMemory.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/Statistics.h b/src/tbbmalloc/Statistics.h index 1a06ea768d735334ae6c560c3ae2fdae6b15791f..501e4c728214281ba9c333ab79cc354713520eaa 100644 --- a/src/tbbmalloc/Statistics.h +++ b/src/tbbmalloc/Statistics.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h index 8f62552034601aaf7c9842876bbd8a717edf3ee9..2b459b2cabae1ae10d823a74ee35f2613ff6c9a2 100644 --- a/src/tbbmalloc/TypeDefinitions.h +++ b/src/tbbmalloc/TypeDefinitions.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/backend.cpp b/src/tbbmalloc/backend.cpp index 86f10149a630456161944530360fdb2db9f6ca1f..bd91224e1926ee9686b27f1d7a91f0e11bd6d3b7 100644 --- a/src/tbbmalloc/backend.cpp +++ b/src/tbbmalloc/backend.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/backref.cpp b/src/tbbmalloc/backref.cpp index a4647780aa4d5b26d6e065bade81d9493bc4294c..98b883fa638cd266e58089786c1025bf5ff03a37 100644 --- a/src/tbbmalloc/backref.cpp +++ b/src/tbbmalloc/backref.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/frontend.cpp b/src/tbbmalloc/frontend.cpp index 09317abc82a69657479783b64f912860fccacfe3..12fe7c261061e78ba077dd1be9947946ee5f8c8e 100644 --- a/src/tbbmalloc/frontend.cpp +++ b/src/tbbmalloc/frontend.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -325,8 +325,9 @@ public: void putToLLOCache(TLSData *tls, void *object); }; -static char defaultMemPool_space[sizeof(MemoryPool)]; -static MemoryPool *defaultMemPool = (MemoryPool *)defaultMemPool_space; +static intptr_t defaultMemPool_space[sizeof(MemoryPool)/sizeof(intptr_t) + + (sizeof(MemoryPool)%sizeof(intptr_t)? 1 : 0)]; +static MemoryPool *defaultMemPool = (MemoryPool*)defaultMemPool_space; const size_t MemoryPool::defaultGranularity; // zero-initialized MallocMutex MemoryPool::memPoolListLock; @@ -423,10 +424,10 @@ public: FreeObject *toFree = findObjectToFree(object); // check against head of freeList, as this is mostly // expected after double free - MALLOC_ASSERT(findObjectToFree(object) != freeList, msg); + MALLOC_ASSERT(toFree != freeList, msg); // check against head of publicFreeList, to detect double free // involiving foreign thread - MALLOC_ASSERT(findObjectToFree(object) != publicFreeList, msg); + MALLOC_ASSERT(toFree != publicFreeList, msg); } #else suppress_unused_warning(object); @@ -1983,6 +1984,8 @@ static bool initMemoryManager() sizeof(Block), sizeof(uintptr_t) )); MALLOC_ASSERT( 2*blockHeaderAlignment == sizeof(Block), ASSERT_TEXT ); MALLOC_ASSERT( sizeof(FreeObject) == sizeof(void*), ASSERT_TEXT ); + MALLOC_ASSERT( isAligned(defaultMemPool, sizeof(intptr_t)), + "Memory pool must be void*-aligned for atomic to work over aligned arguments."); #if USE_WINTHREAD const size_t granularity = 64*1024; // granulatity of VirtualAlloc diff --git a/src/tbbmalloc/index.html b/src/tbbmalloc/index.html index 545fcb9a8712c1ca3ffbac3e8a5f98a2246dad83..8ad70e24b4ec156c3aeaa5f153ad445bb56d3b12 100644 --- a/src/tbbmalloc/index.html +++ b/src/tbbmalloc/index.html @@ -7,7 +7,7 @@ This directory contains the Intel® Threading Building Blocks (Intel® TBB

    -Copyright © 2005-2015 Intel Corporation. All Rights Reserved. +Copyright © 2005-2016 Intel Corporation. All Rights Reserved.

    Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries. diff --git a/src/tbbmalloc/large_objects.cpp b/src/tbbmalloc/large_objects.cpp index 3ba97a59e7eb33bdb3c793c684f0f4e84182754c..63d0e0d7b8888b0b89fbb5c97ab18bdda614fca5 100644 --- a/src/tbbmalloc/large_objects.cpp +++ b/src/tbbmalloc/large_objects.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -129,7 +129,7 @@ inline bool lessThanWithOverflow(intptr_t a, intptr_t b) /* ----------------------------------- Operation processing methods ------------------------------------ */ template void LargeObjectCacheImpl::CacheBin::CacheBinFunctor:: - OperationPreprocessor::commitOperation(CacheBinOperation *op) const + OperationPreprocessor::commitOperation(CacheBinOperation *op) const { FencedStore( (intptr_t&)(op->status), CBST_DONE ); } @@ -432,6 +432,7 @@ template LargeMemoryBlock *LargeObjectCacheImpl:: size_t size = head->unalignedSize; usedSize -= num*size; MALLOC_ASSERT( !last || (last->age != 0 && last->age != -1U), ASSERT_TEXT ); + MALLOC_ASSERT( (tail==head && num==1) || (tail!=head && num>1), ASSERT_TEXT ); LargeMemoryBlock *toRelease = NULL; if (!lastCleanedAge) { // 1st object of such size was released. @@ -448,6 +449,7 @@ template LargeMemoryBlock *LargeObjectCacheImpl:: } if (num) { // add [head;tail] list to cache + MALLOC_ASSERT( tail, ASSERT_TEXT ); tail->next = first; if (first) first->prev = tail; diff --git a/src/tbbmalloc/lin32-proxy-export.def b/src/tbbmalloc/lin32-proxy-export.def index 2d10ffcaa541c14668614d07f7a466dc59ffd755..3d85ce9e597f37751fbaf8dc0e8710372d74632d 100644 --- a/src/tbbmalloc/lin32-proxy-export.def +++ b/src/tbbmalloc/lin32-proxy-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/lin32-tbbmalloc-export.def b/src/tbbmalloc/lin32-tbbmalloc-export.def index 451370f2164306a7d87d272ecbdb28b707213ffc..567ce0bd77850c6e321fcf7e403fd489df3e573c 100644 --- a/src/tbbmalloc/lin32-tbbmalloc-export.def +++ b/src/tbbmalloc/lin32-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/lin64-proxy-export.def b/src/tbbmalloc/lin64-proxy-export.def index 975ada54dcc8c312001888d7bf8c0184f373de21..e4641acc0c10d76e611a7f177a7b86a3dda07098 100644 --- a/src/tbbmalloc/lin64-proxy-export.def +++ b/src/tbbmalloc/lin64-proxy-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/lin64-tbbmalloc-export.def b/src/tbbmalloc/lin64-tbbmalloc-export.def index 103855e31077d10b3a8fbef75c6fccf763473583..34fbfae7b7e7cb28eaa367cfe17b9a419c52980b 100644 --- a/src/tbbmalloc/lin64-tbbmalloc-export.def +++ b/src/tbbmalloc/lin64-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/lin64ipf-proxy-export.def b/src/tbbmalloc/lin64ipf-proxy-export.def index 975ada54dcc8c312001888d7bf8c0184f373de21..e4641acc0c10d76e611a7f177a7b86a3dda07098 100644 --- a/src/tbbmalloc/lin64ipf-proxy-export.def +++ b/src/tbbmalloc/lin64ipf-proxy-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/lin64ipf-tbbmalloc-export.def b/src/tbbmalloc/lin64ipf-tbbmalloc-export.def index 103855e31077d10b3a8fbef75c6fccf763473583..34fbfae7b7e7cb28eaa367cfe17b9a419c52980b 100644 --- a/src/tbbmalloc/lin64ipf-tbbmalloc-export.def +++ b/src/tbbmalloc/lin64ipf-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/mac32-tbbmalloc-export.def b/src/tbbmalloc/mac32-tbbmalloc-export.def index b24472b5d09724d9bd902c3832429811ff208380..2d346c8dece018843428bb7e0f21d047ec2feb4e 100644 --- a/src/tbbmalloc/mac32-tbbmalloc-export.def +++ b/src/tbbmalloc/mac32-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/mac64-tbbmalloc-export.def b/src/tbbmalloc/mac64-tbbmalloc-export.def index b24472b5d09724d9bd902c3832429811ff208380..2d346c8dece018843428bb7e0f21d047ec2feb4e 100644 --- a/src/tbbmalloc/mac64-tbbmalloc-export.def +++ b/src/tbbmalloc/mac64-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp index 438b3f0e27f28fdc9e19c8d85ae82f01ab12e281..28a82efcd196722b001117d86f857e60c6abcd24 100644 --- a/src/tbbmalloc/proxy.cpp +++ b/src/tbbmalloc/proxy.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/proxy.h b/src/tbbmalloc/proxy.h index 781cadc73494ab981ae12722c52a63e60aa60fa9..8ae28990f69f3183309d0491acc45a159f3c9d85 100644 --- a/src/tbbmalloc/proxy.h +++ b/src/tbbmalloc/proxy.h @@ -1,5 +1,5 @@ /* - 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 @@ -54,8 +54,8 @@ extern "C" { // Struct with original free() and _msize() pointers struct orig_ptrs { - void (*orig_free) (void*); - size_t (*orig_msize)(void*); + void (*orig_free) (void*); + size_t (*orig_msize)(void*); }; #endif /* _TBB_malloc_proxy_H_ */ diff --git a/src/tbbmalloc/proxy_overload_osx.h b/src/tbbmalloc/proxy_overload_osx.h index d4f828a851aa186812998b4b92d9c47d84a2145a..0b8948038fa63c82fb5048457938e27645d1bbfd 100644 --- a/src/tbbmalloc/proxy_overload_osx.h +++ b/src/tbbmalloc/proxy_overload_osx.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/shared_utils.h b/src/tbbmalloc/shared_utils.h index 55e0b44520205c30a21413112252578aa6fad5e4..6d35f523360b44087a81ad628d2c03c9117c22fa 100644 --- a/src/tbbmalloc/shared_utils.h +++ b/src/tbbmalloc/shared_utils.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/tbb_function_replacement.cpp b/src/tbbmalloc/tbb_function_replacement.cpp index c5e0b746a73040420829902c93bc09cbb370f87a..d38692c9c5acda8c84b66167a82d1b3b05d143f7 100644 --- a/src/tbbmalloc/tbb_function_replacement.cpp +++ b/src/tbbmalloc/tbb_function_replacement.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/tbb_function_replacement.h b/src/tbbmalloc/tbb_function_replacement.h index fd3fefc3adc65da35a072e5e98ee6ede65223bd5..54e10dc089007aff7a651c959015024dfd81915c 100644 --- a/src/tbbmalloc/tbb_function_replacement.h +++ b/src/tbbmalloc/tbb_function_replacement.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp index f561a8cfba32ba9219dfd356890dee6b81bd01fa..faf9607ad5c9e7372e5e9ff3e5db8dd98b375a23 100644 --- a/src/tbbmalloc/tbbmalloc.cpp +++ b/src/tbbmalloc/tbbmalloc.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/tbbmalloc.rc b/src/tbbmalloc/tbbmalloc.rc index de82be9f234cefc6f50545655705e9217d7dad52..89fd44d17264818d990371bc657cb348c016ac1a 100644 --- a/src/tbbmalloc/tbbmalloc.rc +++ b/src/tbbmalloc/tbbmalloc.rc @@ -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 @@ -84,7 +84,7 @@ BEGIN VALUE "CompanyName", "Intel Corporation\0" VALUE "FileDescription", "Scalable Allocator library\0" VALUE "FileVersion", TBBMALLOC_VERSION "\0" - VALUE "LegalCopyright", "Copyright 2005-2015 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalCopyright", "Copyright 2005-2016 Intel Corporation. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" #ifndef TBB_USE_DEBUG VALUE "OriginalFilename", "tbbmalloc.dll\0" diff --git a/src/tbbmalloc/tbbmalloc_internal.h b/src/tbbmalloc/tbbmalloc_internal.h index 14b5b0585c92b8802a4b868d5ab99d4825db4f14..a0fe2cf86547917de5bfbb9d04afe3b5c6154510 100644 --- a/src/tbbmalloc/tbbmalloc_internal.h +++ b/src/tbbmalloc/tbbmalloc_internal.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/tbbmalloc_internal_api.h b/src/tbbmalloc/tbbmalloc_internal_api.h index 2eedc7745a505dcb3f38564203f5d91cbf3d6e49..9aa0e1c7b6f9352ac6e6f1fa5282fbe80b1e683a 100644 --- a/src/tbbmalloc/tbbmalloc_internal_api.h +++ b/src/tbbmalloc/tbbmalloc_internal_api.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/win32-gcc-tbbmalloc-export.def b/src/tbbmalloc/win32-gcc-tbbmalloc-export.def index a7378e8cfb8941282cd43897943e8c09f36f3d0a..409c1718bbee06466f90c9a749068295c82eace9 100644 --- a/src/tbbmalloc/win32-gcc-tbbmalloc-export.def +++ b/src/tbbmalloc/win32-gcc-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/win32-tbbmalloc-export.def b/src/tbbmalloc/win32-tbbmalloc-export.def index b74cc88285f9ff17592f7aaea092c513f7f7eb34..f7dcac4b7cd4f75e7956115783cea73021ab3e41 100644 --- a/src/tbbmalloc/win32-tbbmalloc-export.def +++ b/src/tbbmalloc/win32-tbbmalloc-export.def @@ -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 diff --git a/src/tbbmalloc/win64-gcc-tbbmalloc-export.def b/src/tbbmalloc/win64-gcc-tbbmalloc-export.def index 8b6e4335b23ddc9f5c10bcc1c8ff0764d7229f69..a76ac2a62366f37329022303c4af63b23502f2f1 100644 --- a/src/tbbmalloc/win64-gcc-tbbmalloc-export.def +++ b/src/tbbmalloc/win64-gcc-tbbmalloc-export.def @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/tbbmalloc/win64-tbbmalloc-export.def b/src/tbbmalloc/win64-tbbmalloc-export.def index 0fd069e34deaa78c8b61b5b18f268224527f77a3..a0675e405627d2c13b997f66b11409295ff03e9f 100644 --- a/src/tbbmalloc/win64-tbbmalloc-export.def +++ b/src/tbbmalloc/win64-tbbmalloc-export.def @@ -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 diff --git a/src/tbbmalloc/xbox360-tbbmalloc-export.def b/src/tbbmalloc/xbox360-tbbmalloc-export.def index 0a010bc90a797a11dfd827e696a8636214325241..3a028e3b21f32417623f9d764fbf37358a8ed5db 100644 --- a/src/tbbmalloc/xbox360-tbbmalloc-export.def +++ b/src/tbbmalloc/xbox360-tbbmalloc-export.def @@ -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 diff --git a/src/tbbproxy/tbbproxy-windows.asm b/src/tbbproxy/tbbproxy-windows.asm index 2d0d3edc005146c8de929c7c991354114ee8908e..ac0ed80c04d9bdd2dbeecd8803e8810b99b9151b 100644 --- a/src/tbbproxy/tbbproxy-windows.asm +++ b/src/tbbproxy/tbbproxy-windows.asm @@ -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 diff --git a/src/tbbproxy/tbbproxy.cpp b/src/tbbproxy/tbbproxy.cpp index 3c5f3074460363e993d2723b8220dbe320bb6e1a..c97859c9e45e81966f88f770a25fe797fe314223 100644 --- a/src/tbbproxy/tbbproxy.cpp +++ b/src/tbbproxy/tbbproxy.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness.h b/src/test/harness.h index 177540e940b56edb2a38eac540b1145413d74de7..4dc7cff04c9f84654211fd139e495adbcac925aa 100644 --- a/src/test/harness.h +++ b/src/test/harness.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_allocator.h b/src/test/harness_allocator.h index 8392dbe4fd109c72437219cab375f148fb3ffad7..10faec3e34afa7429286eba4647d7af4518553ff 100644 --- a/src/test/harness_allocator.h +++ b/src/test/harness_allocator.h @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ #if __linux__ || __APPLE__ || __sun #include -#elif _WIN32 +#elif _WIN32 #include "tbb/machine/windows_api.h" #endif /* OS specific */ #include @@ -166,9 +166,8 @@ public: //! Destroy value at location pointed to by p. void destroy( pointer p ) { p->~value_type(); -#if _MSC_VER <= 1800 && defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // suppress "unreferenced parameter" warnings by MSVC up to and including 2015 tbb::internal::suppress_unused_warning(p); -#endif } friend bool operator==(arena const& lhs, arena const& rhs){ @@ -225,7 +224,7 @@ public: static_counting_allocator(const base_alloc_t& src) throw() : base_alloc_t(src) { } - static_counting_allocator(const static_counting_allocator& src) throw() + static_counting_allocator(const static_counting_allocator& src) throw() : base_alloc_t(src) { } template @@ -529,7 +528,7 @@ public: //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ -template class Allocator> +template class Allocator> class debug_allocator : public Allocator { public: typedef Allocator base_allocator_type; diff --git a/src/test/harness_allocator_overload.h b/src/test/harness_allocator_overload.h index 28222f6033aa496246c9488486d70738f08171af..8b8eb165869f4ef0c71c29a4c5b9ad8b95e42c5a 100644 --- a/src/test/harness_allocator_overload.h +++ b/src/test/harness_allocator_overload.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_assert.h b/src/test/harness_assert.h index f3897dee00fe83c5849abd5a5676b07f85fb2a8a..6da275e0ededeed64462e9ea315de73e7d888b2d 100644 --- a/src/test/harness_assert.h +++ b/src/test/harness_assert.h @@ -1,5 +1,5 @@ /* - 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 @@ -27,8 +27,8 @@ #ifndef harness_assert_H #define harness_assert_H -void ReportError( const char* filename, int line, const char* expression, const char* message); -void ReportWarning( const char* filename, int line, const char* expression, const char* message); +void ReportError( const char* filename, int line, const char* expression, const char* message); +void ReportWarning( const char* filename, int line, const char* expression, const char* message); #define ASSERT_CUSTOM(p,message,file,line) ((p)?(void)0:ReportError(file,line,#p,message)) #define ASSERT(p,message) ASSERT_CUSTOM(p,message,__FILE__,__LINE__) diff --git a/src/test/harness_bad_expr.h b/src/test/harness_bad_expr.h index a7cc6525338281b8642e5295b2620800405a854b..86935772ec065d18ff911e71bf894b6af5d94090 100644 --- a/src/test/harness_bad_expr.h +++ b/src/test/harness_bad_expr.h @@ -1,5 +1,5 @@ /* - 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 @@ -47,8 +47,8 @@ struct AssertionFailure { AssertionFailure( const char* filename, int line, const char* expression, const char* comment ); }; -AssertionFailure::AssertionFailure( const char* filename, int line, const char* expression, const char* comment ) : - message(comment) +AssertionFailure::AssertionFailure( const char* filename, int line, const char* expression, const char* comment ) : + message(comment) { ASSERT(filename,"missing filename"); ASSERT(0= 0, "too many destructions"); } diff --git a/src/test/harness_concurrency.h b/src/test/harness_concurrency.h index 9b283f8ff8f0b5327dd44146cb41316cb4ab1e56..799e1f2bc306cc6a5d58f884df00f71ecb92f0c7 100644 --- a/src/test/harness_concurrency.h +++ b/src/test/harness_concurrency.h @@ -1,5 +1,5 @@ /* - 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 @@ -63,7 +63,7 @@ namespace Harness { return maxProcs; #if _WIN32||_WIN64 - ASSERT( max_threads <= 64 , "LimitNumberOfThreads doesn't support max_threads to be more than 64 on Windows." ); + ASSERT( max_threads <= 64 , "LimitNumberOfThreads doesn't support max_threads to be more than 64 on Windows." ); DWORD_PTR mask = 1; for ( int i = 1; i < max_threads; ++i ) mask |= mask << 1; diff --git a/src/test/harness_concurrency_checker.h b/src/test/harness_concurrency_checker.h index e795f10d6d0ce48264daae5d1c9e877e8e7b5c75..c9f9eb87756060af5895b7eab8d592e27c6b9858 100644 --- a/src/test/harness_concurrency_checker.h +++ b/src/test/harness_concurrency_checker.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_concurrency_tracker.h b/src/test/harness_concurrency_tracker.h index dacee0fb88fa1074d9e1cc2675badb0119e544fc..f9c5ce82023c4323ae242eaa1a6a1261e9aa5947 100644 --- a/src/test/harness_concurrency_tracker.h +++ b/src/test/harness_concurrency_tracker.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_cpu.h b/src/test/harness_cpu.h index bc2b812b9be3c74bf8145deb848ab417f76b97a6..30bd54046544b35bd84da1af52c808c5f5fc43c2 100644 --- a/src/test/harness_cpu.h +++ b/src/test/harness_cpu.h @@ -1,5 +1,5 @@ /* - 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 @@ -22,7 +22,7 @@ // This header is an optional part of the test harness. // It assumes that "harness_assert.h" has already been included. -#if _WIN32 +#if _WIN32 #if !_XBOX #include #endif @@ -33,7 +33,7 @@ //! Return time (in seconds) spent by the current process in user mode. /* Returns 0 if not implemented on platform. */ -static double GetCPUUserTime() { +static double GetCPUUserTime() { #if _XBOX || __TBB_WIN8UI_SUPPORT return 0; #elif _WIN32 @@ -51,7 +51,7 @@ static double GetCPUUserTime() { // getrusage(RUSAGE_SELF, ...) that is used now only returns info for the calling thread; // getrusage(RUSAGE_CHILDREN, ...) only counts for finished children threads; // tms_utime and tms_cutime got with times(struct tms*) are equivalent to the above items; - // finally, /proc/self/task//stat doesn't exist on older kernels + // finally, /proc/self/task//stat doesn't exist on older kernels // and it isn't quite convenient to read it for every task_id. struct rusage resources; @@ -87,7 +87,7 @@ static void TestCPUUserTime( int nthreads, int nactive = 1 ) { while( (usrtime_delta=GetCPUUserTime()-lastusrtime) < THRESHOLD ) { for ( int i = 0; i < 1000; ++i ) ++k; // do fake work without which user time can stall if ( (waittime_delta = (tbb::tick_count::now()-stamp).seconds()) > maximal_waittime ) { - REPORT( "Warning: %.2f sec elapsed but user mode time is still below its threshold (%g < %g)\n", + REPORT( "Warning: %.2f sec elapsed but user mode time is still below its threshold (%g < %g)\n", waittime_delta, usrtime_delta, THRESHOLD ); break; } @@ -96,7 +96,7 @@ static void TestCPUUserTime( int nthreads, int nactive = 1 ) { // Wait for workers to go sleep stamp = tbb::tick_count::now(); - while( ((waittime_delta=(tbb::tick_count::now()-stamp).seconds()) < minimal_waittime) + while( ((waittime_delta=(tbb::tick_count::now()-stamp).seconds()) < minimal_waittime) || ((usrtime_delta=GetCPUUserTime()-lastusrtime) < THRESHOLD) ) { for ( int i = 0; i < 1000; ++i ) ++k; // do fake work without which user time can stall diff --git a/src/test/harness_defs.h b/src/test/harness_defs.h index be7e0f6257f62dbeefaf1d9a8fd6c65de65d74de..c994623656d4cf0e416fddda8d7f4b99e29db8f0 100644 --- a/src/test/harness_defs.h +++ b/src/test/harness_defs.h @@ -1,5 +1,5 @@ /* - 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 @@ -128,7 +128,7 @@ #define __TBB_THROW_FROM_DTOR_BROKEN (__clang__ && (__apple_build_version__ && __apple_build_version__ < 5000279 || __TBB_CLANG_VERSION && __TBB_CLANG_VERSION < 50000)) //std::uncaught_exception is broken on some version of stdlibc++ (it returns true with no active exception) -#define __TBB_STD_UNCAUGHT_EXCEPTION_BROKEN (__linux__ && (__TBB_GCC_VERSION == 40407 || __TBB_GCC_VERSION == 40802 || __TBB_GCC_VERSION == 40902)) +#define __TBB_STD_UNCAUGHT_EXCEPTION_BROKEN (__linux__ && (__TBB_GCC_VERSION == 40407 || __TBB_GCC_VERSION >= 40800 && __TBB_GCC_VERSION < 50300)) #if __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN #define _EXCEPTION_PTR_H /* prevents exception_ptr.h inclusion */ diff --git a/src/test/harness_dynamic_libs.h b/src/test/harness_dynamic_libs.h index 5384e6c604679ea5c1b632be2b2e8c7c08ef3aae..885e81bc4eb5e68ad4f258cfa35aa3838470cf3c 100644 --- a/src/test/harness_dynamic_libs.h +++ b/src/test/harness_dynamic_libs.h @@ -1,5 +1,5 @@ /* - 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 @@ -80,7 +80,7 @@ typedef void *LIBRARY_HANDLE; LIBRARY_HANDLE OpenLibrary(const char *name) { #if _WIN32 || _WIN64 -#if __TBB_WIN8UI_SUPPORT +#if __TBB_WIN8UI_SUPPORT TCHAR wlibrary[MAX_PATH]; if ( MultiByteToWideChar(CP_UTF8, 0, name, -1, wlibrary, MAX_PATH) == 0 ) return false; return :: LoadPackagedLibrary( wlibrary, 0 ); diff --git a/src/test/harness_eh.h b/src/test/harness_eh.h index dc70e4a1fe108cd03a9b836bb5bb6d784b879c14..7507427b90090d8633c2ee4c9a3f885fbc6ae3b3 100644 --- a/src/test/harness_eh.h +++ b/src/test/harness_eh.h @@ -1,5 +1,5 @@ /* - 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 @@ -134,7 +134,7 @@ public: #if HARNESS_EH_SIMPLE_MODE -static void ThrowTestException () { +static void ThrowTestException () { ++g_ExceptionsThrown; throw test_exception(EXCEPTION_DESCR); } @@ -144,10 +144,10 @@ static void ThrowTestException () { static void ThrowTestException ( intptr_t threshold ) { bool inMaster = (Harness::CurrentTid() == g_Master); if ( !g_ThrowException || // if we're not supposed to throw - (!g_Flog && // if we're not catching throw in bodies and + (!g_Flog && // if we're not catching throw in bodies and (g_ExceptionInMaster ^ inMaster)) ) { // we're the master and not expected to throw // or are the master and the master is not the one to throw (??) - return; + return; } while ( Existed() < threshold ) __TBB_Yield(); diff --git a/src/test/harness_fp.h b/src/test/harness_fp.h index 08df60e44662aff915617702e191584ff0d34faf..f2f0d0bfb3909ca29b3cdc9aa333c4312822f46c 100644 --- a/src/test/harness_fp.h +++ b/src/test/harness_fp.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_graph.h b/src/test/harness_graph.h index 5725294600ce27c531f91459a867ce436f6bb7d7..55b2d4362338a6e7d01507c58dc735f8a44cf129 100644 --- a/src/test/harness_graph.h +++ b/src/test/harness_graph.h @@ -1,5 +1,5 @@ /* - 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 @@ -18,7 +18,7 @@ reasons why the executable file might be covered by the GNU General Public License. */ -/** @file harness_graph.cpp +/** @file harness_graph.cpp This contains common helper classes and functions for testing graph nodes **/ @@ -70,7 +70,7 @@ struct convertor { template struct convertor { static tbb::flow::continue_msg convert_value(const InputType &/*i*/) { - return tbb::flow::continue_msg(); + return tbb::flow::continue_msg(); } }; @@ -154,11 +154,11 @@ struct harness_graph_executor { static inline OutputType func( InputType v ) { size_t c; // Declaration separate from initialization to avoid ICC internal error on IA-64 architecture c = current_executors.fetch_and_increment(); - ASSERT( max_executors == 0 || c <= max_executors, NULL ); + ASSERT( max_executors == 0 || c <= max_executors, NULL ); ++execute_count; OutputType v2 = (*fptr)(v); current_executors.fetch_and_decrement(); - return v2; + return v2; } template< typename RW > @@ -177,7 +177,7 @@ struct harness_graph_executor { OutputType operator()( InputType i ) { typename RW::scoped_lock l( harness_graph_executor::mutex_holder::mutex, /*write=*/false ); my_execute_count.fetch_and_increment(); - return harness_graph_executor::func(i); + return harness_graph_executor::func(i); } }; typedef tfunctor functor; @@ -204,7 +204,7 @@ struct harness_graph_multifunction_executor { static inline void func( const InputType &v, ports_type &p ) { size_t c; // Declaration separate from initialization to avoid ICC internal error on IA-64 architecture c = current_executors.fetch_and_increment(); - ASSERT( max_executors == 0 || c <= max_executors, NULL ); + ASSERT( max_executors == 0 || c <= max_executors, NULL ); ASSERT(tbb::flow::tuple_size::value == 1, NULL); ++execute_count; (*fptr)(v,p); @@ -427,7 +427,7 @@ struct harness_counting_sender : public tbb::flow::sender, NoCopy { /* override */ size_t successor_count() { return 0; } #endif - /* override */ bool try_get( T & v ) { + /* override */ bool try_get( T & v ) { size_t i = my_count.fetch_and_increment(); if ( i < my_limit ) { v = T( i ); @@ -456,16 +456,16 @@ struct harness_counting_sender : public tbb::flow::sender, NoCopy { while ( s->try_put( T(i) ) ) { ++my_received; i = my_count.fetch_and_increment(); - } + } } void try_put_until_limit() { successor_type *s = my_receiver; - for ( int i = 0; i < (int)my_limit; ++i ) { + for ( int i = 0; i < (int)my_limit; ++i ) { ASSERT( s->try_put( T(i) ), NULL ); ++my_received; - } + } ASSERT( my_received == my_limit, NULL ); } @@ -551,7 +551,7 @@ void test_resets() { tbb::flow::queue_node q0(g); T j; bool nFound[NN]; - + // reset empties buffer for(T i = 0; i < NN; ++i) { b0.try_put(i); @@ -651,7 +651,7 @@ void test_resets() { g.wait_for_all(); ASSERT((int)serial_fn_state0 == 1, "function_node executed when it shouldn't"); T outt; - ASSERT(b0.try_get(outt) && (T)23 == outt, "node lost its input"); + ASSERT(b0.try_get(outt) && (T)23 == outt, "node lost its input"); } } @@ -685,15 +685,15 @@ protected: typename NODE_TYPE::successor_list_type::iterator ms_list_iter; virtual void set_up_lists() { - in0_p_list.clear(); + in0_p_list.clear(); in0_s_list.clear(); - in1_p_list.clear(); + in1_p_list.clear(); in1_s_list.clear(); - mp_list.clear(); + mp_list.clear(); ms_list.clear(); - out0_p_list.clear(); + out0_p_list.clear(); out0_s_list.clear(); - out1_p_list.clear(); + out1_p_list.clear(); out1_s_list.clear(); in0.copy_predecessors(in0_p_list); in0.copy_successors(in0_s_list); @@ -734,20 +734,20 @@ protected: int first_pred = *(mp_list.begin()) == ins[0] ? 0 : ( *(mp_list.begin()) == ins[1] ? 1 : -1 ); mp_list_iter = mp_list.begin(); ++mp_list_iter; int second_pred = *mp_list_iter == ins[0] ? 0 : ( *mp_list_iter == ins[1] ? 1 : -1 ); - ASSERT( first_pred != -1 && second_pred != -1 && first_pred != second_pred, "bad predecessor(s) for middle" ); + ASSERT( first_pred != -1 && second_pred != -1 && first_pred != second_pred, "bad predecessor(s) for middle" ); int first_succ = *(ms_list.begin()) == outs[0] ? 0 : ( *(ms_list.begin()) == outs[1] ? 1 : -1 ); ms_list_iter = ++(ms_list.begin()); int second_succ = *ms_list_iter == outs[0] ? 0 : ( *ms_list_iter == outs[1] ? 1 : -1 ); - ASSERT( first_succ != -1 && second_succ != -1 && first_succ != second_succ, "bad successor(s) for middle" ); - + ASSERT( first_succ != -1 && second_succ != -1 && first_succ != second_succ, "bad successor(s) for middle" ); + in0.try_put(1); in1.try_put(2); g.wait_for_all(); int r = 0; int v = 0; - + ASSERT( in0.try_get(v) == false, "buffer should not have a value" ); ASSERT( in1.try_get(v) == false, "buffer should not have a value" ); ASSERT( middle.try_get(v) == false, "buffer should not have a value" ); @@ -783,17 +783,17 @@ protected: ASSERT( out0.successor_count() == 0 && out0_s_list.size() == 0, "expected 0 successors" ); ASSERT( out1.predecessor_count() == 1 && out1_p_list.size() == 1 && *(out1_p_list.begin()) == mp_ptr, "expected 1 predecessor" ); ASSERT( out1.successor_count() == 0 && out1_s_list.size() == 0, "expected 0 successors" ); - + ASSERT( middle.predecessor_count() == 1 && mp_list.size() == 1, "expected two predecessors" ); ASSERT( middle.successor_count() == 1 && ms_list.size() == 1, "expected two successors" ); - + ASSERT( *(mp_list.begin()) == ins[1], "incorrect predecessor" ); ASSERT( *(ms_list.begin()) == outs[1], "incorrect successor" ); - + in0.try_put(1); in1.try_put(2); g.wait_for_all(); - + int v = 0; ASSERT( in0.try_get(v) == true && v == 1, "buffer should have a value of 1" ); ASSERT( in1.try_get(v) == false, "buffer should not have a value" ); @@ -821,14 +821,14 @@ protected: ASSERT( out0.successor_count() == 0 && out0_s_list.size() == 0, "expected 0 successors" ); ASSERT( out1.predecessor_count() == 0 && out1_p_list.size() == 0, "expected 0 predecessors" ); ASSERT( out1.successor_count() == 0 && out1_s_list.size() == 0, "expected 0 successors" ); - + ASSERT( middle.predecessor_count() == 0 && mp_list.size() == 0, "expected 0 predecessors" ); ASSERT( middle.successor_count() == 0 && ms_list.size() == 0, "expected 0 successors" ); - + in0.try_put(1); in1.try_put(2); g.wait_for_all(); - + int v = 0; ASSERT( in0.try_get(v) == true && v == 1, "buffer should have a value of 1" ); ASSERT( in1.try_get(v) == true && v == 2, "buffer should have a value of 2" ); @@ -843,7 +843,7 @@ protected: public: - test_buffer_base_extract(tbb::flow::graph &_g, NODE_TYPE &i0, NODE_TYPE &i1, NODE_TYPE &m, NODE_TYPE &o0, NODE_TYPE &o1) : + test_buffer_base_extract(tbb::flow::graph &_g, NODE_TYPE &i0, NODE_TYPE &i1, NODE_TYPE &m, NODE_TYPE &o0, NODE_TYPE &o1) : g(_g), in0(i0), in1(i1), middle(m), out0(o0), out1(o1) { ins[0] = &in0; ins[1] = &in1; @@ -852,7 +852,7 @@ public: ms_ptr = static_cast< typename NODE_TYPE::successor_type * >(&middle); mp_ptr = static_cast< typename NODE_TYPE::predecessor_type *>(&middle); } - + virtual ~test_buffer_base_extract() {} void run_tests() { @@ -873,7 +873,7 @@ public: make_and_validate_full_graph(); } - + }; template< typename NODE_TYPE > @@ -886,7 +886,7 @@ protected: NODE_TYPE my_out0; NODE_TYPE my_out1; public: - test_buffer_extract() : test_buffer_base_extract( my_g, my_in0, my_in1, my_middle, my_out0, my_out1), + test_buffer_extract() : test_buffer_base_extract( my_g, my_in0, my_in1, my_middle, my_out0, my_out1), my_in0(my_g), my_in1(my_g), my_middle(my_g), my_out0(my_g), my_out1(my_g) { } }; @@ -907,12 +907,12 @@ protected: count_t out1_count; struct always_zero { size_t operator()(int) { return 0; } }; - struct always_inc { + struct always_inc { count_t *c; always_inc(count_t &_c) : c(&_c) {} - size_t operator()(int) { + size_t operator()(int) { return c->fetch_and_increment(); - } + } }; /*override*/void set_up_lists() { @@ -925,9 +925,9 @@ protected: public: - test_buffer_extract() : test_buffer_base_extract( my_g, my_in0, my_in1, my_middle, my_out0, my_out1), - my_in0(my_g, always_zero()), my_in1(my_g, always_zero()), my_middle(my_g, always_inc(middle_count)), - my_out0(my_g, always_inc(out0_count)), my_out1(my_g, always_inc(out1_count)) { + test_buffer_extract() : test_buffer_base_extract( my_g, my_in0, my_in1, my_middle, my_out0, my_out1), + my_in0(my_g, always_zero()), my_in1(my_g, always_zero()), my_middle(my_g, always_inc(middle_count)), + my_out0(my_g, always_inc(out0_count)), my_out1(my_g, always_inc(out1_count)) { } }; @@ -947,7 +947,7 @@ void test_extract_on_node() { tbb::flow::make_edge(node0, q2); q0.try_put(ItemType(i)); g.wait_for_all(); - + /* q0 */ /* \ */ /* \ */ @@ -955,14 +955,14 @@ void test_extract_on_node() { /* / */ /* / */ /* q1 */ - + ASSERT(node0.predecessor_count() == 2 && q0.successor_count() == 1 && q1.successor_count() == 1, "bad predecessor count"); ASSERT(node0.successor_count() == 1 && q2.predecessor_count() == 1, "bad successor count"); ASSERT(q2.try_get(dont_care) && int(dont_care) == i, "item not forwarded"); typename NType::successor_list_type sv, sv1; typename NType::predecessor_list_type pv, pv1; - + pv1.push_back(&q0); pv1.push_back(&q1); sv1.push_back(&q2); @@ -970,7 +970,7 @@ void test_extract_on_node() { node0.copy_successors(sv); ASSERT(lists_match(pv,pv1), "predecessor vector incorrect"); ASSERT(lists_match(sv,sv1), "successor vector incorrect"); - + if(i == 0) { node0.extract(); } diff --git a/src/test/harness_inject_scheduler.h b/src/test/harness_inject_scheduler.h index 7f89bf36d5e87c5892b1a49aeb18fe3877c3f30c..61d9c6c969a69c52460376f70113f0b91c02e496 100644 --- a/src/test/harness_inject_scheduler.h +++ b/src/test/harness_inject_scheduler.h @@ -1,5 +1,5 @@ /* - 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 @@ -34,7 +34,7 @@ // Suppress usage of #pragma comment #define __TBB_NO_IMPLICIT_LINKAGE 1 -// Enable preview features if any +// Enable preview features if any #define __TBB_BUILD 1 #undef DO_ITT_NOTIFY diff --git a/src/test/harness_iterator.h b/src/test/harness_iterator.h index a43a37b55fc474cbd5adadef1c875ed9df3c2fff..986b813fb5f5cc0459ae8811d4636266798a53a1 100644 --- a/src/test/harness_iterator.h +++ b/src/test/harness_iterator.h @@ -1,5 +1,5 @@ /* - 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 @@ -37,11 +37,11 @@ public: typedef typename std::allocator::pointer pointer; typedef typename std::allocator::reference reference; #endif /* HARNESS_EXTENDED_STD_COMPLIANCE */ - + explicit InputIterator( T * ptr): my_ptr(ptr){} - + T& operator* () { return *my_ptr; } - + InputIterator& operator++ () { ++my_ptr; return *this; } bool operator== ( const InputIterator& r ) { return my_ptr == r.my_ptr; } @@ -58,13 +58,13 @@ public: typedef typename std::allocator::pointer pointer; typedef typename std::allocator::reference reference; #endif /* HARNESS_EXTENDED_STD_COMPLIANCE */ - + explicit ForwardIterator ( T * ptr ) : my_ptr(ptr){} - + ForwardIterator ( const ForwardIterator& r ) : my_ptr(r.my_ptr){} - + T& operator* () { return *my_ptr; } - + ForwardIterator& operator++ () { ++my_ptr; return *this; } bool operator== ( const ForwardIterator& r ) { return my_ptr == r.my_ptr; } diff --git a/src/test/harness_m128.h b/src/test/harness_m128.h index e20d057fc57ebf444d9914bb7dee10b8ca7acebb..d3a0e9bd75b241b2984541c84d1a3a9e837c7f52 100644 --- a/src/test/harness_m128.h +++ b/src/test/harness_m128.h @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ // did not always provide proper stack alignment in destructors of such objects. #if (_MSC_VER>=1600) -//TODO: handle /arch:AVX in the right way. +//TODO: handle /arch:AVX in the right way. #pragma warning (push) #pragma warning (disable: 4752) #endif @@ -40,7 +40,7 @@ class ClassWithVectorType { __Mvec field[n]; void init( int start ); public: - ClassWithVectorType() {init(-n);} + ClassWithVectorType() {init(-n);} ClassWithVectorType( int i ) {init(i);} void operator=( const ClassWithVectorType& src ) { __Mvec stack[n]; @@ -65,7 +65,7 @@ template void ClassWithVectorType<__Mvec>::init( int start ) { __Mvec stack[n]; for( int i=0; i #include -#elif __APPLE__ +#elif __APPLE__ && !__ARM_ARCH #include #include #include -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 #include #else #include @@ -53,7 +53,7 @@ const size_t shared_size = 0; //! Return estimate of number of bytes of memory that this program is currently using. /* Returns 0 if not implemented on platform. */ -size_t GetMemoryUsage() { +size_t GetMemoryUsage() { #if _XBOX || __TBB_WIN8UI_SUPPORT return 0; #elif _WIN32 @@ -73,7 +73,7 @@ size_t GetMemoryUsage() { } fclose(statsfile); return total_mem*pagesize; -#elif __APPLE__ +#elif __APPLE__ && !__ARM_ARCH kern_return_t status; task_basic_info info; mach_msg_type_number_t msg_type = TASK_BASIC_INFO_COUNT; @@ -90,7 +90,7 @@ size_t GetMemoryUsage() { void UseStackSpace( size_t amount, char* top=0 ) { char x[1000]; memset( x, -1, sizeof(x) ); - if( !top ) + if( !top ) top = x; ASSERT( x<=top, "test assumes that stacks grow downwards" ); if( size_t(top-x)()) ? (void)0 : TRACE diff --git a/src/test/harness_runtime_loader.h b/src/test/harness_runtime_loader.h index a01d8dc3206806015c8b6b6e40c76774fe624fd9..35e6589569cf085997c46d4cdeac75498cba5a98 100644 --- a/src/test/harness_runtime_loader.h +++ b/src/test/harness_runtime_loader.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_task.h b/src/test/harness_task.h index 5c43234aff0869803188ae134f0c7b4d839a1f2a..7e4a3e81dd0d1813b53cb5a810d69a13539000a6 100644 --- a/src/test/harness_task.h +++ b/src/test/harness_task.h @@ -1,5 +1,5 @@ /* - 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 @@ -26,11 +26,11 @@ tbb::task* GetTaskPtr( int& counter ) { ++counter; return NULL; } - + class TaskGenerator: public tbb::task { int m_ChildCount; int m_Depth; - + public: TaskGenerator( int child_count, int _depth ) : m_ChildCount(child_count), m_Depth(_depth) {} ~TaskGenerator( ) { m_ChildCount = m_Depth = -125; } @@ -40,7 +40,7 @@ public: if( m_Depth>0 ) { recycle_as_safe_continuation(); set_ref_count( m_ChildCount+1 ); - int k=0; + int k=0; for( int j=0; jspawn(t); diff --git a/src/test/harness_tbb_independence.h b/src/test/harness_tbb_independence.h index 356e27781b32bf053f9cdc242b4d2617068e1ef5..1f0693646b9a8ebf1ece96ce2b37c541204a3f07 100644 --- a/src/test/harness_tbb_independence.h +++ b/src/test/harness_tbb_independence.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_test_cases_framework.h b/src/test/harness_test_cases_framework.h index c48ef5eafec95667aef662fba322db59e6a33188..fc8260f277e97ebfab7af740ada1756acef68f4e 100644 --- a/src/test/harness_test_cases_framework.h +++ b/src/test/harness_test_cases_framework.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/harness_tsx.h b/src/test/harness_tsx.h index 4dc084dedb908c71feca12969be4f95617bd1643..d8bb2c506a4739746cc726b346374121de93e3f4 100644 --- a/src/test/harness_tsx.h +++ b/src/test/harness_tsx.h @@ -1,5 +1,5 @@ /* - 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 @@ -20,7 +20,7 @@ // Header that includes TSX-specific test functions -#if __TBB_TSX_AVAILABLE +#if __TBB_TSX_AVAILABLE #define __TBB_TSX_TESTING_ENABLED_FOR_THIS_COMPILER (__INTEL_COMPILER || __GNUC__ || _MSC_VER || __SUNPRO_CC) #if __TBB_TSX_TESTING_ENABLED_FOR_THIS_COMPILER diff --git a/src/test/test_ScalableAllocator.cpp b/src/test/test_ScalableAllocator.cpp index 535b554025c46e1e1ebb313f7a939a69b9c5f96c..53fabc7c52c42cfe1d054c743f96eb182fdbbdfb 100644 --- a/src/test/test_ScalableAllocator.cpp +++ b/src/test/test_ScalableAllocator.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -25,7 +25,7 @@ #include "harness_assert.h" #if !__TBB_SOURCE_DIRECTLY_INCLUDED -// harness_allocator.h requires atimics. We do not want dependency +// harness_allocator.h requires atimics. We do not want dependency // to TBB library to get atomics, so add rudimentary implementation of them. #include "harness_tbb_independence.h" #endif diff --git a/src/test/test_ScalableAllocator_STL.cpp b/src/test/test_ScalableAllocator_STL.cpp index 51cb6cca222675462adaf007645ddd95711e9855..cff971c5e51547acbcd4b0ece671a4fcde933d90 100644 --- a/src/test/test_ScalableAllocator_STL.cpp +++ b/src/test/test_ScalableAllocator_STL.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_aggregator.cpp b/src/test/test_aggregator.cpp index a4c5a4861eac2fe065ca41b2cb71811f076cead5..4a87929af245971e5faf1fce75184c95fc2ead9a 100644 --- a/src/test/test_aggregator.cpp +++ b/src/test/test_aggregator.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -60,7 +60,7 @@ class BasicBody : NoAssign { pq_t& pq; tbb::aggregator& agg; public: - BasicBody(pq_t& pq_, tbb::aggregator& agg_) : pq(pq_), agg(agg_) {} + BasicBody(pq_t& pq_, tbb::aggregator& agg_) : pq(pq_), agg(agg_) {} void operator()(const int threadID) const { for (int i=0; i to waste less space\n", type_name ); + REPORT("Consider rewriting aligned_space<%s,N> to waste less space\n", type_name ); } diff --git a/src/test/test_allocator.h b/src/test/test_allocator.h index 4a5d3ecb06dc8bd5c7cc0c8db050758107edc943..8fb7dc4ca90f457d1759b9b8fc31ce1c4368916f 100644 --- a/src/test/test_allocator.h +++ b/src/test/test_allocator.h @@ -1,5 +1,5 @@ /* - 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 @@ -22,7 +22,7 @@ // Tests against requirements in 20.1.5 of ISO C++ Standard (1998). // Does not check for thread safety or false sharing issues. // -// Tests for compatibility with the host's STL are in +// Tests for compatibility with the host's STL are in // test_Allocator_STL.h. Those tests are in a separate file // because they bring in lots of STL headers, and the tests here // are supposed to work in the abscense of STL. @@ -86,7 +86,7 @@ public: }; #endif -//! T is type and A is allocator for that type +//! T is type and A is allocator for that type template void TestBasic( A& a ) { T x; @@ -114,7 +114,7 @@ void TestBasic( A& a ) { --difference; ASSERT( difference<0, "not an signed integral type?" ); - // "rebind" tested by our caller + // "rebind" tested by our caller ASSERT( a.address(rx)==px, NULL ); @@ -131,8 +131,8 @@ void TestBasic( A& a ) { // Test hint argument. This can't be compiled when hint is void*, It should be const void* typename A::pointer a_ptr; - const void * const_hint = NULL; - a_ptr = a.allocate (1, const_hint); + const void * const_hint = NULL; + a_ptr = a.allocate (1, const_hint); a.deallocate(a_ptr, 1); // Test "a.deallocate(p,n) @@ -145,9 +145,9 @@ void TestBasic( A& a ) { // Test "a.max_size()" AssertSameType( a.max_size(), typename A::size_type(0) ); - // Following assertion catches case where max_size() is so large that computation of + // Following assertion catches case where max_size() is so large that computation of // number of bytes for such an allocation would overflow size_type. - ASSERT( a.max_size()*typename A::size_type(sizeof(T))>=a.max_size(), "max_size larger than reasonable" ); + ASSERT( a.max_size()*typename A::size_type(sizeof(T))>=a.max_size(), "max_size larger than reasonable" ); // Test "a.construct(p,t)" int n = NumberOfFoo; @@ -259,7 +259,7 @@ void Test(A &a) { // thread safety NativeParallelFor( 4, Body(a) ); ASSERT( NumberOfFoo==0, "Allocate/deallocate count mismatched" ); - + ASSERT( a==b, NULL ); ASSERT( !(a!=b), NULL ); } diff --git a/src/test/test_allocator_STL.h b/src/test/test_allocator_STL.h index cc0dd8f1768735a8ac11d1f517e712c88ba226cb..4d6ebae1e1a0bddd810a6c0475a81238d5c6c734 100644 --- a/src/test/test_allocator_STL.h +++ b/src/test/test_allocator_STL.h @@ -1,5 +1,5 @@ /* - 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 @@ -26,7 +26,7 @@ template void TestSequence(const typename Container::allocator_type &a) { Container c(a); for( int i=0; i<1000; ++i ) - c.push_back(i*i); + c.push_back(i*i); typename Container::const_iterator p = c.begin(); for( int i=0; i<1000; ++i ) { ASSERT( *p==i*i, NULL ); @@ -40,7 +40,7 @@ template void TestSet(const typename Set::allocator_type &a) { Set s(typename Set::key_compare(), a); typedef typename Set::value_type value_type; - for( int i=0; i<100; ++i ) + for( int i=0; i<100; ++i ) s.insert(value_type(3*i)); for( int i=0; i<300; ++i ) { ASSERT( s.erase(i)==size_t(i%3==0), NULL ); @@ -51,7 +51,7 @@ template void TestMap(const typename Map::allocator_type &a) { Map m(typename Map::key_compare(), a); typedef typename Map::value_type value_type; - for( int i=0; i<100; ++i ) + for( int i=0; i<100; ++i ) m.insert(value_type(i,i*i)); for( int i=0; i<100; ++i ) ASSERT( m.find(i)->second==i*i, NULL ); diff --git a/src/test/test_assembly.cpp b/src/test/test_assembly.cpp index 2770ff1e0e7d59667baa6a3f8a0cc12aa808534d..11688e5682cc93359a1139f46cc4bb9c44b64436 100644 --- a/src/test/test_assembly.cpp +++ b/src/test/test_assembly.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -41,7 +41,7 @@ using tbb::internal::reference_count; //TODO: remove this function when atomic function __TBB_XXX are dropped //! Test __TBB_CompareAndSwapW static void TestCompareExchange() { - ASSERT( intptr_t(-10)<10, "intptr_t not a signed integral type?" ); + ASSERT( intptr_t(-10)<10, "intptr_t not a signed integral type?" ); REMARK("testing __TBB_CompareAndSwapW\n"); for( intptr_t a=-10; a<10; ++a ) for( intptr_t b=-10; b<10; ++b ) @@ -54,8 +54,8 @@ static void TestCompareExchange() { intptr_t x = a; #endif intptr_t y = __TBB_CompareAndSwapW(&x,b,c); - ASSERT( y==a, NULL ); - if( a==c ) + ASSERT( y==a, NULL ); + if( a==c ) ASSERT( x==b, NULL ); else ASSERT( x==a, NULL ); @@ -121,8 +121,8 @@ static void TestLog2() { if( uintptr_t k = i*j ) { uintptr_t actual = __TBB_Log2(k); const uintptr_t ONE = 1; // warning suppression again - ASSERT( k >= ONE<>1 < ONE<= ONE<>1 < ONE< + template friend struct place_wrapper; int value; public: - minimal_type() : value(-1) {} - minimal_type(int v) : value(v) {} + minimal_type() : value(-1) {} + minimal_type(int v) : value(v) {} minimal_type(const minimal_type &m) : value(m.value) { } minimal_type &operator=(const minimal_type &m) { value = m.value; return *this; } }; @@ -59,11 +59,11 @@ struct place_wrapper { place_wrapper( ) : value(0) { thread_id = tbb::this_tbb_thread::get_id(); - task_ptr = &tbb::task::self(); + task_ptr = &tbb::task::self(); } place_wrapper( int v ) : value(v) { thread_id = tbb::this_tbb_thread::get_id(); - task_ptr = &tbb::task::self(); + task_ptr = &tbb::task::self(); } place_wrapper( const place_wrapper &v ) : value(v.value), thread_id(v.thread_id), task_ptr(v.task_ptr) { } @@ -75,20 +75,20 @@ template struct wrapper_helper { static void check(const T1 &, const T2 &) { } - static void copy_value(const T1 &in, T2 &out) { + static void copy_value(const T1 &in, T2 &out) { out = in; } }; template struct wrapper_helper< place_wrapper, place_wrapper > { - static void check(const place_wrapper &a, const place_wrapper &b) { + static void check(const place_wrapper &a, const place_wrapper &b) { REMARK("a.task_ptr == %p != b.task_ptr == %p\n", a.task_ptr, b.task_ptr); ASSERT( (a.thread_id != b.thread_id), "same thread used to execute adjacent nodes"); ASSERT( (a.task_ptr != b.task_ptr), "same task used to execute adjacent nodes"); return; } - static void copy_value(const place_wrapper &in, place_wrapper &out) { + static void copy_value(const place_wrapper &in, place_wrapper &out) { out.value = in.value; } }; @@ -110,13 +110,13 @@ struct counting_async_body { } void operator()( const int &input, counting_async_gateway_type& my_node ) { - REMARK( "Body execution with input == %d\n", input); + REMARK( "Body execution with input == %d\n", input); ++my_async_body_exec_count; ++async_body_exec_count; if ( input == -1 ) { bool result = tbb::task::self().group()->cancel_group_execution(); REMARK( "Canceling graph execution\n" ); - ASSERT( result == true, "attempted to cancel graph twice" ); + ASSERT( result == true, "attempted to cancel graph twice" ); Harness::Sleep(50); } my_node.async_try_put(input); @@ -144,7 +144,7 @@ void test_reset() { a.try_put(-1); for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); // should be canceled with only 1 item reaching the async_body and the counting receivers // and N items left in the node's queue @@ -163,7 +163,7 @@ void test_reset() { REMARK( "N body executions\n" ); for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); ASSERT( g.is_cancelled() == false, "task group not canceled" ); @@ -183,7 +183,7 @@ void test_reset() { g.reset(tbb::flow::rf_reset_bodies); for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); ASSERT( g.is_cancelled() == false, "task group not canceled" ); @@ -202,7 +202,7 @@ void test_reset() { g.reset(tbb::flow::rf_clear_edges); for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); ASSERT( g.is_cancelled() == false, "task group not canceled" ); @@ -225,7 +225,7 @@ void test_reset() { #endif for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); ASSERT( g.is_cancelled() == false, "task group not canceled" ); @@ -245,7 +245,7 @@ void test_reset() { g.reset(static_cast(tbb::flow::rf_reset_bodies|tbb::flow::rf_clear_edges)); for (int i = 0; i < N; ++i) { a.try_put(i); - } + } g.wait_for_all(); ASSERT( g.is_cancelled() == false, "task group not canceled" ); @@ -368,15 +368,15 @@ struct basic_test { typedef typename async_node_type::async_gateway_type async_gateway_type; public: typedef async_activity async_activity_type; - + async_body_type( async_activity_type* aa ) : my_async_activity( aa ) { } - async_body_type( const async_body_type& other ) : my_async_activity( other.my_async_activity ) { } + async_body_type( const async_body_type& other ) : my_async_activity( other.my_async_activity ) { } void operator()( const input_type &input, async_gateway_type& my_node ) { ++async_body_exec_count; my_async_activity->submit( input, my_node ); - if ( my_async_activity->should_reserve_each_time() ) + if ( my_async_activity->should_reserve_each_time() ) my_node.async_reserve(); } @@ -407,13 +407,13 @@ public: async_node_type offload_node( g, tbb::flow::unlimited, [&] (const input_type &input, async_gateway_type& my_node) { ++async_body_exec_count; my_async_activity.submit( input, my_node ); - if ( my_async_activity.should_reserve_each_time() ) + if ( my_async_activity.should_reserve_each_time() ) my_node.async_reserve(); } ); #else async_node_type offload_node( g, tbb::flow::unlimited, async_body_type( &my_async_activity ) ); #endif - + tbb::flow::function_node< output_type > end_node( g, tbb::flow::unlimited, end_body_type() ); tbb::flow::make_edge( start_node, offload_node ); @@ -423,7 +423,7 @@ public: tbb::flow::make_edge( tbb::flow::output_port<0>(offload_node), end_node ); #endif async_body_exec_count = 0; - async_activity_processed_msg_count = 0; + async_activity_processed_msg_count = 0; end_body_exec_count = 0; if (async_expected_items != UNKNOWN_NUMBER_OF_ITEMS ) { @@ -436,7 +436,7 @@ public: ASSERT( async_body_exec_count == NUMBER_OF_MSGS, "AsyncBody procesed wrong number of signals" ); ASSERT( async_activity_processed_msg_count == NUMBER_OF_MSGS, "AsyncActivity processed wrong number of signals" ); ASSERT( end_body_exec_count == NUMBER_OF_MSGS, "EndBody processed wrong number of signals"); - REMARK("async_body_exec_count == %d == async_activity_processed_msg_count == %d == end_body_exec_count == %d\n", + REMARK("async_body_exec_count == %d == async_activity_processed_msg_count == %d == end_body_exec_count == %d\n", int(async_body_exec_count), int(async_activity_processed_msg_count), int(end_body_exec_count)); return Harness::Done; } @@ -510,10 +510,10 @@ struct spin_test { typedef typename async_node_type::async_gateway_type async_gateway_type; public: typedef async_activity async_activity_type; - + async_body_type( async_activity_type* aa ) : my_async_activity( aa ) { } - async_body_type( const async_body_type& other ) : my_async_activity( other.my_async_activity ) { } + async_body_type( const async_body_type& other ) : my_async_activity( other.my_async_activity ) { } void operator()( const input_type &input, async_gateway_type& my_node ) { ++async_body_exec_count; @@ -538,7 +538,7 @@ struct spin_test { ++end_body_exec_count; if (tbb::this_tbb_thread::get_id() == my_main_tid) { ++main_tid_count; - } + } my_barrier->timed_wait_noerror(10); } }; diff --git a/src/test/test_atomic.cpp b/src/test/test_atomic.cpp index 4e3de015baec9b3ab2bc4a68d8386dc87de5a359..dcaf532692e6a7e76649450a099c88dca7ad005c 100644 --- a/src/test/test_atomic.cpp +++ b/src/test/test_atomic.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -97,7 +97,7 @@ template tbb::atomic TestStruct::gCo //! Test compare_and_swap template members of class atomic for memory_semantics=M template void TestCompareAndSwapWithExplicitOrdering( T i, T j, T k ) { - ASSERT( i!=k, "values must be distinct" ); + ASSERT( i!=k, "values must be distinct" ); // Test compare_and_swap that should fail TestStruct x(i); T old = x.counter.template compare_and_swap( j, k ); @@ -717,9 +717,9 @@ void TestAtomicEnum() { enum class ScopedColor1 {ScopedRed,ScopedGreen,ScopedBlue=-1}; // TODO: extend the test to cover 2 byte scoped enum as well #if __TBB_ICC_SCOPED_ENUM_WITH_UNDERLYING_TYPE_NEGATIVE_VALUE_BROKEN -enum class ScopedColor2 : char {ScopedZero, ScopedOne,ScopedRed=42,ScopedGreen=-1,ScopedBlue=127}; +enum class ScopedColor2 : signed char {ScopedZero, ScopedOne,ScopedRed=42,ScopedGreen=-1,ScopedBlue=127}; #else -enum class ScopedColor2 : char {ScopedZero, ScopedOne,ScopedRed=-128,ScopedGreen=-1,ScopedBlue=127}; +enum class ScopedColor2 : signed char {ScopedZero, ScopedOne,ScopedRed=-128,ScopedGreen=-1,ScopedBlue=127}; #endif // TODO: replace the hack of getting symbolic enum name with a better implementation @@ -730,7 +730,7 @@ std::string to_string(const ScopedColor1& a){ } template<> std::string to_string(const ScopedColor2& a){ - return enum_strings[a==ScopedColor2::ScopedRed? 2 : + return enum_strings[a==ScopedColor2::ScopedRed? 2 : a==ScopedColor2::ScopedGreen? 3 : a==ScopedColor2::ScopedBlue? 4 : (int)a ]; } @@ -1286,7 +1286,7 @@ public: if( flag!=(T)-1 ) { REPORT("ERROR: flag!=(T)-1 k=%d i=%d trial=%x type=%s (atomicity problem?)\n", k, i, trial, name ); ParallelError = true; - } + } if( !IsRelaxed(E) && message!=(T)-1 ) { REPORT("ERROR: message!=(T)-1 k=%d i=%d trial=%x type=%s mode=%d (memory fence problem?)\n", k, i, trial, name, E ); ParallelError = true; diff --git a/src/test/test_blocked_range.cpp b/src/test/test_blocked_range.cpp index 42cb5e8382da327fc7517cc6b2da8d1a0bdffa6e..58e5398d7b911fe176f1258deff79462c8de5844 100644 --- a/src/test/test_blocked_range.cpp +++ b/src/test/test_blocked_range.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_blocked_range2d.cpp b/src/test/test_blocked_range2d.cpp index 1574fe962e11d19f6cf682c299783cbd049c6b7c..3fcf6c79ed0115a5ec101f472265bc06a2dddb5d 100644 --- a/src/test/test_blocked_range2d.cpp +++ b/src/test/test_blocked_range2d.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ template class AbstractValueType { AbstractValueType() {} int value; -public: +public: template friend AbstractValueType MakeAbstractValueType( int i ); @@ -131,7 +131,7 @@ void ParallelTest() { ASSERT( Array[k][l]==(k class AbstractValueType { AbstractValueType() {} int value; -public: +public: template friend AbstractValueType MakeAbstractValueType( int i ); @@ -161,7 +161,7 @@ void ParallelTest() { Array[l][m][n] = 0; } } - } + } } } } @@ -170,7 +170,7 @@ void ParallelTest() { #include "tbb/task_scheduler_init.h" int TestMain () { - SerialTest(); + SerialTest(); for( int p=MinThread; p<=MaxThread; ++p ) { tbb::task_scheduler_init init(p); ParallelTest(); diff --git a/src/test/test_broadcast_node.cpp b/src/test/test_broadcast_node.cpp index 4384be412de07c992d42f0b250195f9d06c1fd30..d566ea2d6eccbd20e6e81969afcb8aa61369ee72 100644 --- a/src/test/test_broadcast_node.cpp +++ b/src/test/test_broadcast_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -97,7 +97,7 @@ void test_serial_broadcasts() { for ( int r = 0; r < num_receivers; ++r ) { tbb::flow::make_edge( b, receivers[r] ); - } + } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES ASSERT( b.successor_count() == (size_t)num_receivers, NULL); #endif @@ -111,9 +111,9 @@ void test_serial_broadcasts() { ASSERT( receivers[r][n] == 1, NULL ); } tbb::flow::remove_edge( b, receivers[r] ); - } + } ASSERT( b.try_put( (T)0 ), NULL ); - for ( int r = 0; r < num_receivers; ++r ) + for ( int r = 0; r < num_receivers; ++r ) ASSERT( receivers[0][0] == 1, NULL ) ; delete [] receivers; @@ -129,14 +129,14 @@ class native_body : private NoAssign { public: - native_body( tbb::flow::broadcast_node &b ) : my_b(b) {} + native_body( tbb::flow::broadcast_node &b ) : my_b(b) {} void operator()(int) const { for (int n = 0; n < N; ++n ) { ASSERT( my_b.try_put( (T)n ), NULL ); } } - + }; template< typename T > @@ -146,7 +146,7 @@ void run_parallel_broadcasts(int p, tbb::flow::broadcast_node& b) { for ( int r = 0; r < num_receivers; ++r ) { tbb::flow::make_edge( b, receivers[r] ); - } + } NativeParallelFor( p, native_body( b ) ); @@ -155,9 +155,9 @@ void run_parallel_broadcasts(int p, tbb::flow::broadcast_node& b) { ASSERT( (int)receivers[r][n] == p, NULL ); } tbb::flow::remove_edge( b, receivers[r] ); - } + } ASSERT( b.try_put( (T)0 ), NULL ); - for ( int r = 0; r < num_receivers; ++r ) + for ( int r = 0; r < num_receivers; ++r ) ASSERT( (int)receivers[r][0] == p, NULL ) ; delete [] receivers; @@ -171,7 +171,7 @@ void test_parallel_broadcasts(int p) { tbb::flow::graph g; tbb::flow::broadcast_node b(g); run_parallel_broadcasts(p, b); - + // test copy constructor tbb::flow::broadcast_node b_copy(b); run_parallel_broadcasts(p, b_copy); @@ -317,7 +317,7 @@ void test_extract() { } #endif // TBB_PREVIEW_FLOW_GRAPH_FEATURES -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_buffer_node.cpp b/src/test/test_buffer_node.cpp index 4f119afd966b96c066901e2f99f2668e508ff4e4..45be48f063eef29834e639874f21e01020db319b 100644 --- a/src/test/test_buffer_node.cpp +++ b/src/test/test_buffer_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -63,9 +63,9 @@ struct touches { int my_num_threads; touches( int num_threads ) : my_num_threads(num_threads) { - my_touches = new bool* [my_num_threads]; + my_touches = new bool* [my_num_threads]; for ( int p = 0; p < my_num_threads; ++p) { - my_touches[p] = new bool[N]; + my_touches[p] = new bool[N]; for ( int n = 0; n < N; ++n) my_touches[p][n] = false; } @@ -80,7 +80,7 @@ struct touches { bool check( T v ) { ASSERT ( my_touches[v/N][v%N] == false, NULL); - my_touches[v/N][v%N] = true; + my_touches[v/N][v%N] = true; return true; } @@ -123,7 +123,7 @@ struct parallel_put_get : NoAssign { void operator()(int tid) const { for ( int i = 0; i < N; i+=C ) { - int j_end = ( N < i + C ) ? N : i + C; + int j_end = ( N < i + C ) ? N : i + C; // dump about C values into the buffer for ( int j = i; j < j_end; ++j ) { ASSERT( my_b.try_put( T (N*tid + j ) ) == true, NULL ); @@ -155,7 +155,7 @@ int test_reservation() { b.try_put(T(1)); b.try_put(T(2)); b.try_put(T(3)); - + T v, vsum; ASSERT( b.try_reserve(v) == true, NULL ); ASSERT( b.try_release() == true, NULL ); @@ -166,12 +166,12 @@ int test_reservation() { vsum += v; v = bogus_value; g.wait_for_all(); - + ASSERT( b.try_get(v) == true, NULL ); vsum += v; v = bogus_value; g.wait_for_all(); - + ASSERT( b.try_reserve(v) == true, NULL ); ASSERT( b.try_release() == true, NULL ); v = bogus_value; @@ -300,7 +300,7 @@ int test_parallel(int num_threads) { // Tests // // Predecessors cannot be registered -// Empty buffer rejects item requests +// Empty buffer rejects item requests // Single serial sender, items in arbitrary order // Chained buffers ( 2 & 3 ), single sender, items at last buffer in arbitrary order // @@ -426,13 +426,13 @@ int test_serial() { return 0; } -int TestMain() { +int TestMain() { tbb::tick_count start = tbb::tick_count::now(), stop; for (int p = 2; p <= 4; ++p) { tbb::task_scheduler_init init(p); test_serial(); test_parallel(p); - } + } stop = tbb::tick_count::now(); REMARK("Buffer_Node Time=%6.6f\n", (stop-start).seconds()); test_resets >(); diff --git a/src/test/test_cache_aligned_allocator.cpp b/src/test/test_cache_aligned_allocator.cpp index 645f853044977148aa964da5fc5ed923ab3eab30..e9b8742028100902e917e860b15b42e4b7d93393 100644 --- a/src/test/test_cache_aligned_allocator.cpp +++ b/src/test/test_cache_aligned_allocator.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_cache_aligned_allocator_STL.cpp b/src/test/test_cache_aligned_allocator_STL.cpp index ebce6e47da46b647e149bac52c3604c5a17ff02c..f85b66e7aed50424213805431a2189e848dff821 100644 --- a/src/test/test_cache_aligned_allocator_STL.cpp +++ b/src/test/test_cache_aligned_allocator_STL.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_cilk_common.h b/src/test/test_cilk_common.h index 85f8826ad2f6771c3d3ed0667681a1b38b712ce4..2be97b918328160e703bf6dca89bc1ac62730900 100644 --- a/src/test/test_cilk_common.h +++ b/src/test/test_cilk_common.h @@ -1,5 +1,5 @@ /* - 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 @@ -60,7 +60,7 @@ class FibTask: public tbb::task { spawn (*new( allocate_child() ) FibTask(x,n-1)); spawn (*new( allocate_child() ) FibTask(y,n-2)); } - wait_for_all(); + wait_for_all(); task* self1 = &task::self(); ASSERT( self0 == self1, "failed to preserve TBB TLS" ); result = x+y; diff --git a/src/test/test_cilk_dynamic_load.cpp b/src/test/test_cilk_dynamic_load.cpp index 4fbd27ec6a6be1ea2b22ac5208c8765b0829e273..2782d7c97168a0336dfb955da69c0e640ad9dd93 100644 --- a/src/test/test_cilk_dynamic_load.cpp +++ b/src/test/test_cilk_dynamic_load.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -131,7 +131,7 @@ int TBB_Fib( int n ) { } } -void RunSandwich() { +void RunSandwich() { tbb::task_scheduler_init init(P_outer); int m = TBB_Fib(N); ASSERT( m == F, NULL ); diff --git a/src/test/test_cilk_interop.cpp b/src/test/test_cilk_interop.cpp index 00d27f64b5958f5d3a676d9b101fe0b2c021f707..8f95934d5a2af687b61a313d03f81d70666cb8ea 100644 --- a/src/test/test_cilk_interop.cpp +++ b/src/test/test_cilk_interop.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -124,7 +124,7 @@ void RunCilkOnlyConcurrently ( tbb_sched_injection_mode_t sim ) { NativeParallelFor( P_outer, FibBody() ); } -void RunSandwich( bool sandwich ) { +void RunSandwich( bool sandwich ) { g_sandwich = sandwich; tbb::task_scheduler_init init(P_outer); int m = TBB_Fib(N); diff --git a/src/test/test_combinable.cpp b/src/test/test_combinable.cpp index 59be6415026cfc2e0bb2f5c892202f9fac690ed3..3da28fa30d9da86fe0137be982f0bef43ac75dfc 100644 --- a/src/test/test_combinable.cpp +++ b/src/test/test_combinable.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -119,9 +119,9 @@ class CombineEachHelper { public: CombineEachHelper(T& _result) : my_result(_result) {} void operator()(const T& new_bit) { my_result += new_bit; } - CombineEachHelper& operator=(const CombineEachHelper& other) { - my_result = other; - return *this; + CombineEachHelper& operator=(const CombineEachHelper& other) { + my_result = other; + return *this; } private: T& my_result; @@ -132,10 +132,10 @@ class CombineEachHelperCnt { public: CombineEachHelperCnt(T& _result, int& _nbuckets) : my_result(_result), nBuckets(_nbuckets) {} void operator()(const T& new_bit) { my_result += new_bit; ++nBuckets; } - CombineEachHelperCnt& operator=(const CombineEachHelperCnt& other) { - my_result = other.my_result; + CombineEachHelperCnt& operator=(const CombineEachHelperCnt& other) { + my_result = other.my_result; nBuckets = other.nBuckets; - return *this; + return *this; } private: T& my_result; @@ -147,7 +147,7 @@ class CombineEachVectorHelper { public: typedef std::vector > ContainerType; CombineEachVectorHelper(T& _result) : my_result(_result) { } - void operator()(const ContainerType& new_bit) { + void operator()(const ContainerType& new_bit) { for(typename ContainerType::const_iterator ci = new_bit.begin(); ci != new_bit.end(); ++ci) { my_result += *ci; } @@ -168,12 +168,12 @@ void run_serial_scalar_tests(const char *test_name) { REMARK("Testing serial %s... ", test_name); for (int t = -1; t < REPETITIONS; ++t) { - if (Verbose && t == 0) t0 = tbb::tick_count::now(); + if (Verbose && t == 0) t0 = tbb::tick_count::now(); for (int i = 0; i < N; ++i) { - sum += 1; + sum += 1; } } - + double ResultValue = sum; ASSERT( EXPECTED_SUM == ResultValue, NULL); REMARK("done\nserial %s, 0, %g, %g\n", test_name, ResultValue, ( tbb::tick_count::now() - t0).seconds()); @@ -182,40 +182,40 @@ void run_serial_scalar_tests(const char *test_name) { template class ParallelScalarBody: NoAssign { - + tbb::combinable &sums; - + public: ParallelScalarBody ( tbb::combinable &_sums ) : sums(_sums) { } void operator()( const tbb::blocked_range &r ) const { - for (int i = r.begin(); i != r.end(); ++i) { + for (int i = r.begin(); i != r.end(); ++i) { bool was_there; T& my_local = sums.local(was_there); if(!was_there) my_local = 0; my_local += 1 ; } } - + }; // parallel body with no test for first access. template class ParallelScalarBodyNoInit: NoAssign { - + tbb::combinable &sums; - + public: ParallelScalarBodyNoInit ( tbb::combinable &_sums ) : sums(_sums) { } void operator()( const tbb::blocked_range &r ) const { - for (int i = r.begin(); i != r.end(); ++i) { + for (int i = r.begin(); i != r.end(); ++i) { sums.local() += 1 ; } } - + }; template< typename T > @@ -223,12 +223,12 @@ void RunParallelScalarTests(const char *test_name) { tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred); - for (int p = MinThread; p <= MaxThread; ++p) { + for (int p = MinThread; p <= MaxThread; ++p) { if (p == 0) continue; - REMARK("Testing parallel %s on %d thread(s)... ", test_name, p); + REMARK("Testing parallel %s on %d thread(s)... ", test_name, p); init.initialize(p); tbb::tick_count t0; @@ -244,12 +244,12 @@ void RunParallelScalarTests(const char *test_name) { T combine_finit_sum(0); for (int t = -1; t < REPETITIONS; ++t) { - if (Verbose && t == 0) t0 = tbb::tick_count::now(); + if (Verbose && t == 0) t0 = tbb::tick_count::now(); tbb::combinable sums; FunctorAddFinit my_finit_decl; tbb::combinable finit_combinable(my_finit_decl); - + tbb::parallel_for( tbb::blocked_range( 0, N, 10000 ), ParallelScalarBodyNoInit( finit_combinable ) ); tbb::parallel_for( tbb::blocked_range( 0, N, 10000 ), ParallelScalarBody( sums ) ); @@ -260,7 +260,7 @@ void RunParallelScalarTests(const char *test_name) { CombineEachHelper my_helper(combine_each_sum); sums.combine_each(my_helper); - + // test assignment tbb::combinable assigned; assigned = sums; @@ -275,7 +275,7 @@ void RunParallelScalarTests(const char *test_name) { ASSERT( EXPECTED_SUM == assign_sum, NULL); ASSERT( EXPECTED_SUM == combine_finit_sum, NULL); - REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, static_cast(combine_sum), + REMARK("done\nparallel %s, %d, %g, %g\n", test_name, p, static_cast(combine_sum), ( tbb::tick_count::now() - t0).seconds()); init.terminate(); } @@ -284,9 +284,9 @@ void RunParallelScalarTests(const char *test_name) { template class ParallelVectorForBody: NoAssign { - + tbb::combinable< std::vector > > &locals; - + public: ParallelVectorForBody ( tbb::combinable< std::vector > > &_locals ) : locals(_locals) { } @@ -298,7 +298,7 @@ public: locals.local().push_back( one ); } } - + }; template< typename T > @@ -307,7 +307,7 @@ void RunParallelVectorTests(const char *test_name) { tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred); typedef std::vector > ContainerType; - for (int p = MinThread; p <= MaxThread; ++p) { + for (int p = MinThread; p <= MaxThread; ++p) { if (p == 0) continue; REMARK("Testing parallel %s on %d thread(s)... ", test_name, p); @@ -318,7 +318,7 @@ void RunParallelVectorTests(const char *test_name) { T sum3 = 0; for (int t = -1; t < REPETITIONS; ++t) { - if (Verbose && t == 0) t0 = tbb::tick_count::now(); + if (Verbose && t == 0) t0 = tbb::tick_count::now(); typedef typename tbb::combinable< ContainerType > CombinableType; CombinableType vs; @@ -399,7 +399,7 @@ TestLocalAllocations( int nthread ) { } -void +void RunParallelTests() { RunParallelScalarTests("int"); RunParallelScalarTests("double"); diff --git a/src/test/test_composite_node.cpp b/src/test/test_composite_node.cpp index f70c27650f641dc1a2458f91b8edae337e622c58..705ea11069336d51f18e0baa42077f09d1541fd4 100644 --- a/src/test/test_composite_node.cpp +++ b/src/test/test_composite_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -37,17 +37,17 @@ class src_body{ int finish; int step; public: - src_body(int f, int s) : start(1), finish(f), step(s) {} + src_body(int f, int s) : start(1), finish(f), step(s) {} bool operator()(int &a) { a = start; if (start <= finish) { a = start; start+=step; return true; - } + } else { return false; - }; + }; } }; @@ -65,7 +65,7 @@ int operator()(int i){return i;} }; template -struct compare { +struct compare { static void compare_refs(T1 tuple1, T2 tuple2) { ASSERT( &tbb::flow::get(tuple1) == &tbb::flow::get(tuple2), "ports not set correctly"); compare::compare_refs(tuple1, tuple2); @@ -73,7 +73,7 @@ struct compare { }; template -struct compare<1, T1, T2> { +struct compare<1, T1, T2> { static void compare_refs(T1 tuple1, T2 tuple2) { ASSERT(&tbb::flow::get<0>(tuple1) == &tbb::flow::get<0>(tuple2), "port 0 not correctly set"); } @@ -82,10 +82,10 @@ struct compare<1, T1, T2> { void add_all_nodes (){ tbb::flow::graph g; - typedef tbb::flow::tuple, int, int, int, int, - int, int, int, int, int, int, int, int > InputTupleType; + typedef tbb::flow::tuple, int, int, int, int, + int, int, int, int, int, int, int, int > InputTupleType; - typedef tbb::flow::tuple, tbb::flow::tagged_msg, + typedef tbb::flow::tuple, tbb::flow::tagged_msg, int, int, int, int, int, int, int, int, int, int, int, int > OutputTupleType; typedef tbb::flow::tuple< > EmptyTupleType; @@ -114,28 +114,28 @@ void add_all_nodes (){ tbb::flow::overwrite_node ovw(g); tbb::flow::sequencer_node seq(g, seq_body()); - #if !(__GNUC__==4 && __GNUC_MINOR__==4 && !defined(__clang__)) + #if !(__GNUC__==4 && __GNUC_MINOR__==4 && !defined(__clang__)) // upcasting of a tuple of reference from derived to base fails on gcc4.4 (and all icc in this environment) // if std::tie is used to create the tuple of references - auto input_tuple = std::tie(ct, s, m_fxn, fxn, bc, tbb::flow::input_port<0>(j), lim, q, tbb::flow::input_port<0>(ind), + auto input_tuple = std::tie(ct, s, m_fxn, fxn, bc, tbb::flow::input_port<0>(j), lim, q, tbb::flow::input_port<0>(ind), pq, ovw, wo, bf, seq); - auto output_tuple = std::tie(ct,j, ind, fxn, src, bc, tbb::flow::output_port<0>(s), lim, tbb::flow::output_port<0>(m_fxn), + auto output_tuple = std::tie(ct,j, ind, fxn, src, bc, tbb::flow::output_port<0>(s), lim, tbb::flow::output_port<0>(m_fxn), q, pq, ovw, wo, bf, seq ); #else - input_output_type::input_ports_type input_tuple(ct, s, m_fxn, fxn, bc, tbb::flow::input_port<0>(j), lim, q, + input_output_type::input_ports_type input_tuple(ct, s, m_fxn, fxn, bc, tbb::flow::input_port<0>(j), lim, q, tbb::flow::input_port<0>(ind), pq, ovw, wo, bf, seq); input_output_type::output_ports_type output_tuple(ct,j, ind, fxn, src, bc, tbb::flow::output_port<0>(s), lim, tbb::flow::output_port<0>(m_fxn), q, pq, ovw, wo, bf, seq); #endif - //composite_node with both input_ports and output_ports + //composite_node with both input_ports and output_ports input_output_type a_node(g); - a_node.set_external_ports(input_tuple, output_tuple); - + a_node.set_external_ports(input_tuple, output_tuple); + a_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq); a_node.add_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq); - + auto a_node_input_ports_ptr = a_node.input_ports(); compare::compare_refs(a_node_input_ports_ptr, input_tuple); ASSERT (NUM_INPUTS == tbb::flow::tuple_size::value, "not all declared input ports were bound to nodes"); @@ -145,7 +145,7 @@ void add_all_nodes (){ ASSERT(NUM_OUTPUTS == tbb::flow::tuple_size::value, "not all declared output ports were bound to nodes"); //composite_node with only input_ports - input_only_type b_node(g); + input_only_type b_node(g); b_node.set_external_ports(input_tuple); b_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq); @@ -156,7 +156,7 @@ void add_all_nodes (){ ASSERT (NUM_INPUTS == tbb::flow::tuple_size::value, "not all declared input ports were bound to nodes"); //composite_node with only output_ports - output_only_type c_node(g); + output_only_type c_node(g); c_node.set_external_ports(output_tuple); c_node.add_visible_nodes(src, fxn, m_fxn, bc, lim, ind, s, ct, j, q, bf, pq, wo, ovw, seq); @@ -176,7 +176,7 @@ struct tiny_node : public tbb::flow::composite_node< tbb::flow::tuple< int >, tb public: tiny_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), f1(g, tbb::flow::unlimited, passthru_body() ), f2(g, tbb::flow::unlimited, passthru_body() ) { tbb::flow::make_edge( f1, f2 ); - + tbb::flow::tuple& > input_tuple(f1); tbb::flow::tuple& > output_tuple(f2); base_type::set_external_ports( input_tuple, output_tuple ); @@ -216,7 +216,7 @@ int test_tiny(bool hidden = false) { int i, j =0; q.try_get(i); - ASSERT( i == 1, "item did not go through graph"); + ASSERT( i == 1, "item did not go through graph"); q.try_get(j); ASSERT( !j, "unexpected item in graph"); g.wait_for_all(); @@ -227,20 +227,20 @@ int test_tiny(bool hidden = false) { tbb::flow::make_edge( t1 , f3 ); tbb::flow::make_edge(f3, q); - + f0.try_put(2); g.wait_for_all(); q.try_get(i); - ASSERT( i == 2, "item did not go through graph after removal of edge"); + ASSERT( i == 2, "item did not go through graph after removal of edge"); q.try_get(j); ASSERT( !j, "unexpected item in graph after removal of edge"); - return 0; + return 0; } class adder_node : public tbb::flow::composite_node< tbb::flow::tuple< int, int >, tbb::flow::tuple< int > > { -public: +public: tbb::flow::join_node< tbb::flow::tuple< int, int >, tbb::flow::queueing > j; tbb::flow::function_node< tbb::flow::tuple< int, int >, int > f; private: @@ -255,9 +255,9 @@ private: public: adder_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), j(g), f(g, tbb::flow::unlimited, f_body() ) { tbb::flow::make_edge( j, f ); - + base_type::set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(j), tbb::flow::input_port<1>(j)), base_type::output_ports_type(f)); - + if (hidden) base_type::add_nodes(j, f); else @@ -269,7 +269,7 @@ public: struct square_body { int operator()(int v) { return v*v; } }; struct cube_body { int operator()(int v) { return v*v*v; } }; int adder_sum(int i) { - return (int)(pow(3*pow(i,3) + pow(i, 2),2)); + return (int)(pow(3*pow(i,3) + pow(i, 2),2)); } int test_adder(bool hidden = false) { tbb::flow::graph g; @@ -299,7 +299,7 @@ int test_adder(bool hidden = false) { tbb::flow::function_node s2(g, tbb::flow::unlimited, square_body()); tbb::flow::queue_node q(g); - + tbb::flow::make_edge( s, tbb::flow::input_port<0>(a0) ); tbb::flow::make_edge( c, tbb::flow::input_port<1>(a0) ); @@ -311,7 +311,7 @@ int test_adder(bool hidden = false) { tbb::flow::make_edge( tbb::flow::output_port<0>(a2), s2 ); tbb::flow::make_edge( s2, q ); - + int sum_total=0; int result=0; for ( int i = 1; i < 4; ++i ) { @@ -324,7 +324,7 @@ int test_adder(bool hidden = false) { int j; for ( int i = 1; i < 4; ++i ) { q.try_get(j); - result += j; + result += j; } g.wait_for_all(); ASSERT(result == sum_total, "the sum from the graph does not match the calculated value"); @@ -347,27 +347,27 @@ int test_adder(bool hidden = false) { for ( int i = 10; i < 20; ++i ) { q.try_get(j); - result += j; + result += j; } g.wait_for_all(); ASSERT(result == sum_total, "the new sum after the replacement of the nodes does not match the calculated value"); - return 0; + return 0; } -/* +/* outer composite node (outer_node) |-------------------------------------------------------------------| | | | |------------------| |------------------| |------------------| | - |---------------------| |--| inner composite | /| inner composite | /| inner composite | | |-------------------| + |---------------------| |--| inner composite | /| inner composite | /| inner composite | | |-------------------| |broadcast node(input)|/| | node |/ | node |/ | node |-+-| queue node(output)| |---------------------|\| |(inner_node1) |\ | (inner_node2) |\ | (inner_node3) | | |-------------------| |--| | \| | \| | | | |------------------| |------------------| |------------------| | | | |-------------------------------------------------------------------| - + */ int test_nested_adder(bool hidden=false) { tbb::flow::graph g; @@ -380,7 +380,7 @@ int test_nested_adder(bool hidden=false) { adder_node inner_node2(g, hidden); adder_node inner_node3(g, hidden); - outer_node.set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(inner_node1), tbb::flow::input_port<1>(inner_node1)), base_type::output_ports_type(tbb::flow::output_port<0>(inner_node3))); + outer_node.set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(inner_node1), tbb::flow::input_port<1>(inner_node1)), base_type::output_ports_type(tbb::flow::output_port<0>(inner_node3))); ASSERT(&tbb::flow::input_port<0>(outer_node) == &tbb::flow::input_port<0>(inner_node1), "input port 0 of inner_node1 not bound to input port 0 in outer_node"); ASSERT(&tbb::flow::input_port<1>(outer_node) == &tbb::flow::input_port<1>(inner_node1), "input port 1 of inner_node1 not bound to input port 1 in outer_node"); @@ -450,7 +450,7 @@ public: base_type::add_nodes(j,s,f); else base_type::add_visible_nodes(j,s,f); - + } }; @@ -463,7 +463,7 @@ int test_prefix(bool hidden = false) { ASSERT(&tbb::flow::get<2>(p.input_ports()) == &tbb::flow::input_port<2>(p.j), "input port 2 of j is not bound to input port 2 of composite node p"); ASSERT(&tbb::flow::input_port<3>(p.j) == &tbb::flow::input_port<3>(p.j), "input port 3 of j is not bound to input port 3 of composite node p"); ASSERT(&tbb::flow::get<4>(p.input_ports()) == &tbb::flow::input_port<4>(p.j), "input port 4 of j is not bound to input port 4 of composite node p"); - + ASSERT(&tbb::flow::get<0>(p.output_ports()) == &tbb::flow::output_port<0>(p.s), "output port 0 of s is not bound to output port 0 of composite node p"); ASSERT(&tbb::flow::output_port<1>(p.s) == &tbb::flow::output_port<1>(p.s), "output port 1 of s is not bound to output port 1 of composite node p"); @@ -495,7 +495,7 @@ int test_prefix(bool hidden = false) { g.wait_for_all(); } } - return 0; + return 0; } void input_only_output_only_composite(bool hidden) { @@ -526,17 +526,17 @@ void input_only_output_only_composite(bool hidden) { a_in.set_external_ports(input_tuple); ASSERT(&tbb::flow::get<0>(a_in.input_ports()) == &f, "f not bound to input port 0 in composite_node a_in"); - tbb::flow::tuple output_tuple(src); + tbb::flow::tuple output_tuple(src); a_out.set_external_ports(output_tuple); ASSERT(&tbb::flow::get<0>(a_out.output_ports()) == &src, "src not bound to output port 0 in composite_node a_out"); - - if(hidden) { - a_in.add_nodes(f, que); - a_out.add_nodes(src); + + if(hidden) { + a_in.add_nodes(f, que); + a_out.add_nodes(src); } else { - a_in.add_visible_nodes(f, que); + a_in.add_visible_nodes(f, que); a_out.add_visible_nodes(src); - } + } tbb::flow::make_edge(a_out, a_in); tbb::flow::make_edge(f, que); @@ -550,7 +550,7 @@ void input_only_output_only_composite(bool hidden) { g.wait_for_all(); } -#endif // __TBB_FLOW_GRAPH_CPP11_FEATURES +#endif // __TBB_FLOW_GRAPH_CPP11_FEATURES int TestMain() { @@ -567,10 +567,10 @@ int TestMain() { test_prefix(true); input_only_output_only_composite(true); input_only_output_only_composite(false); - - return Harness::Done; -#else - return Harness::Skipped; -#endif + + return Harness::Done; +#else + return Harness::Skipped; +#endif } diff --git a/src/test/test_concurrent_hash_map.cpp b/src/test/test_concurrent_hash_map.cpp index 4104eca8af2d228fcbcf4833c0743210bf4f8d58..6a33961133bc8f69843edaf88a8bbd86fe959e42 100644 --- a/src/test/test_concurrent_hash_map.cpp +++ b/src/test/test_concurrent_hash_map.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_concurrent_lru_cache.cpp b/src/test/test_concurrent_lru_cache.cpp index 1dedbf451bc571c69dc213078aa596e4572bd385..989fd1cf79d2a15ea57d1d473be7725ae445e9e8 100644 --- a/src/test/test_concurrent_lru_cache.cpp +++ b/src/test/test_concurrent_lru_cache.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_concurrent_monitor.cpp b/src/test/test_concurrent_monitor.cpp index 40e5eb2a9018c0d02948110d4083c27724bcb33f..20d879f8dbedca72ff7de462c8476cd88dca277d 100644 --- a/src/test/test_concurrent_monitor.cpp +++ b/src/test/test_concurrent_monitor.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -328,7 +328,7 @@ struct AllButOneSleep : NoAssign { try { ++n_sleepers; mon->commit_wait( thr_ctx ); - if( --n_sleepers>VLN ) + if( --n_sleepers>VLN ) break; } catch( tbb::user_abort& ) { // can no longer access 'mon' diff --git a/src/test/test_concurrent_priority_queue.cpp b/src/test/test_concurrent_priority_queue.cpp index a0f6cd735bda917358f905dc120f0f132fd5ae4f..3dcd9418358e05814de244c02574c9755f39dbed 100644 --- a/src/test/test_concurrent_priority_queue.cpp +++ b/src/test/test_concurrent_priority_queue.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -85,8 +85,8 @@ class my_throwing_type : public my_data_type { public: static int throw_flag; my_throwing_type() : my_data_type() {} - my_throwing_type(const my_throwing_type& src) : my_data_type(src) { - if (my_throwing_type::throw_flag) throw 42; + my_throwing_type(const my_throwing_type& src) : my_data_type(src) { + if (my_throwing_type::throw_flag) throw 42; priority = src.priority; } }; @@ -122,7 +122,7 @@ class FillBody : NoAssign { T my_max, my_min; concurrent_priority_queue *q; C less_than; -public: +public: FillBody(int nThread_, T max_, T min_, concurrent_priority_queue *q_) : nThread(nThread_), my_max(max_), my_min(min_), q(q_) {} void operator()(const int threadID) const { T elem = my_min + T(threadID); @@ -162,8 +162,8 @@ class FloggerBody : NoAssign { int nThread; concurrent_priority_queue *q; public: - FloggerBody(int nThread_, concurrent_priority_queue *q_) : - nThread(nThread_), q(q_) {} + FloggerBody(int nThread_, concurrent_priority_queue *q_) : + nThread(nThread_), q(q_) {} void operator()(const int threadID) const { T elem = T(threadID+1); for (size_t i=0; isize()==42, "FAILED assignment/size test."); ASSERT(!qo->empty(), "FAILED assignment/empty test."); @@ -349,7 +349,7 @@ void TestSerialPushPop() { REMARK("Pushing complete.\n"); ASSERT(q->size()==MAX_ITER, "FAILED push/size test."); ASSERT(!q->empty(), "FAILED push/empty test."); - + REMARK("Testing serial pop.\n"); while (!q->empty()) { ASSERT(q->try_pop(e), "FAILED pop test."); @@ -378,7 +378,7 @@ void TestParallelPushPop(int nThreads, T t_max, T t_min, C /*compare*/) { qsize = q->size(); ASSERT(q->size()==nThreads*MAX_ITER, "FAILED push/size test."); ASSERT(!q->empty(), "FAILED push/empty test."); - + REMARK("Testing parallel pop.\n"); NativeParallelFor(nThreads, emptier); REMARK("Popping complete.\n"); @@ -531,15 +531,15 @@ struct special_member_calls_t { size_t move_constructor_called_times; size_t copy_assignment_called_times; size_t move_assignment_called_times; - + bool friend operator==(special_member_calls_t const& lhs, special_member_calls_t const& rhs){ - return - lhs.copy_constructor_called_times == rhs.copy_constructor_called_times + return + lhs.copy_constructor_called_times == rhs.copy_constructor_called_times && lhs.move_constructor_called_times == rhs.move_constructor_called_times && lhs.copy_assignment_called_times == rhs.copy_assignment_called_times && lhs.move_assignment_called_times == rhs.move_assignment_called_times; } - + }; #if __TBB_CPP11_RVALUE_REF_PRESENT struct MoveOperationTracker { diff --git a/src/test/test_concurrent_queue.cpp b/src/test/test_concurrent_queue.cpp index 885899ab1f74c231e465197db974852d4bba8d74..e677f041c70a4820a08aa2c89ef80ad7ec506d1a 100644 --- a/src/test/test_concurrent_queue.cpp +++ b/src/test/test_concurrent_queue.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -1236,7 +1236,7 @@ void TestFullness() TestFullQueue,Foo>(); } -void TestClearWorks() +void TestClearWorks() { REMARK(" Test concurrent_queue::clear() works\n"); TestClear >(); @@ -1264,7 +1264,7 @@ void TestQueueIteratorWorks() #endif class Empty; -void TestQueueConstructors() +void TestQueueConstructors() { REMARK(" Test concurrent_queue's constructors work\n"); TestConstructors,Bar,BarIterator,ConcQWithSizeWrapper,BAR_EX>(); @@ -1385,7 +1385,7 @@ void TestAbort() { ASSERT(num_pushed == 0, "no elements should have been pushed to zero-sized queue"); ASSERT((int)failed_pushes == nthreads, "All threads should have failed to push an element to zero-sized queue"); } - + REMARK("...testing pushing to small-sized queue\n"); tbb::concurrent_bounded_queue iq2; iq2.set_capacity(2); @@ -1394,12 +1394,12 @@ void TestAbort() { SimplePushBody my_push_body2(&iq2, nthreads); NativeParallelFor( nthreads+1, my_push_body2 ); ASSERT(num_pushed <= 2, "at most 2 elements should have been pushed to queue of size 2"); - if (nthreads >= 2) + if (nthreads >= 2) ASSERT((int)failed_pushes == nthreads-2, "nthreads-2 threads should have failed to push an element to queue of size 2"); int e; while (iq2.try_pop(e)) ; } - + REMARK("...testing popping from small-sized queue\n"); tbb::concurrent_bounded_queue iq3; iq3.set_capacity(2); @@ -1428,7 +1428,7 @@ void TestAbort() { SimplePushBody my_push_body2(&iq4, nthreads); NativeParallelFor( nthreads+1, my_push_body2 ); ASSERT((int)num_pushed <= cap, "at most cap elements should have been pushed to queue of size cap"); - if (nthreads >= cap) + if (nthreads >= cap) ASSERT((int)failed_pushes == nthreads-cap, "nthreads-cap threads should have failed to push an element to queue of size cap"); SimplePopBody my_pop_body(&iq4, nthreads); NativeParallelFor( nthreads+1, my_pop_body); diff --git a/src/test/test_concurrent_queue_whitebox.cpp b/src/test/test_concurrent_queue_whitebox.cpp index b501946cb27f205cb03651d2bfb7b865034aec17..2542909962ddbc09c1bc146d9d6d55f979d84cfd 100644 --- a/src/test/test_concurrent_queue_whitebox.cpp +++ b/src/test/test_concurrent_queue_whitebox.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_concurrent_unordered_common.h b/src/test/test_concurrent_unordered_common.h index 37e2106304fb9dc017f845500ba9104fe67cb1c2..978b9eb6f5f43f840d1caad8ed54af9e85b5503b 100644 --- a/src/test/test_concurrent_unordered_common.h +++ b/src/test/test_concurrent_unordered_common.h @@ -1,5 +1,5 @@ /* - 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 @@ -540,14 +540,14 @@ template struct ParallelTraverseBody: NoAssign { const int n; AtomicByte* const array; - ParallelTraverseBody( AtomicByte an_array[], int a_n ) : + ParallelTraverseBody( AtomicByte an_array[], int a_n ) : n(a_n), array(an_array) {} void operator()( const RangeType& range ) const { for( typename RangeType::iterator i = range.begin(); i!=range.end(); ++i ) { int k = Value::key(*i); ASSERT( k == Value::get(*i), NULL ); - ASSERT( 0<=k && k { // mapped_type& operator[](const key_type& k); cont[1] = 2; - // bool empty() const; + // bool empty() const; ASSERT( !ccont.empty( ), "Concurrent container empty after adding an element" ); // size_type size() const; @@ -114,7 +114,7 @@ struct SpecialTests { // mapped_type& operator[](const key_type& k); cont.insert( std::make_pair( 1, one_values[0] ) ); - // bool empty() const; + // bool empty() const; ASSERT( !ccont.empty( ), "Concurrent container empty after adding an element" ); // size_type size() const; @@ -125,7 +125,7 @@ struct SpecialTests { cont.insert( std::make_pair( 1, one_values[1] ) ); - // bool empty() const; + // bool empty() const; ASSERT( !ccont.empty( ), "Concurrent container empty after adding an element" ); // size_type size() const; @@ -142,7 +142,7 @@ struct SpecialTests { cont.insert( std::make_pair( 0, zero_values[0] ) ); - // bool empty() const; + // bool empty() const; ASSERT( !ccont.empty( ), "Concurrent container empty after adding an element" ); // size_type size() const; @@ -320,7 +320,7 @@ int TestMain() { test_rvalue_ref_support( "concurrent unordered map" ); test_rvalue_ref_support( "concurrent unordered multimap" ); #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ - + TestTypes(); return Harness::Done; diff --git a/src/test/test_concurrent_unordered_set.cpp b/src/test/test_concurrent_unordered_set.cpp index 9f732d59ed35ae707a40145f7604cb7697621ff2..b4e7005fe8dfaa2927fb146081c2b0f9270869ac 100644 --- a/src/test/test_concurrent_unordered_set.cpp +++ b/src/test/test_concurrent_unordered_set.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_concurrent_vector.cpp b/src/test/test_concurrent_vector.cpp index 5e7564bd8236c7f33ae34c795936593fec4e580e..375d656e32f0b5ad12410ec448ae5d6fd01a906b 100644 --- a/src/test/test_concurrent_vector.cpp +++ b/src/test/test_concurrent_vector.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -247,8 +247,8 @@ void CheckIteratorComparison( V& u ) { ASSERT( (i>j)==(i_count>j_count), NULL ); ASSERT( (i<=j)==(i_count<=j_count), NULL ); ASSERT( (i>=j)==(i_count>=j_count), NULL ); - ASSERT( !(i==i2), NULL ); - ASSERT( i!=i2, NULL ); + ASSERT( !(i==i2), NULL ); + ASSERT( i!=i2, NULL ); ++j; ++i2; } @@ -1780,7 +1780,7 @@ int TestMain () { TestExceptionSafetyGuaranteesMoveConstructorWithUnEqualAllocatorExceptionInElementCtor(); TestExceptionSafetyGuaranteesForMoveAssignOperatorWithUnEqualAllocatorMemoryFailure(); TestExceptionSafetyGuaranteesForMoveAssignOperatorWithUnEqualAllocatorExceptionInElementCtor(); - TestPushBackMoveExceptionSafety(); + TestPushBackMoveExceptionSafety(); #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT TestEmplaceBackExceptionSafety(); #endif /*__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT */ diff --git a/src/test/test_condition_variable.h b/src/test/test_condition_variable.h index 0bb04202e9a33bfd30f23309714d2f5b7a87ebcf..caf260ed28b3477d1de48a9c9c70c777dc3b5815 100644 --- a/src/test/test_condition_variable.h +++ b/src/test/test_condition_variable.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_container_move_support.h b/src/test/test_container_move_support.h index 28981c55b392923c8849449b43392f3397cd0342..b554cb8582202c6733041bbba5621c5311fcef3d 100644 --- a/src/test/test_container_move_support.h +++ b/src/test/test_container_move_support.h @@ -1,5 +1,5 @@ /* - 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 @@ -152,7 +152,7 @@ public: } Foo(){ my_bar = initial_value_of_bar; - FooCount++; + FooCount++; } Foo( const Foo& foo ): FooLimit(), StateTrackable(foo){ my_bar = foo.my_bar; diff --git a/src/test/test_continue_node.cpp b/src/test/test_continue_node.cpp index 4d0f64535185aa4326baf0d7ebeb4b7a1e4eca5b..93b388bc1660c8ca95a1b04313028f0bc1658b12 100644 --- a/src/test/test_continue_node.cpp +++ b/src/test/test_continue_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -38,7 +38,7 @@ struct fake_continue_sender : public tbb::flow::sender typedef tbb::flow::receiver successor_type; // Define implementations of virtual methods that are abstract in the base class /*override*/ bool register_successor( successor_type& ) { return false; } - /*override*/ bool remove_successor( successor_type& ) { return false; } + /*override*/ bool remove_successor( successor_type& ) { return false; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef tbb::flow::sender::built_successors_type built_successors_type; built_successors_type bst; @@ -212,7 +212,7 @@ void test_concurrency(int num_threads) { } /* * Connection of two graphs is not currently supported, but works to some limited extent. - * This test is included to check for backward compatibility. It checks that a continue_node + * This test is included to check for backward compatibility. It checks that a continue_node * with predecessors in two different graphs receives the required * number of continue messages before it executes. */ @@ -245,7 +245,7 @@ void test_two_graphs(){ start_h.try_put(continue_msg()); g.wait_for_all(); ASSERT(count==1, "Not all continue messages received"); - + //two try_puts from the graph that doesn't contain the node count=0; start_h.try_put(continue_msg()); @@ -278,13 +278,13 @@ void test_extract() { ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(c0.predecessor_count() == 2 && c0.successor_count() == 1, "c0 has incorrect counts"); ASSERT(q0.predecessor_count() == 1 && q0.successor_count() == 0, "q0 has incorrect counts"); - + /* b0 */ /* \ */ /* c0 - q0 */ /* / */ /* b1 */ - + b0.try_put(tbb::flow::continue_msg()); g.wait_for_all(); ASSERT(my_count == 0, "continue_node fired too soon"); @@ -292,15 +292,15 @@ void test_extract() { g.wait_for_all(); ASSERT(my_count == 1, "continue_node didn't fire"); ASSERT(q0.try_get(cm), "continue_node didn't forward"); - + b0.extract(); - + /* b0 */ /* */ /* c0 - q0 */ /* / */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(c0.predecessor_count() == 1 && c0.successor_count() == 1, "c0 has incorrect counts"); @@ -313,15 +313,15 @@ void test_extract() { g.wait_for_all(); ASSERT(my_count == 2, "continue_node didn't fire though it has only one predecessor"); ASSERT(q0.try_get(cm), "continue_node didn't forward second time"); - + c0.extract(); - + /* b0 */ /* */ /* c0 q0 */ /* */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(c0.predecessor_count() == 0 && c0.successor_count() == 0, "c0 has incorrect counts"); @@ -334,24 +334,24 @@ void test_extract() { ASSERT(my_count == 2, "continue didn't fire though it has only one predecessor"); ASSERT(!q0.try_get(cm), "continue_node forwarded though it shouldn't"); make_edge(b0, c0); - + /* b0 */ /* \ */ /* c0 q0 */ /* */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 1, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(c0.predecessor_count() == 1 && c0.successor_count() == 0, "c0 has incorrect counts"); ASSERT(q0.predecessor_count() == 0 && q0.successor_count() == 0, "q0 has incorrect counts"); - + b0.try_put(tbb::flow::continue_msg()); g.wait_for_all(); - + ASSERT(my_count == 3, "continue didn't fire though it has only one predecessor"); ASSERT(!q0.try_get(cm), "continue_node forwarded though it shouldn't"); - + tbb::flow::make_edge(b1, c0); tbb::flow::make_edge(c0, q0); my_count = 0; diff --git a/src/test/test_critical_section.cpp b/src/test/test_critical_section.cpp index 70a82ca59ec62bfd4a6bfec073df5e27fdeb1ac8..c2e8fb4bda47a3212b9fc33bf32107ac4532b837 100644 --- a/src/test/test_critical_section.cpp +++ b/src/test/test_critical_section.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -41,11 +41,11 @@ struct BusyBody : NoAssign { bool test_throw; BusyBody( int nThread_, int workRatiox100_, tbb::enumerable_thread_specific &locals_, int &unprotected_count_, bool test_throw_) : - locals(locals_), - nThread(nThread_), - WorkRatiox100(workRatiox100_), + locals(locals_), + nThread(nThread_), + WorkRatiox100(workRatiox100_), unprotected_count(unprotected_count_), - test_throw(test_throw_) { + test_throw(test_throw_) { sBarrier.initialize(nThread_); } @@ -60,7 +60,7 @@ struct BusyBody : NoAssign { } cs.lock(); ASSERT( !cs.try_lock(), "recursive try_lock must fail" ); -#if TBB_USE_EXCEPTIONS && !__TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN +#if TBB_USE_EXCEPTIONS && !__TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN if(test_throw && j == (nIters / 2)) { bool was_caught = false, unknown_exception = false; @@ -96,11 +96,11 @@ struct BusyBodyScoped : NoAssign { bool test_throw; BusyBodyScoped( int nThread_, int workRatiox100_, tbb::enumerable_thread_specific &locals_, int &unprotected_count_, bool test_throw_) : - locals(locals_), - nThread(nThread_), - WorkRatiox100(workRatiox100_), + locals(locals_), + nThread(nThread_), + WorkRatiox100(workRatiox100_), unprotected_count(unprotected_count_), - test_throw(test_throw_) { + test_throw(test_throw_) { sBarrier.initialize(nThread_); } @@ -113,7 +113,7 @@ struct BusyBodyScoped : NoAssign { for(int i = 0; i < MAX_WORK * (100 - WorkRatiox100); i++) { locals.local() += 1.0; } - { + { tbb::critical_section::scoped_lock my_lock(cs); for(int i = 0; i < MAX_WORK * WorkRatiox100; i++) { locals.local() += 1.0; @@ -168,7 +168,7 @@ RunOneCriticalSectionTest(int nThreads, int csWorkRatio, bool test_throw) { // amount of time. If non-zero, the difference is divided by the time, and the // negative log is taken. If > 2, then the difference is on the order of 0.01*t // where T is the average time. We aritrarily define this as "fair." - etsSigma = sqrt(etsSigmaSq/double(nThreads)); + etsSigma = sqrt(etsSigmaSq/double(nThreads)); etsMax -= etsAvg; // max - a == delta1 etsMin = etsAvg - etsMin; // a - min == delta2 if(etsMax < etsMin) etsMax = etsMin; diff --git a/src/test/test_dynamic_link.cpp b/src/test/test_dynamic_link.cpp index 06108c159e1a6e43645f1124ccb40f370bad9d18..a104f90878d62aa1df59aee26f8b56ea6b66f1a3 100644 --- a/src/test/test_dynamic_link.cpp +++ b/src/test/test_dynamic_link.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -67,7 +67,7 @@ int TestMain () { ASSERT( Harness::GetAddress( Harness::OpenLibrary(NULL), "foo1" ) && Harness::GetAddress( Harness::OpenLibrary(NULL), "foo2" ), "The executable doesn't export its symbols. Is the -rdynamic switch set during linking?" ); #endif /* !_WIN32 */ - // We want to link (or fail to link) to the symbols available from the + // We want to link (or fail to link) to the symbols available from the // executable so it doesn't matter what the library name is specified in // the dynamic_link call - let it be an empty string. // Generally speaking the test has sense only on Linux but on Windows it diff --git a/src/test/test_eh_algorithms.cpp b/src/test/test_eh_algorithms.cpp index 0e40e18c08eb70e60975cd570e5ef6dc42b76c17..3193fbb4fbf3423d719f12d2d4a8f7fbd9f63fbd 100644 --- a/src/test/test_eh_algorithms.cpp +++ b/src/test/test_eh_algorithms.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_eh_flow_graph.cpp b/src/test/test_eh_flow_graph.cpp index c29d3e8374f12c736b411cfdeadfa624ffc90b17..4e035247b1f38e53bd195df86a0c8f4ff77fecb5 100644 --- a/src/test/test_eh_flow_graph.cpp +++ b/src/test/test_eh_flow_graph.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_eh_tasks.cpp b/src/test/test_eh_tasks.cpp index 103d2a7737b25d8cb33d13cb48f64b6171785048..c51c4f3820fc0f4add6ff8bb04c4760a2a5738a7 100644 --- a/src/test/test_eh_tasks.cpp +++ b/src/test/test_eh_tasks.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -114,10 +114,10 @@ inline void WaitForException () { class TaskBase : public tbb::task { tbb::task* execute () { tbb::task* t = NULL; - __TBB_TRY { + __TBB_TRY { t = do_execute(); - } __TBB_CATCH( ... ) { - g_CurStat.IncExecuted(); + } __TBB_CATCH( ... ) { + g_CurStat.IncExecuted(); __TBB_RETHROW(); } g_CurStat.IncExecuted(); @@ -183,13 +183,13 @@ void Test0 () { r.destroy( r ); } -//! Default exception behavior test. -/** Allocates a root task that spawns a bunch of children, one or several of which throw +//! Default exception behavior test. +/** Allocates a root task that spawns a bunch of children, one or several of which throw a test exception in a worker or master thread (depending on the global setting). **/ void Test1 () { ResetGlobals(); tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task; - ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), + ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), "something wrong with the task accounting"); r.set_ref_count(NUM_CHILD_TASKS + 1); for ( int i = 0; i < NUM_CHILD_TASKS; ++i ) @@ -201,15 +201,15 @@ void Test1 () { ASSERT_TEST_POSTCOND(); } // void Test1 () -//! Default exception behavior test. +//! Default exception behavior test. /** Allocates and spawns root task that runs a bunch of children, one of which throws - a test exception in a worker thread. (Similar to Test1, except that the root task - is spawned by the test function, and children are created by the root task instead + a test exception in a worker thread. (Similar to Test1, except that the root task + is spawned by the test function, and children are created by the root task instead of the test function body.) **/ void Test2 () { ResetGlobals(); SimpleRootTask &r = *new( tbb::task::allocate_root() ) SimpleRootTask; - ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), + ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), "something wrong with the task accounting"); TRY(); tbb::task::spawn_root_and_wait(r); @@ -219,13 +219,13 @@ void Test2 () { } // void Test2 () //! The same as Test2() except the root task has explicit context. -/** The context is initialized as bound in order to check correctness of its associating +/** The context is initialized as bound in order to check correctness of its associating with a root task. **/ void Test3 () { ResetGlobals(); tbb::task_group_context ctx(tbb::task_group_context::bound); SimpleRootTask &r = *new( tbb::task::allocate_root(ctx) ) SimpleRootTask; - ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), + ASSERT (g_CurStat.Existing() == 1 && g_CurStat.Existed() == 1 && !g_CurStat.Executed(), "something wrong with the task accounting"); TRY(); tbb::task::spawn_root_and_wait(r); @@ -236,7 +236,7 @@ void Test3 () { class RootLauncherTask : public TaskBase { tbb::task_group_context::kind_type m_CtxKind; - + tbb::task* do_execute () { tbb::task_group_context ctx(m_CtxKind); SimpleRootTask &r = *new( allocate_root() ) SimpleRootTask; @@ -253,8 +253,8 @@ public: RootLauncherTask ( tbb::task_group_context::kind_type ctx_kind = tbb::task_group_context::isolated ) : m_CtxKind(ctx_kind) {} }; -/** Allocates and spawns a bunch of roots, which allocate and spawn new root with - isolated context, which at last spawns a bunch of children each, one of which +/** Allocates and spawns a bunch of roots, which allocate and spawn new root with + isolated context, which at last spawns a bunch of children each, one of which throws a test exception in a worker thread. **/ void Test4 () { ResetGlobals(); @@ -305,8 +305,8 @@ class RootsGroupLauncherTask : public TaskBase { } }; -/** Allocates and spawns a bunch of roots, which allocate and spawn groups of roots - with an isolated context shared by all group members, which at last spawn a bunch +/** Allocates and spawns a bunch of roots, which allocate and spawn groups of roots + with an isolated context shared by all group members, which at last spawn a bunch of children each, one of which throws a test exception in a worker thread. **/ void Test5 () { ResetGlobals(); @@ -381,10 +381,10 @@ public: }; // class BoundHierarchyLauncherTask //! Test for bound contexts forming 2 level tree. Exception is thrown on the 1st (root) level. -/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing - the same isolated context, each of which in their turn spawns a single 3rd level - root with the bound context, and these 3rd level roots spawn bunches of leaves - in the end. Leaves do not generate exceptions. The test exception is generated +/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing + the same isolated context, each of which in their turn spawns a single 3rd level + root with the bound context, and these 3rd level roots spawn bunches of leaves + in the end. Leaves do not generate exceptions. The test exception is generated by one of the 2nd level roots. **/ void Test6 () { ResetGlobals(); @@ -393,14 +393,14 @@ void Test6 () { tbb::task::spawn_root_and_wait(r); CATCH_AND_ASSERT(); ASSERT (!l_ExceptionCaughtAtCurrentLevel, "unexpected exception intercepted"); - // After the first of the branches (ThrowingRootLauncherTask) completes, + // After the first of the branches (ThrowingRootLauncherTask) completes, // the rest of the task tree may be collapsed before having a chance to execute leaves. // A number of branches running concurrently with the first one will be able to spawn leaves though. /// \todo: If additional checkpoints are added to scheduler the following assertion must weaken intptr_t num_tasks_expected = 1 + NUM_ROOT_TASKS * (2 + NUM_CHILD_TASKS); intptr_t min_num_tasks_created = 1 + g_NumThreads * 2 + NUM_CHILD_TASKS; // 2 stands for BoundHierarchyLauncherTask and SimpleRootTask - // 1 corresponds to BoundHierarchyLauncherTask + // 1 corresponds to BoundHierarchyLauncherTask intptr_t min_num_tasks_executed = 2 + 1 + NUM_CHILD_TASKS; ASSERT (g_CurStat.Existed() <= num_tasks_expected, "Number of expected tasks is calculated incorrectly"); ASSERT (g_CurStat.Existed() >= min_num_tasks_created, "Too few tasks created"); @@ -409,10 +409,10 @@ void Test6 () { } // void Test6 () //! Tests task_group_context::unbind and task_group_context::reset methods. -/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing - the same isolated context, each of which in their turn spawns a single 3rd level - root with the bound context, and these 3rd level roots spawn bunches of leaves - in the end. Leaves do not generate exceptions. The test exception is generated +/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing + the same isolated context, each of which in their turn spawns a single 3rd level + root with the bound context, and these 3rd level roots spawn bunches of leaves + in the end. Leaves do not generate exceptions. The test exception is generated by one of the 2nd level roots. **/ void Test7 () { ResetGlobals(); @@ -440,9 +440,9 @@ class BoundHierarchyLauncherTask2 : public TaskBase { }; // class BoundHierarchyLauncherTask2 //! Test for bound contexts forming 2 level tree. Exception is thrown in the 2nd (outer) level. -/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing - the same isolated context, each of which in their turn spawns a single 3rd level - root with the bound context, and these 3rd level roots spawn bunches of leaves +/** Allocates and spawns a root that spawns a bunch of 2nd level roots sharing + the same isolated context, each of which in their turn spawns a single 3rd level + root with the bound context, and these 3rd level roots spawn bunches of leaves in the end. The test exception is generated by one of the leaves. **/ void Test8 () { ResetGlobals(); @@ -465,7 +465,7 @@ void Test8 () { template void ThrowMovableException ( intptr_t threshold, const T& data ) { if ( !IsThrowingThread() ) - return; + return; if ( !g_SolitaryException ) { #if __TBB_ATOMICS_CODEGEN_BROKEN g_ExceptionsThrown = g_ExceptionsThrown + 1; @@ -483,7 +483,7 @@ void ThrowMovableException ( intptr_t threshold, const T& data ) { const int g_IntExceptionData = -375; const std::string g_StringExceptionData = "My test string"; -// Exception data class implementing minimal requirements of tbb::movable_exception +// Exception data class implementing minimal requirements of tbb::movable_exception class ExceptionData { const ExceptionData& operator = ( const ExceptionData& src ); explicit ExceptionData ( int n ) : m_Int(n), m_String(g_StringExceptionData) {} @@ -517,8 +517,8 @@ class LeafTaskWithMovableExceptions : public TaskBase { }; void CheckException ( tbb::tbb_exception& e ) { - ASSERT (strcmp(e.name(), (g_SolitaryException ? typeid(SolitaryMovableException) - : typeid(MultipleMovableException)).name() ) == 0, + ASSERT (strcmp(e.name(), (g_SolitaryException ? typeid(SolitaryMovableException) + : typeid(MultipleMovableException)).name() ) == 0, "Unexpected original exception name"); ASSERT (strcmp(e.what(), "tbb::movable_exception") == 0, "Unexpected original exception info "); if ( g_SolitaryException ) { @@ -543,7 +543,7 @@ void CheckException () { } //! Test for movable_exception behavior, and external exception recording. -/** Allocates a root task that spawns a bunch of children, one or several of which throw +/** Allocates a root task that spawns a bunch of children, one or several of which throw a movable exception in a worker or master thread (depending on the global settings). The test also checks the correctness of multiple rethrowing of the pending exception. **/ void TestMovableException () { @@ -552,7 +552,7 @@ void TestMovableException () { bool bUnsupported = false; tbb::task_group_context ctx; tbb::empty_task *r = new( tbb::task::allocate_root() ) tbb::empty_task; - ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), + ASSERT (!g_CurStat.Existing() && !g_CurStat.Existed() && !g_CurStat.Executed(), "something wrong with the task accounting"); r->set_ref_count(NUM_CHILD_TASKS + 1); for ( int i = 0; i < NUM_CHILD_TASKS; ++i ) diff --git a/src/test/test_enumerable_thread_specific.cpp b/src/test/test_enumerable_thread_specific.cpp index 89fb9beaca2222844f9fd15cfff80c60de044468..1fddc96a4376246548db7630aa5866ba84ec6fe0 100644 --- a/src/test/test_enumerable_thread_specific.cpp +++ b/src/test/test_enumerable_thread_specific.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -94,7 +94,7 @@ public: static size_t AlignMask = 0; // set to cache-line-size - 1 template -T& check_alignment(T& t, const char *aname) { +T& check_alignment(T& t, const char *aname) { if( !tbb::internal::is_aligned(&t, AlignMask)) { REPORT_ONCE("alignment error with %s allocator (%x)\n", aname, (int)size_t(&t) & (AlignMask-1)); } @@ -127,11 +127,11 @@ public: } }; -// MyThrower field of ThrowingConstructor will throw after a certain number of +// MyThrower field of ThrowingConstructor will throw after a certain number of // construction calls. The constructor unwinder wshould unconstruct the instance // of check_type that was constructed just before. class ThrowingConstructor { - check_type m_checktype; + check_type m_checktype; Thrower m_throwing_field; public: int m_cnt; @@ -549,7 +549,7 @@ void run_parallel_scalar_tests(const char *test_name, const char *allocator_name ASSERT( !sums.empty(), NULL); ASSERT(static_sums.empty(), NULL); - tbb::parallel_for( tbb::blocked_range( 0, N, RANGE_MIN ), + tbb::parallel_for( tbb::blocked_range( 0, N, RANGE_MIN ), parallel_scalar_body( static_sums, allocator_name ) ); ASSERT( !static_sums.empty(), NULL); @@ -721,7 +721,7 @@ void run_parallel_vector_tests(const char *test_name, const char *allocator_name template class Allocator> void run_cross_type_vector_tests(const char *test_name) { tbb::tick_count t0; - const char* allocator_name = "default"; + const char* allocator_name = "default"; typedef std::vector > container_type; for (int p = MinThread; p <= MaxThread; ++p) { diff --git a/src/test/test_examples_common_utility.cpp b/src/test/test_examples_common_utility.cpp index d599c7b5c2ab37d9cacdf84daa4addf1b804b549..de07f206627885b66001ca73aab136f8a98a3fbe 100644 --- a/src/test/test_examples_common_utility.cpp +++ b/src/test/test_examples_common_utility.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_fast_random.cpp b/src/test/test_fast_random.cpp index b91b29809104c31607ffc197849637ff0e92ae35..402e7fc4e3d26358b773863e177f7da8cef08292 100644 --- a/src/test/test_fast_random.cpp +++ b/src/test/test_fast_random.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -19,8 +19,8 @@ */ /** - The test checks that for different ranges of random numbers (from 0 to - [MinThread, MaxThread]) generated with different seeds the probability + The test checks that for different ranges of random numbers (from 0 to + [MinThread, MaxThread]) generated with different seeds the probability of each number in the range deviates from the ideal random distribution by no more than AcceptableDeviation percent. **/ @@ -41,7 +41,7 @@ const double AcceptableDeviation = 2.1; //! Tolerable probability of failure to achieve tolerable distribution const double AcceptableProbabilityOfOutliers = 1e-5; //! Coefficient defining the length of random numbers series used to estimate the distribution -/** Number of random values generated per each range element. I.e. the larger is +/** Number of random values generated per each range element. I.e. the larger is the range, the longer is the series of random values. **/ const uintptr_t SeriesBaseLen = 100; //! Number of random numbers series to generate @@ -175,7 +175,7 @@ int TestMain () { NumLowOutliers = NumHighOutliers = 0; // Parallelism is used in this test only to speed up the long serial checks // Essentially it is a loop over random number ranges - // Ideally tbb::parallel_for could be used to parallelize the outermost loop + // Ideally tbb::parallel_for could be used to parallelize the outermost loop // in CheckDistributionBody, but it is not used to avoid unit test contamination. int P = tbb::tbb_thread::hardware_concurrency(); enum {reproducibilitySeedsToTest=1000}; diff --git a/src/test/test_flow_graph.cpp b/src/test/test_flow_graph.cpp index a4e230fce1ca240d3e99f48daeefc8f1226a4ff6..1695044fca83a596768636e65681108259d6de55 100644 --- a/src/test/test_flow_graph.cpp +++ b/src/test/test_flow_graph.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -66,13 +66,13 @@ bool functor_flag[F]; struct set_functor { int my_i; - set_functor( int i ) : my_i(i) {} + set_functor( int i ) : my_i(i) {} void operator()() { functor_flag[my_i] = true; } }; struct return_functor { int my_i; - return_functor( int i ) : my_i(i) {} + return_functor( int i ) : my_i(i) {} int operator()() { return my_i; } }; @@ -98,12 +98,12 @@ static void test_run() { for ( int j = 0; j < F; ++j ) { #if __TBB_LAMBDAS_PRESENT - h.run( [=]() { lambda_flag[j] = true; } ); - h.run( lambda_r, [=]() { return j; } ); + h.run( [=]() { lambda_flag[j] = true; } ); + h.run( lambda_r, [=]() { return j; } ); #endif h.run( set_functor(j) ); h.run( functor_r, return_functor(j) ); - } + } h.wait_for_all(); for ( int j = 0; j < F; ++j ) { #if __TBB_LAMBDAS_PRESENT @@ -172,8 +172,8 @@ class AddRemoveBody : NoAssign { int nThreads; Harness::SpinBarrier &barrier; public: - AddRemoveBody(int nthr, Harness::SpinBarrier &barrier_, tbb::flow::graph& _g) : - g(_g), nThreads(nthr), barrier(barrier_) + AddRemoveBody(int nthr, Harness::SpinBarrier &barrier_, tbb::flow::graph& _g) : + g(_g), nThreads(nthr), barrier(barrier_) {} void operator()(const int /*threadID*/) const { my_int_buffer b(g); @@ -194,7 +194,7 @@ public: for (tbb::flow::graph::iterator it = g.begin(); it != g.end(); ++it) { count++; } - ASSERT(count==nThreads, "error in iterator count"); + ASSERT(count==nThreads, "error in iterator count"); barrier.wait(); // wait until all threads are done counting } // initial node gets deleted }; @@ -206,7 +206,7 @@ void test_parallel(int nThreads) { NativeParallelFor(nThreads, body); } -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_flow_graph_whitebox.cpp b/src/test/test_flow_graph_whitebox.cpp index b72e85176fbeb215279699ddc1abbc62645d43ab..6a1ecbfe4dc97bb820b3b036404011b7fb963c24 100644 --- a/src/test/test_flow_graph_whitebox.cpp +++ b/src/test/test_flow_graph_whitebox.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_fp.cpp b/src/test/test_fp.cpp index 527e4f1d0c943b03f197c5f8102e7029ce2ba4cc..bbfa7aeb0b8c4b3b73c044e892699eb41353229a 100644 --- a/src/test/test_fp.cpp +++ b/src/test/test_fp.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -248,13 +248,13 @@ void TestContextFpuEnvBody::operator()( const tbb::blocked_range &r ) const int end = r.end(); if ( end-1 == numModes ) { // For a default context our mode should be inherited. - tbb::task::spawn_root_and_wait( + tbb::task::spawn_root_and_wait( *new( tbb::task::allocate_root() ) TestContextFpuEnvTask( arenaNum, mode, depth ) ); AssertMode( newMode ); end--; } for ( int i=r.begin(); i struct pass_through { IO operator()(const IO& i) { return i; } }; - + template< typename InputType, typename OutputType, typename Body > void buffered_levels( size_t concurrency, Body body ) { // Do for lc = 1 to concurrency level - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; // Set the execute_counter back to zero in the harness @@ -71,7 +71,7 @@ void buffered_levels( size_t concurrency, Body body ) { // Create the function_node with the appropriate concurrency level, and use default buffering tbb::flow::function_node< InputType, OutputType > exe_node( g, lc, body ); tbb::flow::function_node pass_thru( g, tbb::flow::unlimited, pass_through()); - + // Create a vector of identical exe_nodes and pass_thrus std::vector< tbb::flow::function_node< InputType, OutputType > > exe_vec(2, exe_node); std::vector< tbb::flow::function_node< InputType, InputType > > pass_thru_vec(2, pass_thru); @@ -102,17 +102,17 @@ void buffered_levels( size_t concurrency, Body body ) { // Initialize the receivers so they know how many senders and messages to check for for (size_t r = 0; r < num_receivers; ++r ) { - receivers[r].initialize_map( N, num_senders ); + receivers[r].initialize_map( N, num_senders ); } // Do the test NativeParallelFor( (int)num_senders, parallel_put_until_limit(senders) ); g.wait_for_all(); - // confirm that each sender was requested from N times + // confirm that each sender was requested from N times for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &pass_thru_vec[node_idx], NULL ); } // validate the receivers @@ -149,7 +149,7 @@ struct inc_functor { int operator()( int i ) { ++global_execute_count; ++local_execute_count; - return i; + return i; } }; @@ -158,13 +158,13 @@ template< typename InputType, typename OutputType > void buffered_levels_with_copy( size_t concurrency ) { // Do for lc = 1 to concurrency level - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; inc_functor cf; cf.local_execute_count = Offset; global_execute_count = Offset; - + tbb::flow::function_node< InputType, OutputType > exe_node( g, lc, cf ); for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) { @@ -182,7 +182,7 @@ void buffered_levels_with_copy( size_t concurrency ) { } for (size_t r = 0; r < num_receivers; ++r ) { - receivers[r].initialize_map( N, num_senders ); + receivers[r].initialize_map( N, num_senders ); } NativeParallelFor( (int)num_senders, parallel_put_until_limit(senders) ); @@ -190,7 +190,7 @@ void buffered_levels_with_copy( size_t concurrency ) { for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &exe_node, NULL ); } for (size_t r = 0; r < num_receivers; ++r ) { @@ -211,14 +211,14 @@ void buffered_levels_with_copy( size_t concurrency ) { // validate that the local body matches the global execute_count and both are correct inc_functor body_copy = tbb::flow::copy_body( exe_node ); - const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset; + const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset; size_t global_count = global_execute_count; size_t inc_count = body_copy.local_execute_count; - ASSERT( global_count == expected_count && global_count == inc_count, NULL ); + ASSERT( global_count == expected_count && global_count == inc_count, NULL ); g.reset(tbb::flow::rf_reset_bodies); body_copy = tbb::flow::copy_body( exe_node ); inc_count = body_copy.local_execute_count; - ASSERT( Offset == inc_count, "reset(rf_reset_bodies) did not reset functor" ); + ASSERT( Offset == inc_count, "reset(rf_reset_bodies) did not reset functor" ); } } @@ -236,16 +236,16 @@ void run_buffered_levels( int c ) { //! Performs test on executable nodes with limited concurrency /** Theses tests check: 1) that the nodes will accepts puts up to the concurrency limit, - 2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor), + 2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor), 3) the nodes will receive puts from multiple successors simultaneously, and 4) the nodes will send to multiple predecessors. There is no checking of the contents of the messages for corruption. */ - + template< typename InputType, typename OutputType, typename Body > void concurrency_levels( size_t concurrency, Body body ) { - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; // Set the execute_counter back to zero in the harness @@ -305,10 +305,10 @@ void concurrency_levels( size_t concurrency, Body body ) { // wait for graph to settle down g.wait_for_all(); - // confirm that each sender was requested from N times + // confirm that each sender was requested from N times for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &exe_node, NULL ); } // confirm that each receivers got N * num_senders + the initial lc puts @@ -343,7 +343,7 @@ void run_concurrency_levels( int c ) { } -struct empty_no_assign { +struct empty_no_assign { empty_no_assign() {} empty_no_assign( int ) {} operator int() { return 0; } @@ -390,11 +390,11 @@ void unlimited_concurrency( Body body ) { } NativeParallelFor( p, parallel_puts(exe_node) ); - g.wait_for_all(); + g.wait_for_all(); // 2) the nodes will receive puts from multiple predecessors simultaneously, size_t ec = harness_graph_executor::execute_count; - ASSERT( (int)ec == p*N, NULL ); + ASSERT( (int)ec == p*N, NULL ); for (size_t r = 0; r < num_receivers; ++r ) { size_t c = receivers[r].my_count; // 3) the nodes will send to multiple successors. @@ -428,10 +428,10 @@ void test_function_node_with_continue_msg_as_input() { tbb::flow::function_node FN1( g, tbb::flow::serial, continue_msg_to_int(42)); tbb::flow::function_node FN2( g, tbb::flow::serial, continue_msg_to_int(43)); - + tbb::flow::make_edge( Start, FN1 ); tbb::flow::make_edge( Start, FN2 ); - + Start.try_put( tbb::flow::continue_msg() ); g.wait_for_all(); } @@ -476,13 +476,13 @@ void test_extract() { ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(f0.predecessor_count() == 2 && f0.successor_count() == 1, "f0 has incorrect counts"); ASSERT(q0.predecessor_count() == 1 && q0.successor_count() == 0, "q0 has incorrect counts"); - + /* b0 */ /* \ */ /* f0 - q0 */ /* / */ /* b1 */ - + b0.try_put(1); g.wait_for_all(); ASSERT(my_count == 1, "function_node didn't fire"); @@ -491,15 +491,15 @@ void test_extract() { g.wait_for_all(); ASSERT(my_count == 2, "function_node didn't fire"); ASSERT(q0.try_get(cm), "function_node didn't forward"); - + b0.extract(); - + /* b0 */ /* */ /* f0 - q0 */ /* / */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(f0.predecessor_count() == 1 && f0.successor_count() == 1, "f0 has incorrect counts"); @@ -512,15 +512,15 @@ void test_extract() { g.wait_for_all(); ASSERT(my_count == 3, "function_node didn't fire though it has only one predecessor"); ASSERT(q0.try_get(cm), "function_node didn't forward second time"); - + f0.extract(); - + /* b0 */ /* */ /* f0 q0 */ /* */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(f0.predecessor_count() == 0 && f0.successor_count() == 0, "f0 has incorrect counts"); @@ -533,24 +533,24 @@ void test_extract() { ASSERT(my_count == 3, "function_node didn't fire though it has only one predecessor"); ASSERT(!q0.try_get(cm), "function_node forwarded though it shouldn't"); make_edge(b0, f0); - + /* b0 */ /* \ */ /* f0 q0 */ /* */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 1, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(f0.predecessor_count() == 1 && f0.successor_count() == 0, "f0 has incorrect counts"); ASSERT(q0.predecessor_count() == 0 && q0.successor_count() == 0, "q0 has incorrect counts"); - + b0.try_put(int()); g.wait_for_all(); - + ASSERT(my_count == 4, "function_node didn't fire though it has only one predecessor"); ASSERT(!q0.try_get(cm), "function_node forwarded though it shouldn't"); - + tbb::flow::make_edge(b1, f0); tbb::flow::make_edge(f0, q0); my_count = 0; @@ -558,7 +558,7 @@ void test_extract() { } #endif -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_global_control.cpp b/src/test/test_global_control.cpp index 0677e32c9491eb7763852612125596c4208e11be..d18c613d89f286e358b678d519ea60312bcc2692 100644 --- a/src/test/test_global_control.cpp +++ b/src/test/test_global_control.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -22,6 +22,8 @@ #define TBB_PREVIEW_GLOBAL_CONTROL 1 #include "tbb/global_control.h" #include "harness.h" +#define TBB_PREVIEW_LOCAL_OBSERVER 1 +#include "tbb/task_scheduler_observer.h" const size_t MB = 1024*1024; const double BARRIER_TIMEOUT = 10.; @@ -248,28 +250,28 @@ void TestInvalidParallelism() #if TRY_BAD_EXPR_ENABLED const size_t max_parallelism = tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism); - for (size_t par = 0; par<=1; par++) { - { - tbb::set_assertion_handler( AssertionFailureHandler ); - TRY_BAD_EXPR( tbb::global_control c(tbb::global_control::max_allowed_parallelism, par), "Values of 1 and 0 are not supported for max_allowed_parallelism." ); - tbb::set_assertion_handler( ReportError ); - ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) - == max_parallelism, NULL); - } - { - const size_t P = 2; - tbb::global_control c(tbb::global_control::max_allowed_parallelism, P); - ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) - == P, NULL); - tbb::set_assertion_handler( AssertionFailureHandler ); - TRY_BAD_EXPR( tbb::global_control cZ(tbb::global_control::max_allowed_parallelism, par), "Values of 1 and 0 are not supported for max_allowed_parallelism." ); - tbb::set_assertion_handler( ReportError ); - ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) - == P, NULL); - } + { + tbb::set_assertion_handler( AssertionFailureHandler ); + TRY_BAD_EXPR( tbb::global_control c(tbb::global_control::max_allowed_parallelism, 0), + "max_allowed_parallelism cannot be 0." ); + tbb::set_assertion_handler( ReportError ); ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) == max_parallelism, NULL); } + { + const size_t P = 2; + tbb::global_control c(tbb::global_control::max_allowed_parallelism, P); + ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) + == P, NULL); + tbb::set_assertion_handler( AssertionFailureHandler ); + TRY_BAD_EXPR( tbb::global_control cZ(tbb::global_control::max_allowed_parallelism, 0), + "max_allowed_parallelism cannot be 0." ); + tbb::set_assertion_handler( ReportError ); + ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) + == P, NULL); + } + ASSERT(tbb::global_control::active_value(tbb::global_control::max_allowed_parallelism) + == max_parallelism, NULL); #endif /* TRY_BAD_EXPR_ENABLED */ } @@ -306,8 +308,366 @@ void TestTooBigStack() } } +struct ParallelForRun: NoAssign { + int num_threads; + Harness::SpinBarrier *barr1, *barr2; + + ParallelForRun(Harness::SpinBarrier *b1, Harness::SpinBarrier *b2) : + barr1(b1), barr2(b2) {} + void operator()( int /*id*/ ) const { + barr1->timed_wait(BARRIER_TIMEOUT); + + tbb::parallel_for(tbb::blocked_range(0, CheckWorkersNum::LOOP_ITERS, 1), + CheckWorkersNum(NULL), tbb::simple_partitioner()); + barr2->timed_wait(BARRIER_TIMEOUT); + } +}; + +class FFTask: public tbb::task { + tbb::atomic *counter; + tbb::task* execute() { + (*counter)++; + return NULL; + } +public: + FFTask(tbb::atomic *counter_) : counter(counter_) {} +}; + +class WaiterTask: public tbb::task { + tbb::atomic *flag; + tbb::task* execute() { + while(!flag) + __TBB_Yield(); + return NULL; + } +public: + WaiterTask(tbb::atomic *flag_) : flag(flag_) {} +}; + +class ParallelForWork { +public: + void operator()(const tbb::blocked_range&) const { + __TBB_Pause(1); + } +}; + +class WorkAndEnqueueTask: public tbb::task { + tbb::atomic *counter; + tbb::atomic *signalToLeave; + tbb::task* execute() { + tbb::parallel_for(tbb::blocked_range(0, 10*1000, 1), + ParallelForWork(), tbb::simple_partitioner()); + *signalToLeave = true; + for (int i=0; i *counter_, tbb::atomic *signal_) + : counter(counter_), signalToLeave(signal_) {} +}; + +#if __TBB_TASK_PRIORITY +tbb::priority_t getPriorityByInt(int i) { + return i%3==0? tbb::priority_low : (i%3==1? tbb::priority_normal : + tbb::priority_high); +} +#endif + +class FFTasksRun: NoAssign { + void enqTasks(int id) const { + for (int i=0; i *cnt; + + FFTasksRun(Harness::SpinBarrier *b, tbb::atomic *c) : + barr(b), cnt(c) {} + void operator()(int id) const { + if (id) + enqTasks(id); + barr->wait(); + if (!id) + enqTasks(id); + } +}; + +void TestTaskEnqueue() +{ + { + tbb::task_scheduler_init tsi(20, 0, /*blocking=*/true); + tbb::atomic flag; + tbb::atomic taskDoneFlag; + flag = 0; + taskDoneFlag = false; + + for (int i=0; i<10; i++) { + WaiterTask* w = new( tbb::task::allocate_root() ) WaiterTask(&taskDoneFlag); + tbb::task::enqueue(*w); + } + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + taskDoneFlag = true; + + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); + tbb::task::enqueue(*t); + while(!flag) + __TBB_Yield(); + } + { + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + tbb::atomic flag; + tbb::atomic taskDoneFlag; + flag = 0; + taskDoneFlag = false; + + WaiterTask* w = new( tbb::task::allocate_root() ) WaiterTask(&taskDoneFlag); + tbb::task::enqueue(*w); + taskDoneFlag = true; + + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); + tbb::task::enqueue(*t); + while(!flag) + __TBB_Yield(); + } + { + tbb::task_scheduler_init tsi(2, 0, /*blocking=*/true); + tbb::atomic flag; + flag = 0; + + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); + tbb::task::enqueue(*t); + while(!flag) + __TBB_Yield(); + } + { + tbb::task_scheduler_init tsi(2, 0, /*blocking=*/true); + tbb::atomic flag; + flag = 0; + + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); + tbb::task::enqueue(*t); + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + + while(!flag) + __TBB_Yield(); + } + + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + + { // check that enqueue() guarantee mandatory parallelism + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + tbb::atomic flag; + flag = 0; + + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); + tbb::task::enqueue(*t); + while(!flag) + __TBB_Yield(); + } + { + tbb::atomic flag; + flag = 0; + { + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + + for (int i=0; i<10; i++) { + FFTask* t = new( tbb::task::allocate_root() ) FFTask(&flag); +#if __TBB_TASK_PRIORITY + const tbb::priority_t p = getPriorityByInt(i); + tbb::task::enqueue(*t, p); +#else + tbb::task::enqueue(*t); +#endif + } + } + ASSERT(flag==10, "The tasks must be terminated when task_scheduler_init destroyed."); + } + const unsigned threads = 2; + { + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + Harness::SpinBarrier barr1(threads), barr2(threads); + RunWorkersLimited(1, 1, false); + + NativeParallelFor( threads, ParallelForRun(&barr1, &barr2) ); + } + + tbb::atomic counter; + counter = 0; + { + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + Harness::SpinBarrier barr(threads); + RunWorkersLimited(1, 1, false); + + NativeParallelFor( threads, FFTasksRun(&barr, &counter) ); + } + ASSERT(counter == threads*FFTasksRun::ITERS, "All tasks must be done when task_scheduler_init destroyed."); + counter = 0; + { // enqueued task can enqueue tasks and call parallel_for + tbb::atomic signalToLeave; + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + + signalToLeave = false; + WorkAndEnqueueTask *t = new( tbb::task::allocate_root() ) + WorkAndEnqueueTask(&counter, &signalToLeave); + tbb::task::enqueue(*t); + tbb::parallel_for(tbb::blocked_range(0, 100*1000, 1), + ParallelForWork(), tbb::simple_partitioner()); + + while (!signalToLeave) + __TBB_Yield(); + } + ASSERT(counter == WorkAndEnqueueTask::ENQUEUE_TASKS, "All tasks must be done when task_scheduler_init destroyed."); +} + +class CountWorkersTask: public tbb::task { + tbb::atomic *flag; + // count unique worker threads + static tbb::combinable uniqThreads; + + tbb::task* execute() { + uniqThreads.local() = 1; + Harness::Sleep(10); + *flag = 1; + return NULL; + } +public: + CountWorkersTask(tbb::atomic *flag_) : flag(flag_) {} + static size_t observedThreads() { + return uniqThreads.combine(std::plus()); + } +}; + +tbb::combinable CountWorkersTask::uniqThreads; + +tbb::atomic activeArenas; + +class ArenaObserver: public tbb::task_scheduler_observer { +public: + ArenaObserver() : tbb::task_scheduler_observer(/*local=*/true) { + } + /*override*/ void on_scheduler_entry( bool worker ) { + if (worker) { + ++activeArenas; + } + } + /*override*/ void on_scheduler_exit( bool worker ) { + if (worker) { + --activeArenas; + } + } +}; + +ArenaObserver observers[2]; + +struct ArenasObserveRun: NoAssign { + Harness::SpinBarrier *barr; + + ArenasObserveRun(Harness::SpinBarrier *b) : barr(b) {} + void operator()( int id ) const { + observers[id].observe(true); + ArenaObserver o; + tbb::atomic flag; + flag = false; + + CountWorkersTask* t = new( tbb::task::allocate_root() ) + CountWorkersTask(&flag); + barr->wait(); + tbb::task::enqueue(*t); + while(!flag) + __TBB_Yield(); + } +}; + +struct ArenaRun: NoAssign { + tbb::atomic *counter; + + ArenaRun(tbb::atomic *counter_) : counter(counter_) {} + void operator()() const { + (*counter)++; + } +}; + +struct ArenaUserRun: NoAssign { + static const int ENQUEUE_TASKS = 10; + tbb::task_arena *arena; + Harness::SpinBarrier *barr; + tbb::atomic *counter; + + ArenaUserRun(tbb::task_arena *a, Harness::SpinBarrier *b, tbb::atomic *c) : + arena(a), barr(b), counter(c) {} + void operator()( int id ) const { + + for (int i=0; ienqueue(ArenaRun(counter)); + barr->wait(); + if (!id) + arena->terminate(); + } +}; + +void TestCuncurrentArenas() +{ + Harness::SpinBarrier barrier(2); + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + { + tbb::task_scheduler_init tsi(2, 0, /*blocking=*/true); + ArenaObserver observer; + observer.observe(true); + + // must have 0 worker threads + CheckWorkersNum::clear(); + tbb::parallel_for(tbb::blocked_range(0, CheckWorkersNum::LOOP_ITERS, 1), + CheckWorkersNum(NULL), tbb::simple_partitioner()); + CheckWorkersNum::check(1); + + NativeParallelFor( 2, ArenasObserveRun(&barrier) ); + ASSERT(1 == CountWorkersTask::observedThreads(), + "Single worker is expecting to serve mandatory parallelism."); + while(activeArenas) // wait till single worker termination + __TBB_Yield(); + + // check that without mandatory parallelism, still have 0 worker threads + tbb::parallel_for(tbb::blocked_range(0, CheckWorkersNum::LOOP_ITERS, 1), + CheckWorkersNum(NULL), tbb::simple_partitioner()); + CheckWorkersNum::clear(); + tbb::parallel_for(tbb::blocked_range(0, CheckWorkersNum::LOOP_ITERS, 1), + CheckWorkersNum(NULL), tbb::simple_partitioner()); + CheckWorkersNum::check(1); + } + tbb::atomic counter; + counter = 0; + { + tbb::task_scheduler_init tsi(1, 0, /*blocking=*/true); + tbb::task_arena arena(2); + + NativeParallelFor( 2, ArenaUserRun(&arena, &barrier, &counter) ); + } + ASSERT(counter == 2*ArenaUserRun::ENQUEUE_TASKS, "All tasks must be done."); +} + int TestMain() { + TestTaskEnqueue(); + TestCuncurrentArenas(); const unsigned h_c = tbb::tbb_thread::hardware_concurrency(); bool excessHC; { @@ -336,6 +696,5 @@ int TestMain() #endif TestTooBigStack(); ASSERT(default_ss == tbb::global_control::active_value(tbb::global_control::thread_stack_size), NULL); - return Harness::Done; } diff --git a/src/test/test_global_control_whitebox.cpp b/src/test/test_global_control_whitebox.cpp index d55e451e333219cf3f9ba55aeec9b0bb9af72232..3d6a02a47b307d01c046276f4146add67fafec5a 100644 --- a/src/test/test_global_control_whitebox.cpp +++ b/src/test/test_global_control_whitebox.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_halt.cpp b/src/test/test_halt.cpp index 6c767683058aa8c5da27f2182c444c22e8d1d581..d50184bdff758d3dd5308d2e73d039b0856f2609 100644 --- a/src/test/test_halt.cpp +++ b/src/test/test_halt.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -53,7 +53,7 @@ public: for(;;) { typename M::scoped_lock lock( mutex ); if(SharedI >= SharedN) break; - volatile double sum = 7.3; + volatile double sum = 7.3; sum *= 11.17; ++SharedI; } @@ -64,8 +64,8 @@ public: template void SharedSerialFib(int n) { - SharedI = 1; - SharedN = n; + SharedI = 1; + SharedN = n; M mutex; parallel_for( blocked_range(0,4,1), SharedSerialFibBody( mutex ) ); } diff --git a/src/test/test_handle_perror.cpp b/src/test/test_handle_perror.cpp index 41cdc1e4382fabee0afdfe7ba6382898651758e1..6fe88d1c665910764cb853d55aa841caf1ba19b0 100644 --- a/src/test/test_handle_perror.cpp +++ b/src/test/test_handle_perror.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -48,7 +48,7 @@ static void TestHandlePerror() { #if TBB_USE_EXCEPTIONS REMARK("caught runtime_exception('%s')\n",e.what()); ASSERT( memcmp(e.what(),"apple: ",7)==0, NULL ); - ASSERT( strlen(strstr(e.what(), strerror(EAGAIN))), "bad error message?" ); + ASSERT( strlen(strstr(e.what(), strerror(EAGAIN))), "bad error message?" ); #endif /* TBB_USE_EXCEPTIONS */ caught = true; } diff --git a/src/test/test_hw_concurrency.cpp b/src/test/test_hw_concurrency.cpp index a9094bf55da5e2c8ec21ec63935908dc5c1c2bea..4e9bc8c2f3dc58fc0f96503875bcd7f7859e6896 100644 --- a/src/test/test_hw_concurrency.cpp +++ b/src/test/test_hw_concurrency.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_indexer_node.cpp b/src/test/test_indexer_node.cpp index b31f97fb3e94383a66092725c729669591bdf08f..606caf4db837e1ab794df862a3e2f44c15b47b3c 100644 --- a/src/test/test_indexer_node.cpp +++ b/src/test/test_indexer_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -107,8 +107,8 @@ protected: } void make_and_validate_full_graph() { - /* in0 */ - /* \ */ + /* in0 */ + /* \ */ /* port0 out0 */ /* / | / */ /* in1 middle */ @@ -139,15 +139,15 @@ protected: int first_pred = *(mp0_list.begin()) == ins[0] ? 0 : ( *(mp0_list.begin()) == ins[1] ? 1 : -1 ); typename in_node_t::predecessor_list_type::iterator piv = mp0_list.begin();++piv; int second_pred = *piv == ins[0] ? 0 : ( *piv == ins[1] ? 1 : -1 ); - ASSERT( first_pred != -1 && second_pred != -1 && first_pred != second_pred, "bad predecessor(s) for middle port 0" ); + ASSERT( first_pred != -1 && second_pred != -1 && first_pred != second_pred, "bad predecessor(s) for middle port 0" ); ASSERT( *(mp1_list.begin()) == ins[2], "bad predecessor for middle port 1" ); int first_succ = *(ms_list.begin()) == outs[0] ? 0 : ( *(ms_list.begin()) == outs[1] ? 1 : -1 ); typename out_node_t::successor_list_type::iterator ms_vec_iter = ms_list.begin(); ++ms_vec_iter; int second_succ = *ms_vec_iter == outs[0] ? 0 : ( *ms_vec_iter == outs[1] ? 1 : -1 ); - ASSERT( first_succ != -1 && second_succ != -1 && first_succ != second_succ, "bad successor(s) for middle" ); - + ASSERT( first_succ != -1 && second_succ != -1 && first_succ != second_succ, "bad successor(s) for middle" ); + in0.try_put(1); in1.try_put(2); in2.try_put(8); @@ -155,7 +155,7 @@ protected: g.wait_for_all(); T v_in; - + ASSERT( in0.try_get(v_in) == false, "buffer should not have a value" ); ASSERT( in1.try_get(v_in) == false, "buffer should not have a value" ); ASSERT( in1.try_get(v_in) == false, "buffer should not have a value" ); @@ -180,8 +180,8 @@ protected: } void validate_partial_graph() { - /* in0 */ - /* */ + /* in0 */ + /* */ /* port0 out0 */ /* / | */ /* in1 middle */ @@ -208,7 +208,7 @@ protected: in2.try_put(8); in2.try_put(4); g.wait_for_all(); - + T v_in; typename my_node_t::output_type v; @@ -227,8 +227,8 @@ protected: } void validate_empty_graph() { - /* in0 */ - /* */ + /* in0 */ + /* */ /* port0 out0 */ /* | */ /* in1 middle */ @@ -255,7 +255,7 @@ protected: in2.try_put(8); in2.try_put(4); g.wait_for_all(); - + T v_in; typename my_node_t::output_type v; @@ -281,7 +281,7 @@ public: ms_p1_ptr = static_cast< typename in_node_t::successor_type * >(&tbb::flow::input_port<1>(middle)); mp_ptr = static_cast< typename out_node_t::predecessor_type *>(&middle); } - + virtual ~test_indexer_extract() {} void run_tests() { @@ -548,7 +548,7 @@ public: } for(int nInputs = 1; nInputs <= MaxNSources; ++nInputs) { tbb::flow::graph g; - IType* my_indexer = new IType(g); //makeIndexer::create(); + IType* my_indexer = new IType(g); //makeIndexer::create(); tbb::flow::queue_node outq1(g); tbb::flow::queue_node outq2(g); @@ -725,7 +725,7 @@ static void test() { template< template class TestType, // serial_test or parallel_test - typename T0, typename T1=void, typename T2=void, typename T3=void, typename T4=void, + typename T0, typename T1=void, typename T2=void, typename T3=void, typename T4=void, typename T5=void, typename T6=void, typename T7=void, typename T8=void, typename T9=void> // type of the inputs to the indexer_node class generate_test { public: @@ -737,9 +737,9 @@ public: //specializations for indexer node inputs template< - template class TestType, - typename T0, typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7, typename T8> + template class TestType, + typename T0, typename T1, typename T2, typename T3, typename T4, + typename T5, typename T6, typename T7, typename T8> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -749,9 +749,9 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7> + template class TestType, + typename T0, typename T1, typename T2, typename T3, typename T4, + typename T5, typename T6, typename T7> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -761,9 +761,9 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6> + template class TestType, + typename T0, typename T1, typename T2, typename T3, typename T4, + typename T5, typename T6> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -773,9 +773,9 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2, typename T3, typename T4, - typename T5> + template class TestType, + typename T0, typename T1, typename T2, typename T3, typename T4, + typename T5> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -785,8 +785,8 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2, typename T3, typename T4> + template class TestType, + typename T0, typename T1, typename T2, typename T3, typename T4> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -796,8 +796,8 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2, typename T3> + template class TestType, + typename T0, typename T1, typename T2, typename T3> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -807,8 +807,8 @@ public: }; template< - template class TestType, - typename T0, typename T1, typename T2> + template class TestType, + typename T0, typename T1, typename T2> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -818,8 +818,8 @@ public: }; template< - template class TestType, - typename T0, typename T1> + template class TestType, + typename T0, typename T1> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -829,8 +829,8 @@ public: }; template< - template class TestType, - typename T0> + template class TestType, + typename T0> class generate_test { public: typedef tbb::flow::indexer_node indexer_node_type; @@ -874,7 +874,7 @@ int TestMain() { #if MAX_TUPLE_TEST_SIZE >= 9 generate_test::do_test(); #endif - } + } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES test_indexer_extract().run_tests(); #endif diff --git a/src/test/test_initializer_list.h b/src/test/test_initializer_list.h index b943fc041936f84e26b1a4cf05612a37ee7b3268..f3e264d7aac4902e3ce3668e27c62cb410773286 100644 --- a/src/test/test_initializer_list.h +++ b/src/test/test_initializer_list.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_inits_loop.cpp b/src/test/test_inits_loop.cpp index bbe0932a9ce70475df52f2042b4b48c0bdae609c..12222bbc7265a0a4d29aea0ccda160849b4597f7 100644 --- a/src/test/test_inits_loop.cpp +++ b/src/test/test_inits_loop.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_intrusive_list.cpp b/src/test/test_intrusive_list.cpp index 095ebe34fb8573edcad03654e201eebff02c2445..25f767c9ea0d9c3e8ee0f0866c1d346598d23acd 100644 --- a/src/test/test_intrusive_list.cpp +++ b/src/test/test_intrusive_list.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -66,9 +66,9 @@ public: }; typedef tbb::internal::intrusive_list IntrusiveList1; -typedef tbb::internal::memptr_intrusive_list IntrusiveList2; -typedef tbb::internal::memptr_intrusive_list IntrusiveList3; const int NumElements = 256 * 1024; diff --git a/src/test/test_ittnotify.cpp b/src/test/test_ittnotify.cpp index a664aecb191383da6c6e3702d14047cc362f7e55..747b92a953087592c91131860271df47e49fa85b 100644 --- a/src/test/test_ittnotify.cpp +++ b/src/test/test_ittnotify.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_join_node.cpp b/src/test/test_join_node.cpp index 66dbf51c795ddb83cc081b3fff95f840843fddc5..1e600f734de82694820ad773ce6d1a689c7b25ba 100644 --- a/src/test/test_join_node.cpp +++ b/src/test/test_join_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -789,7 +789,7 @@ public: static const char* name() {return "MyKeySecond"; } }; -// The additional policy to differ message based key matching from usual key matching. +// The additional policy to differ message based key matching from usual key matching. // It only has sence for the test because join_node is created with the key_matching policy for the both cases. template ::type > > struct message_based_key_matching {}; diff --git a/src/test/test_lambda.cpp b/src/test/test_lambda.cpp index 384e556bb88c4fa7e3539d979843b4f9fa152bec..fc1ce9f9437049037f3fb13e762ba9e12a894cc8 100644 --- a/src/test/test_lambda.cpp +++ b/src/test/test_lambda.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -211,7 +211,7 @@ int TestMain () { return std::make_pair(x.firsty.second?x.second:y.second); }); - ASSERT(minmax_result_c.first==0 && minmax_result_c.second==999, + ASSERT(minmax_result_c.first==0 && minmax_result_c.second==999, "combinable w/lambda failed.\n"); REMARK("passed.\n"); diff --git a/src/test/test_limiter_node.cpp b/src/test/test_limiter_node.cpp index a8e537062e451107abe848a5db6def94025a649a..6739aebc3584700ea7a32975a826d10632c152b0 100644 --- a/src/test/test_limiter_node.cpp +++ b/src/test/test_limiter_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -103,14 +103,14 @@ struct put_body : NoAssign { tbb::flow::limiter_node &my_lim; tbb::atomic &my_accept_count; - put_body( tbb::flow::limiter_node &lim, tbb::atomic &accept_count ) : + put_body( tbb::flow::limiter_node &lim, tbb::atomic &accept_count ) : my_lim(lim), my_accept_count(accept_count) {} void operator()( int ) const { for ( int i = 0; i < L; ++i ) { bool msg = my_lim.try_put( T(i) ); if ( msg == true ) - ++my_accept_count; + ++my_accept_count; } } }; @@ -121,7 +121,7 @@ struct put_dec_body : NoAssign { tbb::flow::limiter_node &my_lim; tbb::atomic &my_accept_count; - put_dec_body( tbb::flow::limiter_node &lim, tbb::atomic &accept_count ) : + put_dec_body( tbb::flow::limiter_node &lim, tbb::atomic &accept_count ) : my_lim(lim), my_accept_count(accept_count) {} void operator()( int ) const { @@ -132,7 +132,7 @@ struct put_dec_body : NoAssign { ++local_accept_count; ++my_accept_count; my_lim.decrement.try_put( tbb::flow::continue_msg() ); - } + } } } @@ -166,11 +166,11 @@ void test_puts_with_decrements( int num_threads, tbb::flow::limiter_node< T >& l // // limiter only forwards below the limit, multiple parallel senders / single receiver // mutiple parallel senders that put to decrement at each accept, limiter accepts new messages -// -// +// +// template< typename T > int test_parallel(int num_threads) { - + // test puts with no decrements for ( int i = 0; i < L; ++i ) { tbb::flow::graph g; @@ -203,10 +203,10 @@ int test_parallel(int num_threads) { // // limiter only forwards below the limit, single sender / single receiver // at reject, a put to decrement, will cause next message to be accepted -// +// template< typename T > int test_serial() { - + // test puts with no decrements for ( int i = 0; i < L; ++i ) { tbb::flow::graph g; @@ -369,7 +369,7 @@ void test_reserve_release_messages() { //edges make_edge(input_queue, limit); make_edge(limit, output_queue); - make_edge(broad,limit.decrement); + make_edge(broad,limit.decrement); int list[4] = {19, 33, 72, 98}; //list to be put to the input queue @@ -513,7 +513,7 @@ void test_extract() { } #endif // TBB_PREVIEW_FLOW_GRAPH_FEATURES -int TestMain() { +int TestMain() { for (int i = 1; i <= 8; ++i) { tbb::task_scheduler_init init(i); test_serial(); diff --git a/src/test/test_malloc_atexit.cpp b/src/test/test_malloc_atexit.cpp index b10a2c625a845652729d79839c65019450e3616a..dc08085ded7123b976f7230e8d45a86b57f7f7a8 100644 --- a/src/test/test_malloc_atexit.cpp +++ b/src/test/test_malloc_atexit.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -18,11 +18,11 @@ reasons why the executable file might be covered by the GNU General Public License. */ -/* Regression test against a bug in TBB allocator manifested when +/* Regression test against a bug in TBB allocator manifested when dynamic library calls atexit() or registers dtors of static objects. - If the allocator is not initialized yet, we can get deadlock, + If the allocator is not initialized yet, we can get deadlock, because allocator library has static object dtors as well, they - registered during allocator initialization, and atexit() is protected + registered during allocator initialization, and atexit() is protected by non-recursive mutex in some versions of GLIBC. */ diff --git a/src/test/test_malloc_compliance.cpp b/src/test/test_malloc_compliance.cpp index 1bf124e53a37d4a74c28f814d9e8d41b8c8758b3..122cc2f24692e240dce51d19e7ad02f8f4af93df 100644 --- a/src/test/test_malloc_compliance.cpp +++ b/src/test/test_malloc_compliance.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -265,7 +265,7 @@ static void setSystemAllocs() Raligned_realloc=_aligned_realloc; Taligned_free=_aligned_free; Rposix_memalign=0; -#elif __APPLE__ || __sun || __ANDROID__ +#elif __APPLE__ || __sun || __ANDROID__ // OS X*, Solaris, and Android don't have posix_memalign Raligned_malloc=0; Raligned_realloc=0; diff --git a/src/test/test_malloc_init_shutdown.cpp b/src/test/test_malloc_init_shutdown.cpp index 135f9dd337f206925888bf43b203f62ebc3d067b..67bfde421c5ac77d341599ae3fc7c1e001bd4011 100644 --- a/src/test/test_malloc_init_shutdown.cpp +++ b/src/test/test_malloc_init_shutdown.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_lib_unload.cpp b/src/test/test_malloc_lib_unload.cpp index dba6777c20e4084e7e0d8730c8c25c6f8e45ce5a..b403ec146119393c024ff84d6b8905c9969d413a 100644 --- a/src/test/test_malloc_lib_unload.cpp +++ b/src/test/test_malloc_lib_unload.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_overload.cpp b/src/test/test_malloc_overload.cpp index 30af414d3b1d5a2b31ab4db668050a12ebb09d57..7211aaf07fe41747c5b07633c73becbf9aa74b90 100644 --- a/src/test/test_malloc_overload.cpp +++ b/src/test/test_malloc_overload.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -20,7 +20,7 @@ #if (_WIN32 || _WIN64) -// As the test is intentionally build with /EHs-, suppress multiple VS2005's +// As the test is intentionally build with /EHs-, suppress multiple VS2005's // warnings like C4530: C++ exception handler used, but unwind semantics are not enabled #if defined(_MSC_VER) && !__INTEL_COMPILER /* ICC 10.1 and 11.0 generates code that uses std::_Raise_handler, @@ -109,12 +109,12 @@ typedef unsigned __int64 uint64_t; #endif /* OS selection */ #if _WIN32 -// On Windows, the trick with string "dependence on msvcpXX.dll" is necessary to create +// On Windows, the trick with string "dependence on msvcpXX.dll" is necessary to create // dependence on msvcpXX.dll, for sake of a regression test. // On Linux, C++ RTL headers are undesirable because of breaking strict ANSI mode. #if defined(_MSC_VER) && _MSC_VER >= 1300 && _MSC_VER <= 1310 && !defined(__INTEL_COMPILER) /* Fixing compilation error reported by VS2003 for exception class - when _HAS_EXCEPTIONS is 0: + when _HAS_EXCEPTIONS is 0: bad_cast that inherited from exception is not in std namespace. */ using namespace std; @@ -153,7 +153,7 @@ struct LargeMemoryBlock : public BlockI { MemoryPool *pool; // owner pool LargeMemoryBlock *next, // ptrs in list of cached blocks *prev, - *gPrev, // in pool's global list + *gPrev, // in pool's global list *gNext; uintptr_t age; // age of block while in cache size_t objectSize; // the size requested by a client @@ -166,7 +166,7 @@ struct LargeMemoryBlock : public BlockI { struct LargeObjectHdr { LargeMemoryBlock *memoryBlock; - /* Have to duplicate it here from CachedObjectHdr, + /* Have to duplicate it here from CachedObjectHdr, as backreference must be checked without further pointer dereference. Points to LargeObjectHdr. */ BackRefIdx backRefIdx; diff --git a/src/test/test_malloc_pools.cpp b/src/test/test_malloc_pools.cpp index 1dbfa978684c0d0e88198b87ceac4a8ab09ac682..4432f7ac0b9169a921427b46a29a5127e139d82a 100644 --- a/src/test/test_malloc_pools.cpp +++ b/src/test/test_malloc_pools.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_pure_c.c b/src/test/test_malloc_pure_c.c index 6043db963e41f9c7e692afa78408a534c98b0c75..e85a21d793669baa45feaf1c56bda96d9f96bf6f 100644 --- a/src/test/test_malloc_pure_c.c +++ b/src/test/test_malloc_pure_c.c @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_regression.cpp b/src/test/test_malloc_regression.cpp index b9cb0fd4034db85eb7e16ce110de5df117c5a76e..2e3005965f295dab76b3effcea33d17c75e94268 100644 --- a/src/test/test_malloc_regression.cpp +++ b/src/test/test_malloc_regression.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_used_by_lib.cpp b/src/test/test_malloc_used_by_lib.cpp index 0347578b19bd753ac286ab069d6f482b1458122b..743af13466b8bd89d7cce02f748645124d19b8d2 100644 --- a/src/test/test_malloc_used_by_lib.cpp +++ b/src/test/test_malloc_used_by_lib.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_malloc_whitebox.cpp b/src/test/test_malloc_whitebox.cpp index 980bcd83f7745e65f85ab725e848b5cb87b7cd6a..6c8407768232ec773e5f561de90b663fece9e8c0 100644 --- a/src/test/test_malloc_whitebox.cpp +++ b/src/test/test_malloc_whitebox.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -116,7 +116,7 @@ public: } } } - + barrier.wait(); // check caching correctness @@ -125,7 +125,7 @@ public: for (int j=0; j=MinThread; --p ) { @@ -170,14 +170,14 @@ public: for (int i=0; i=blocks1[i].sz + ASSERT(blocks1[i].ptr && StartupBlock::msize(blocks1[i].ptr)>=blocks1[i].sz && 0==(uintptr_t)blocks1[i].ptr % sizeof(void*), NULL); memset(blocks1[i].ptr, i, blocks1[i].sz); } for (int i=0; i=blocks2[i].sz + ASSERT(blocks2[i].ptr && StartupBlock::msize(blocks2[i].ptr)>=blocks2[i].sz && 0==(uintptr_t)blocks2[i].ptr % sizeof(void*), NULL); memset(blocks2[i].ptr, i, blocks2[i].sz); @@ -531,7 +531,7 @@ void TestObjectRecognition() { void* bufferLOH = scalable_malloc(2*slabSize + headersSize); ASSERT(bufferLOH, "Memory was not allocated"); - LargeObjectHdr* falseLO = + LargeObjectHdr* falseLO = (LargeObjectHdr*)alignUp((uintptr_t)bufferLOH + headersSize, slabSize); LargeObjectHdr* headerLO = (LargeObjectHdr*)falseLO-1; headerLO->memoryBlock = (LargeMemoryBlock*)bufferLOH; @@ -549,7 +549,7 @@ void TestObjectRecognition() { for (int master = -10; master<10; master++) { falseBlock->backRefIdx.master = (uint16_t)master; headerLO->backRefIdx.master = (uint16_t)master; - + for (int bl = -10; blbackRefIdx.offset = (uint16_t)bl; headerLO->backRefIdx.offset = (uint16_t)bl; diff --git a/src/test/test_model_plugin.cpp b/src/test/test_model_plugin.cpp index 9ddb43b15e9fefd2b3d8cf0f0d19124a01e971bb..9ff186394a919d0998272036fbeccc960b24da7f 100644 --- a/src/test/test_model_plugin.cpp +++ b/src/test/test_model_plugin.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -172,7 +172,7 @@ int use_lot_of_tls() { pthread_key_t last_handles[10]; pthread_key_t result; int setspecific_dummy=10; - while( pthread_key_create(&result, NULL)==0 + while( pthread_key_create(&result, NULL)==0 && count < 4096 ) // Sun Solaris doesn't have any built-in limit, so we set something big enough { last_handles[++count%10] = result; diff --git a/src/test/test_multifunction_node.cpp b/src/test/test_multifunction_node.cpp index bb627e9f914f2a8c578b21750f145c0bb485423f..3a04a37691ac4a394c95bded786bd4634c977d6d 100644 --- a/src/test/test_multifunction_node.cpp +++ b/src/test/test_multifunction_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -52,13 +52,13 @@ struct parallel_put_until_limit : private NoAssign { } }; - -//! exercise buffered multifunction_node. + +//! exercise buffered multifunction_node. template< typename InputType, typename OutputTuple, typename Body > void buffered_levels( size_t concurrency, Body body ) { typedef typename tbb::flow::tuple_element<0,OutputTuple>::type OutputType; // Do for lc = 1 to concurrency level - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; // Set the execute_counter back to zero in the harness @@ -70,7 +70,7 @@ void buffered_levels( size_t concurrency, Body body ) { // Create the function_node with the appropriate concurrency level, and use default buffering tbb::flow::multifunction_node< InputType, OutputTuple > exe_node( g, lc, body ); - + //Create a vector of identical exe_nodes std::vector< tbb::flow::multifunction_node< InputType, OutputTuple > > exe_vec(2, exe_node); @@ -95,17 +95,17 @@ void buffered_levels( size_t concurrency, Body body ) { // Initialize the receivers so they know how many senders and messages to check for for (size_t r = 0; r < num_receivers; ++r ) { - receivers[r].initialize_map( N, num_senders ); + receivers[r].initialize_map( N, num_senders ); } // Do the test NativeParallelFor( (int)num_senders, parallel_put_until_limit(senders) ); g.wait_for_all(); - // confirm that each sender was requested from N times + // confirm that each sender was requested from N times for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &exe_vec[node_idx], NULL ); } // validate the receivers @@ -125,7 +125,7 @@ void buffered_levels( size_t concurrency, Body body ) { } delete [] receivers; } - } + } } } @@ -151,13 +151,13 @@ template< typename InputType, typename OutputTuple > void buffered_levels_with_copy( size_t concurrency ) { typedef typename tbb::flow::tuple_element<0,OutputTuple>::type OutputType; // Do for lc = 1 to concurrency level - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; inc_functor cf; cf.local_execute_count = Offset; global_execute_count = Offset; - + tbb::flow::multifunction_node< InputType, OutputTuple > exe_node( g, lc, cf ); for (size_t num_receivers = 1; num_receivers <= MAX_NODES; ++num_receivers ) { @@ -175,7 +175,7 @@ void buffered_levels_with_copy( size_t concurrency ) { } for (size_t r = 0; r < num_receivers; ++r ) { - receivers[r].initialize_map( N, num_senders ); + receivers[r].initialize_map( N, num_senders ); } NativeParallelFor( (int)num_senders, parallel_put_until_limit(senders) ); @@ -183,7 +183,7 @@ void buffered_levels_with_copy( size_t concurrency ) { for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &exe_node, NULL ); } for (size_t r = 0; r < num_receivers; ++r ) { @@ -204,10 +204,10 @@ void buffered_levels_with_copy( size_t concurrency ) { // validate that the local body matches the global execute_count and both are correct inc_functor body_copy = tbb::flow::copy_body( exe_node ); - const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset; + const size_t expected_count = N/2 * MAX_NODES * MAX_NODES * ( MAX_NODES + 1 ) + MAX_NODES + Offset; size_t global_count = global_execute_count; size_t inc_count = body_copy.local_execute_count; - ASSERT( global_count == expected_count && global_count == inc_count, NULL ); + ASSERT( global_count == expected_count && global_count == inc_count, NULL ); } } @@ -226,16 +226,16 @@ void run_buffered_levels( int c ) { //! Performs test on executable nodes with limited concurrency /** Theses tests check: 1) that the nodes will accepts puts up to the concurrency limit, - 2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor), + 2) the nodes do not exceed the concurrency limit even when run with more threads (this is checked in the harness_graph_executor), 3) the nodes will receive puts from multiple successors simultaneously, and 4) the nodes will send to multiple predecessors. There is no checking of the contents of the messages for corruption. */ - + template< typename InputType, typename OutputTuple, typename Body > void concurrency_levels( size_t concurrency, Body body ) { typedef typename tbb::flow::tuple_element<0,OutputTuple>::type OutputType; - for ( size_t lc = 1; lc <= concurrency; ++lc ) { + for ( size_t lc = 1; lc <= concurrency; ++lc ) { tbb::flow::graph g; // Set the execute_counter back to zero in the harness @@ -257,34 +257,34 @@ void concurrency_levels( size_t concurrency, Body body ) { } harness_counting_sender *senders = NULL; - + for (size_t num_senders = 1; num_senders <= MAX_NODES; ++num_senders ) { { // Exclusively lock m to prevent exe_node from finishing tbb::spin_rw_mutex::scoped_lock l( harness_graph_multifunction_executor< InputType, OutputTuple>::template mutex_holder::mutex ); - + // put to lc level, it will accept and then block at m for ( size_t c = 0 ; c < lc ; ++c ) { ASSERT( exe_node.try_put( InputType() ) == true, NULL ); } // it only accepts to lc level ASSERT( exe_node.try_put( InputType() ) == false, NULL ); - + senders = new harness_counting_sender[num_senders]; for (size_t s = 0; s < num_senders; ++s ) { // register a sender senders[s].my_limit = N; exe_node.register_predecessor( senders[s] ); } - + } // release lock at end of scope, setting the exe node free to continue // wait for graph to settle down g.wait_for_all(); - - // confirm that each sender was requested from N times + + // confirm that each sender was requested from N times for (size_t s = 0; s < num_senders; ++s ) { size_t n = senders[s].my_received; - ASSERT( n == N, NULL ); + ASSERT( n == N, NULL ); ASSERT( senders[s].my_receiver == &exe_node, NULL ); } // confirm that each receivers got N * num_senders + the initial lc puts @@ -319,7 +319,7 @@ void run_concurrency_levels( int c ) { } -struct empty_no_assign { +struct empty_no_assign { empty_no_assign() {} empty_no_assign( int ) {} operator int() { return 0; } @@ -367,11 +367,11 @@ void unlimited_concurrency( Body body ) { } NativeParallelFor( p, parallel_puts(exe_node) ); - g.wait_for_all(); + g.wait_for_all(); // 2) the nodes will receive puts from multiple predecessors simultaneously, size_t ec = harness_graph_multifunction_executor::execute_count; - ASSERT( (int)ec == p*N, NULL ); + ASSERT( (int)ec == p*N, NULL ); for (size_t r = 0; r < num_receivers; ++r ) { size_t c = receivers[r].my_count; // 3) the nodes will send to multiple successors. @@ -508,7 +508,7 @@ void test_extract() { tbb::flow::make_edge(tbb::flow::output_port<0>(mf0), q0); tbb::flow::make_edge(tbb::flow::output_port<1>(mf0), q1); for( int i = 0; i < 2; ++i ) { - + /* b0 */ /* \ |--q0 */ /* mf0+ */ @@ -533,16 +533,16 @@ void test_extract() { ASSERT(my_count == 2, "multifunction_node didn't fire"); ASSERT(q0.try_get(cm), "multifunction_node didn't forward to 0"); ASSERT(q1.try_get(cm), "multifunction_node didn't forward to 1"); - + b0.extract(); - - + + /* b0 */ /* |--q0 */ /* mf0+ */ /* / |--q1 */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(mf0.predecessor_count() == 1 @@ -562,13 +562,13 @@ void test_extract() { ASSERT(q1.try_get(cm), "multifunction_node didn't forward second time"); q0.extract(); - + /* b0 */ /* | q0 */ /* mf0+ */ /* / |--q1 */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 1, "b1 has incorrect counts"); ASSERT(mf0.predecessor_count() == 1 @@ -587,20 +587,20 @@ void test_extract() { ASSERT(!q0.try_get(cm), "multifunction_node forwarded"); ASSERT(q1.try_get(cm), "multifunction_node forwarded"); mf0.extract(); - + if(i == 0) { } else { g.reset(tbb::flow::rf_reset_bodies); } - - + + /* b0 */ /* | q0 */ /* mf0+ */ /* | q1 */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 0, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(mf0.predecessor_count() == 0 @@ -619,13 +619,13 @@ void test_extract() { ASSERT(!q0.try_get(cm), "multifunction_node forwarded"); ASSERT(!q1.try_get(cm), "multifunction_node forwarded"); make_edge(b0, mf0); - + /* b0 */ /* \ | q0 */ /* mf0+ */ /* | q1 */ /* b1 */ - + ASSERT(b0.predecessor_count() == 0 && b0.successor_count() == 1, "b0 has incorrect counts"); ASSERT(b1.predecessor_count() == 0 && b1.successor_count() == 0, "b1 has incorrect counts"); ASSERT(mf0.predecessor_count() == 1 @@ -642,7 +642,7 @@ void test_extract() { ASSERT(my_count == 5, "multifunction_node fired though it has only one predecessor"); ASSERT(!q0.try_get(cm), "multifunction_node forwarded"); ASSERT(!q1.try_get(cm), "multifunction_node forwarded"); - + tbb::flow::make_edge(b1, mf0); tbb::flow::make_edge(tbb::flow::output_port<0>(mf0), q0); tbb::flow::make_edge(tbb::flow::output_port<1>(mf0), q1); @@ -653,7 +653,7 @@ void test_extract() { } #endif -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_mutex.cpp b/src/test/test_mutex.cpp index 091c11677726e7b55214ffb5e5fbf3517f23e44e..d4bd05abd45ff364300a4c4110f472772adc0ddd 100644 --- a/src/test/test_mutex.cpp +++ b/src/test/test_mutex.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_mutex_native_threads.cpp b/src/test/test_mutex_native_threads.cpp index 3f4c467398448c7167b0de76ee6e01d205210540..b2425fad4f7d3609d1f8a11372ab6d520faea40a 100644 --- a/src/test/test_mutex_native_threads.cpp +++ b/src/test/test_mutex_native_threads.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -34,7 +34,7 @@ template struct Counter { typedef M mutex_type; M mutex; - volatile long value; + volatile long value; void flog_once( size_t mode ); }; @@ -83,7 +83,7 @@ struct Invariant { bool is_okay() { return value_is( value[0] ); } - void flog_once( size_t mode ); + void flog_once( size_t mode ); }; template @@ -159,7 +159,7 @@ struct Work: NoAssign { void operator()( int ) const { size_t step; while( (step=Order.fetch_and_add(chunk))(), BROKEN_FUNCTION_POINTER_DEDUCTION( port_ref<1> ), /* stride_x */ 1, /* stride_y */ 64, /* stride_z */ stride_z, /* dim */ 3, err, err_size ); - k.set_ndranges( { 64, 64, 64 }, { 4, (int)min( maxSizes[1], 4 ), (int)min( maxSizes[2], 4 ) } ); + k.set_ndranges( { 64, 64, 64 }, { 4, min( (int)maxSizes[1], 4 ), min( (int)maxSizes[2], 4 ) } ); s.try_put( std::make_tuple( b1, b2, std::list() ) ); g.wait_for_all(); ASSERT( err.data() == std::string( "Done" ), "Validation has failed" ); @@ -133,7 +133,7 @@ void TestArgumentPassing() { std::fill( b1.begin(), b1.end(), 5 ); ASSERT( 2 * 64 * 64 < N, NULL ); k.set_args( port_ref<0, 1>(), /* stride_x */ 2, /* stride_y */ 2 * 64, /* stride_z */ 2 * 64 * 64, /* dim */ 3, err, err_size ); - k.set_ndranges( BROKEN_FUNCTION_POINTER_DEDUCTION( port_ref<2> ), BROKEN_INITIALIZER_LIST_DEDUCTION( { 4, (int)min( maxSizes[1], 4 ), min( (int)maxSizes[2], 4 ) } ) ); + k.set_ndranges( BROKEN_FUNCTION_POINTER_DEDUCTION( port_ref<2> ), BROKEN_INITIALIZER_LIST_DEDUCTION( { 4, min( (int)maxSizes[1], 4 ), min( (int)maxSizes[2], 4 ) } ) ); l.push_back( 64 ); l.push_back( 64 ); l.push_back( 64 ); s.try_put( std::make_tuple( b1, b2, l ) ); l.front() = 0; // Nothing should be changed @@ -338,21 +338,23 @@ void LoopTest() { template struct ConcurrencyTestBodyData { - typedef opencl_node< tuple, opencl_buffer>, queueing, Factory > NodeType; + typedef opencl_node< tuple, opencl_subbuffer>, queueing, Factory > NodeType; typedef std::vector< NodeType* > VectorType; Harness::SpinBarrier barrier; VectorType nodes; - function_node< opencl_buffer > validationNode; + function_node< opencl_subbuffer > validationNode; tbb::atomic numChecks; ConcurrencyTestBodyData( opencl_graph &g, int numThreads ) : barrier( numThreads ), nodes(numThreads), - validationNode( g, unlimited, [numThreads, this]( const opencl_buffer &b ) { + validationNode( g, unlimited, [numThreads, this]( const opencl_subbuffer &b ) { ASSERT( std::all_of( b.begin(), b.end(), [numThreads]( cl_short c ) { return c == numThreads; } ), "Validation has failed" ); --numChecks; } ) { numChecks = 100; + // The test creates subbers in pairs so numChecks should be even. + ASSERT( numChecks % 2 == 0, NULL ); } ~ConcurrencyTestBodyData() { @@ -432,15 +434,43 @@ public: remove_edge( output_port<1>( *data->nodes.back() ), data->validationNode ); data->barrier.wait(); + if ( idx == 0 ) { + // The first node needs two buffers. + Harness::FastRandom rnd(42); + cl_uint alignment = 0; + for ( opencl_device d : filteredDevices ) { + cl_uint deviceAlignment; + d.info( CL_DEVICE_MEM_BASE_ADDR_ALIGN, deviceAlignment ); + alignment = max( alignment, deviceAlignment ); + } + alignment /= CHAR_BIT; + cl_uint alignmentMask = ~(alignment-1); + for ( int i = 0; i < numChecks; i += 2 ) { + for ( int j = 0; j < 2; ++j ) { + opencl_buffer b1( f, N ); + std::fill( b1.begin(), b1.end(), 1 ); + input_port<0>( *n2 ).try_put( b1 ); + } - for ( int i = 0; i < numChecks; ++i ) { - opencl_buffer b( f, N ); - std::fill( b.begin(), b.end(), 1 ); - input_port<0>( *n2 ).try_put( b ); - if ( idx == 0 ) { - opencl_buffer b1( f, N ); - std::fill( b1.begin(), b1.end(), 0 ); - input_port<1>( *n2 ).try_put( b1 ); + // The subbers are created in pairs from one big buffer + opencl_buffer b( f, 4*N ); + size_t id0 = (rnd.get() % N) & alignmentMask; + opencl_subbuffer sb1( b, id0, N ); + std::fill( sb1.begin(), sb1.end(), 0 ); + input_port<1>( *n2 ).try_put( sb1 ); + + size_t id1 = (rnd.get() % N) & alignmentMask; + opencl_subbuffer sb2 = b.subbuffer( 2*N + id1, N ); + std::fill( sb2.begin(), sb2.end(), 0 ); + input_port<1>( *n2 ).try_put( sb2 ); + } + } else { + // Other nodes need only one buffer each because input_port<1> is connected with + // output_port<1> of the previous node. + for ( int i = 0; i < numChecks; ++i ) { + opencl_buffer b( f, N ); + std::fill( b.begin(), b.end(), 1 ); + input_port<0>( *n2 ).try_put( b ); } } @@ -485,7 +515,7 @@ struct DeviceFilter { std::unordered_map> platforms; for ( opencl_device d : device_list ) platforms[d.platform_name()].push_back( d ); - // Select a platform with maximum number of devices. + // Select a platform with maximum number of devices. filteredDevices = std::max_element( platforms.begin(), platforms.end(), []( const std::pair>& p1, const std::pair>& p2 ) { return p1.second.size() < p2.second.size(); diff --git a/src/test/test_opencl_precompiled_kernel_gpu.clbin b/src/test/test_opencl_precompiled_kernel_gpu.clbin index 3fcfdfcc158d816c9caeac9adcc622a3c6c75068..1c474d4a68c1779cd18a35d84642d64dd09812da 100644 Binary files a/src/test/test_opencl_precompiled_kernel_gpu.clbin and b/src/test/test_opencl_precompiled_kernel_gpu.clbin differ diff --git a/src/test/test_openmp.cpp b/src/test/test_openmp.cpp index 51187764a3dd67de84c657ff06bf43b753d839f6..48aa25137e55feb4483f8c38737bb6a59597ba3f 100644 --- a/src/test/test_openmp.cpp +++ b/src/test/test_openmp.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -20,7 +20,7 @@ // Test mixing OpenMP and TBB -/* SCR #471 +/* SCR #471 Below is workaround to compile test within environment of Intel Compiler but by Microsoft Compiler. So, there is wrong "omp.h" file included and manifest section is missed from .exe file - restoring here. @@ -90,9 +90,9 @@ typedef short T; void SerialConvolve( T c[], const T a[], int m, const T b[], int n ) { for( int i=0; i& range ) { - for( int j=range.begin(); j!=range.end(); ++j ) + for( int j=range.begin(); j!=range.end(); ++j ) sum += my_a[j]*my_b[i-j]; } }; @@ -142,13 +142,13 @@ public: //! Test OpenMMP loop around TBB loop void OpenMP_TBB_Convolve( T c[], const T a[], int m, const T b[], int n ) { REMARK("testing OpenMP loop around TBB loop\n"); -#pragma omp parallel +#pragma omp parallel { task_scheduler_init init; #pragma omp for for( int i=0; i(start,finish,10), body ); c[i] = body.sum; @@ -169,10 +169,10 @@ public: void operator()( const blocked_range& range ) const { for( int i=range.begin(); i!=range.end(); ++i ) { int start = i @@ -138,7 +138,7 @@ void parallel_read_write_tests() { } } -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_parallel_do.cpp b/src/test/test_parallel_do.cpp index 3c28ee5d8014db26e57308a50bac781a599ed4db..b61d89396d6f0c96cd3b19c3978f03202a2b30c9 100644 --- a/src/test/test_parallel_do.cpp +++ b/src/test/test_parallel_do.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -277,8 +277,8 @@ int TestMain () { // Test that all workers sleep when no work TestCPUUserTime(p); } - // This check must be performed after the scheduler terminated because only in this - // case there is a guarantee that the workers already destroyed their last tasks. + // This check must be performed after the scheduler terminated because only in this + // case there is a guarantee that the workers already destroyed their last tasks. ASSERT( g_values_counter == 0, "Value objects were leaked" ); return Harness::Done; } diff --git a/src/test/test_parallel_for.cpp b/src/test/test_parallel_for.cpp index 958d5cae18799bfe9ce2857b32b1e4fecb19f541..2b74e72e4b8233c739cc01abb51a4163b26aa3a3 100644 --- a/src/test/test_parallel_for.cpp +++ b/src/test/test_parallel_for.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_parallel_for_each.cpp b/src/test/test_parallel_for_each.cpp index 2ca101d85e4a2771c97d6769df0c567d8dd87d99..6a2aa8628214fe26b0947e1773cf4267486f5726 100644 --- a/src/test/test_parallel_for_each.cpp +++ b/src/test/test_parallel_for_each.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -51,7 +51,7 @@ void RunPForEachTests() sum = 0; size_t test_sum = 0; - for (size_t i =0; i < NUMBER_OF_ELEMENTS; i++) { + for (size_t i =0; i < NUMBER_OF_ELEMENTS; i++) { test_vector[i] = i; test_sum += i; } @@ -102,7 +102,7 @@ void TestExceptionsSupport() REMARK (__FUNCTION__); size_t test_vector[NUMBER_OF_ELEMENTS + 1]; - for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { + for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { test_vector[i] = i; } @@ -128,14 +128,14 @@ class my_worker_pforeach_task : public tbb::task tbb::task* execute () { size_t test_vector[NUMBER_OF_ELEMENTS + 1]; - for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { + for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { test_vector[i] = i; } Iterator begin(&test_vector[0]); Iterator end(&test_vector[NUMBER_OF_ELEMENTS]); tbb::parallel_for_each(begin, end, (TestFunctionType)function_to_cancel); - + return NULL; } public: diff --git a/src/test/test_parallel_for_vectorization.cpp b/src/test/test_parallel_for_vectorization.cpp index e8ce9c62d192ba177d8e0b5664c9506d20abd827..c1b97d6a225183804febf955c661b177cc020a7d 100644 --- a/src/test/test_parallel_for_vectorization.cpp +++ b/src/test/test_parallel_for_vectorization.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_parallel_invoke.cpp b/src/test/test_parallel_invoke.cpp index a45317e64f993f5da6d707de3edda4c8091c8d7c..dd9c810791fa44053d723eb8176cf5de816d48cf 100644 --- a/src/test/test_parallel_invoke.cpp +++ b/src/test/test_parallel_invoke.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_parallel_pipeline.cpp b/src/test/test_parallel_pipeline.cpp index c846f1a2381844248532f1b9dfea00e60f6ff6fc..8d2e0e8c90f17885d9a13d6fc80e47f90aa81e2d 100644 --- a/src/test/test_parallel_pipeline.cpp +++ b/src/test/test_parallel_pipeline.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -35,7 +35,7 @@ const unsigned n_tokens = 8; // we can conceivably have two buffers used in the middle filter for every token in flight, so // we must allocate two buffers for every token. Unlikely, but possible. const unsigned n_buffers = 2*n_tokens; -const unsigned max_counter = 16; +const int max_counter = 16; static tbb::atomic output_counter; static tbb::atomic input_counter; static tbb::atomic non_pointer_specialized_calls; @@ -47,7 +47,7 @@ static tbb::spin_mutex buffer_mutex; static int intbuffer[max_counter]; // store results for parallel pipeline test static bool check_intbuffer; -static void* buffers[n_buffers]; +static void* buffers[n_buffers]; static bool buf_available[n_buffers]; void *fetchNextBuffer() { @@ -121,7 +121,7 @@ public: AssertLive(); if( --input_counter < 0 ) { control.stop(); - } + } else // only count successful reads ++non_pointer_specialized_calls; return U(); // default constructed @@ -157,7 +157,7 @@ public: if( --input_counter < 0 ) { control.stop(); } - else + else ++non_pointer_specialized_calls; } @@ -327,10 +327,10 @@ void checkCounters(final_assert_type my_t) { ASSERT(pointer_specialized_calls+first_pointer_specialized_calls+second_pointer_specialized_calls == 0, "non-pointer filters specialized to pointer"); ASSERT(non_pointer_specialized_calls == 3*max_counter, "bad count for non-pointer filters"); if(check_intbuffer) { - for(int i = 1; i <= (int)max_counter; ++i) { + for(int i = 1; i <= max_counter; ++i) { int j = i*i; bool found_val = false; - for(int k = 0; k < (int)max_counter; ++k) { + for(int k = 0; k < max_counter; ++k) { if(intbuffer[k] == j) { found_val = true; break; @@ -347,7 +347,7 @@ void checkCounters(final_assert_type my_t) { second_pointer_specialized_calls == 0, "incorrect specialization for firstpointer"); break; case assert_secondpointer: - ASSERT(pointer_specialized_calls == max_counter && + ASSERT(pointer_specialized_calls == max_counter && first_pointer_specialized_calls == 0 && non_pointer_specialized_calls == max_counter && // input filter second_pointer_specialized_calls == max_counter, "incorrect specialization for firstpointer"); @@ -361,7 +361,7 @@ void checkCounters(final_assert_type my_t) { } } -static const tbb::filter::mode filter_table[] = { tbb::filter::parallel, tbb::filter::serial_in_order, tbb::filter::serial_out_of_order}; +static const tbb::filter::mode filter_table[] = { tbb::filter::parallel, tbb::filter::serial_in_order, tbb::filter::serial_out_of_order}; const unsigned number_of_filter_types = sizeof(filter_table)/sizeof(filter_table[0]); typedef tbb::filter_t filter_chain; @@ -397,7 +397,7 @@ void run_function_spec() { tbb::atomic counter; counter = max_counter; // Construct filter using lambda-syntax when parallel_pipeline() is being run; - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_table[i], [&counter]( tbb::flow_control& control ) { if( counter-- == 0 ) control.stop(); @@ -410,11 +410,11 @@ void run_function_spec() { } template -void run_filter_set( - input_filter& i_filter, - middle_filter& m_filter, - output_filter& o_filter, - mode_array *filter_type, +void run_filter_set( + input_filter& i_filter, + middle_filter& m_filter, + output_filter& o_filter, + mode_array *filter_type, final_assert_type my_t) { tbb::filter_t filter1( filter_type[0], i_filter ); tbb::filter_t filter2( filter_type[1], m_filter ); @@ -450,7 +450,7 @@ void run_filter_set( // Construct filters and create the sequence when parallel_pipeline() is being run resetCounters(); - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_type[0], i_filter) & tbb::make_filter(filter_type[1], m_filter) & tbb::make_filter(filter_type[2], o_filter) ); @@ -490,7 +490,7 @@ void run_lambdas_test( mode_array *filter_type ) { counter = max_counter; // Construct filters using lambda-syntax and create the sequence when parallel_pipeline() is being run; resetCounters(); // only need the output_counter reset. - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1 { if( --counter < 0 ) control.stop(); @@ -499,15 +499,15 @@ void run_lambdas_test( mode_array *filter_type ) { tbb::make_filter(filter_type[1], []( t1 /*my_storage*/ ) -> t2 { return t2(); } ) & - tbb::make_filter(filter_type[2], [] ( t2 ) -> void { + tbb::make_filter(filter_type[2], [] ( t2 ) -> void { output_counter++; } - ) + ) ); checkCounters(no_pointer_counts); // don't have to worry about specializations counter = max_counter; // pointer filters resetCounters(); - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1* { if( --counter < 0 ) { control.stop(); @@ -519,17 +519,17 @@ void run_lambdas_test( mode_array *filter_type ) { tbb::tbb_allocator().destroy(my_storage); // my_storage->~t1(); return new(my_storage) t2(); } ) & - tbb::make_filter(filter_type[2], [] ( t2* my_storage ) -> void { + tbb::make_filter(filter_type[2], [] ( t2* my_storage ) -> void { tbb::tbb_allocator().destroy(my_storage); // my_storage->~t2(); freeBuffer(my_storage); output_counter++; } - ) + ) ); checkCounters(no_pointer_counts); // first filter outputs pointer counter = max_counter; resetCounters(); - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1* { if( --counter < 0 ) { control.stop(); @@ -542,15 +542,15 @@ void run_lambdas_test( mode_array *filter_type ) { freeBuffer(my_storage); return t2(); } ) & - tbb::make_filter(filter_type[2], [] ( t2 /*my_storage*/) -> void { + tbb::make_filter(filter_type[2], [] ( t2 /*my_storage*/) -> void { output_counter++; } - ) + ) ); checkCounters(no_pointer_counts); // second filter outputs pointer counter = max_counter; resetCounters(); - tbb::parallel_pipeline( n_tokens, + tbb::parallel_pipeline( n_tokens, tbb::make_filter(filter_type[0], [&counter]( tbb::flow_control& control ) -> t1 { if( --counter < 0 ) { control.stop(); @@ -560,11 +560,11 @@ void run_lambdas_test( mode_array *filter_type ) { tbb::make_filter(filter_type[1], []( t1 /*my_storage*/ ) -> t2* { return new(fetchNextBuffer()) t2(); } ) & - tbb::make_filter(filter_type[2], [] ( t2* my_storage) -> void { + tbb::make_filter(filter_type[2], [] ( t2* my_storage) -> void { tbb::tbb_allocator().destroy(my_storage); // my_storage->~t2(); freeBuffer(my_storage); output_counter++; } - ) + ) ); checkCounters(no_pointer_counts); } diff --git a/src/test/test_parallel_reduce.cpp b/src/test/test_parallel_reduce.cpp index c708266da95ac074ce8185a99baca0e65bf0a993..f05ba388b00f69e06c693e66331ef913d1c24f6c 100644 --- a/src/test/test_parallel_reduce.cpp +++ b/src/test/test_parallel_reduce.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -62,11 +62,11 @@ private: FooBody() {++FooBodyCount;} public: ~FooBody() { - forked = 0xDEADBEEF; + forked = 0xDEADBEEF; sum=0xDEADBEEF; join_count=0xDEADBEEF; --FooBodyCount; - } + } FooBody( FooBody& other, tbb::split ) { ++FooBodyCount; ++ForkCount; @@ -79,7 +79,7 @@ public: void join( FooBody& s ) { ASSERT( s.forked==1, NULL ); ASSERT( this!=&s, NULL ); - ASSERT( this==s.parent, NULL ); + ASSERT( this==s.parent, NULL ); ASSERT( end==s.begin, NULL ); end = s.end; sum += s.sum; @@ -105,7 +105,7 @@ public: void Flog( int nthread, bool interference=false ) { for (int mode = 0; mode < 4; mode++) { tbb::tick_count T0 = tbb::tick_count::now(); - long join_count = 0; + long join_count = 0; tbb::affinity_partitioner ap; for( size_t i=0; i<=1000; ++i ) { FooBody f; @@ -127,7 +127,7 @@ void Flog( int nthread, bool interference=false ) { case 2: tbb::parallel_reduce( MinimalRange(i), f, tbb::auto_partitioner() ); break; - case 3: + case 3: tbb::parallel_reduce( MinimalRange(i), f, ap ); break; } @@ -177,8 +177,8 @@ void ParallelSum () { ValueType r1 = tbb::parallel_reduce( range, I, Accumulator(), Sum() ); ASSERT( r1 == R, NULL ); #if __TBB_LAMBDAS_PRESENT - ValueType r2 = tbb::parallel_reduce( range, I, - [](const tbb::blocked_range& r, ValueType value) -> ValueType { + ValueType r2 = tbb::parallel_reduce( range, I, + [](const tbb::blocked_range& r, ValueType value) -> ValueType { for ( ValueType* pv = r.begin(); pv != r.end(); ++pv ) value += *pv; return value; @@ -227,7 +227,7 @@ void TestDeterministicReduction () { tbb::parallel_deterministic_reduce( range,body2 ); ASSERT( body2.my_value == R, NULL ); #if __TBB_LAMBDAS_PRESENT - Type r = tbb::parallel_deterministic_reduce( range, Type(), + Type r = tbb::parallel_deterministic_reduce( range, Type(), [](const tbb::blocked_range& br, Type value) -> Type { Harness::ConcurrencyTracker ct; for ( int ii = br.begin(); ii != br.end(); ++ii ) { diff --git a/src/test/test_parallel_scan.cpp b/src/test/test_parallel_scan.cpp index 872a0699721e7990ea943fb71a5225aebce3899a..cc3174c51b425d7dbc718737b34f2c07341cc308 100644 --- a/src/test/test_parallel_scan.cpp +++ b/src/test/test_parallel_scan.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -28,7 +28,7 @@ static volatile bool ScanIsRunning = false; //! Sum of 0..i with wrap around on overflow. inline int TriangularSum( int i ) { - return i&1 ? ((i>>1)+1)*i : (i>>1)*(i+1); + return i&1 ? ((i>>1)+1)*i : (i>>1)*(i+1); } //! Verify that sum is sum of integers in closed interval [start_index..finish_index]. @@ -43,11 +43,11 @@ enum AddendFlag { USED_FINAL=2 }; -//! Array recording how each addend was used. +//! Array recording how each addend was used. /** 'unsigned char' instead of AddendFlag for sake of compactness. */ static unsigned char AddendHistory[MAXN]; -//! Set to 1 for debugging output +//! Set to 1 for debugging output #define PRINT_DEBUG 0 #include "tbb/atomic.h" @@ -94,14 +94,14 @@ public: #endif /* PRINT_DEBUG */ ~Accumulator() { #if PRINT_DEBUG - REPORT("%d [%ld..%ld) destroyed\n",id,my_range.begin(),my_range.end() ); + REPORT("%d [%ld..%ld) destroyed\n",id,my_range.begin(),my_range.end() ); #endif /* PRINT_DEBUG */ // Clear self as first action of destructor, to indicate that object is not fully constructed. self = 0; --NumberOfLiveAccumulator; } - Accumulator( Accumulator& a, tbb::split ) : - my_total(0), my_array(a.my_array), my_sum(a.my_sum), my_range(-1,-1,1) + Accumulator( Accumulator& a, tbb::split ) : + my_total(0), my_array(a.my_array), my_sum(a.my_sum), my_range(-1,-1,1) { ++NumberOfLiveAccumulator; #if PRINT_DEBUG @@ -111,7 +111,7 @@ public: // Set self as last action of constructor, to indicate that object is fully constructed. self = this; } - template + template void operator()( const Range& r, Tag /*tag*/ ) { Snooze(true); #if PRINT_DEBUG @@ -131,7 +131,7 @@ public: } else { ASSERT( AddendHistory[i]==UNUSED, "addend used too many times" ); AddendHistory[i] |= USED_NONFINAL; - } + } } if( my_range.empty() ) my_range = r; @@ -147,13 +147,13 @@ public: id,my_range.begin(),my_range.end()); #endif /* PRINT_DEBUG */ Snooze(true); - ASSERT( ScanIsRunning, NULL ); + ASSERT( ScanIsRunning, NULL ); ASSERT( left.my_range.end()==my_range.begin(), NULL ); my_total += left.my_total; my_range = Range( left.my_range.begin(), my_range.end(), 1 ); - ASSERT( ScanIsRunning, NULL ); + ASSERT( ScanIsRunning, NULL ); Snooze(true); - ASSERT( ScanIsRunning, NULL ); + ASSERT( ScanIsRunning, NULL ); ASSERT( self==this, NULL ); ASSERT( left.self==&left, NULL ); } @@ -215,7 +215,7 @@ void TestAccumulator( int mode, int nthread ) { Snooze(false); tbb::tick_count t1 = tbb::tick_count::now(); long used_once_count = 0; - for( long i=0; i bool Validate(std::string * a, std::string * b, size_t n) { for (size_t i = 0; i < n; i++) { @@ -89,18 +89,18 @@ bool Validate(std::string * a, std::string * b, size_t n) { return true; } -//! A Validate specialized to Minimal since it does not define an operator== +//! A Validate specialized to Minimal since it does not define an operator== template<> bool Validate(Minimal *a, Minimal *b, size_t n) { for (size_t i = 0; i < n; i++) { ASSERT( Minimal::AreEqual(a[i],b[i]), NULL ); } return true; -} +} -//! A Validate specialized to concurrent_vector since it does not define an operator== +//! A Validate specialized to concurrent_vector since it does not define an operator== template<> -bool Validate::iterator>(tbb::concurrent_vector::iterator a, +bool Validate::iterator>(tbb::concurrent_vector::iterator a, tbb::concurrent_vector::iterator b, size_t n) { for (size_t i = 0; i < n; i++) { ASSERT( Minimal::AreEqual(a[i],b[i]), NULL ); @@ -108,8 +108,8 @@ bool Validate::iterator>(tbb::concurrent_vector< return true; } -//! used in Verbose mode for identifying which data set is being used -static std::string test_type; +//! used in Verbose mode for identifying which data set is being used +static std::string test_type; //! The default initialization routine. /*! This routine assumes that you can assign to the elements from a float. @@ -117,12 +117,12 @@ static std::string test_type; them according to the current data set (tracked by a local static variable). Returns true if a valid test has been setup, or false if there is no test to perform. -*/ - +*/ + template < typename RandomAccessIterator, typename Compare > bool init_iter(RandomAccessIterator iter, RandomAccessIterator sorted_list, size_t n, const Compare &compare, bool reset) { - static char test_case = 0; - const char num_cases = 3; + static char test_case = 0; + const char num_cases = 3; if (reset) test_case = 0; @@ -132,24 +132,24 @@ bool init_iter(RandomAccessIterator iter, RandomAccessIterator sorted_list, size case 0: /* use sin to generate the values */ test_type = "sin"; - for (size_t i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) iter[i] = sorted_list[i] = static_cast::value_type>(sin(float(i))); break; case 1: - /* presorted list */ + /* presorted list */ test_type = "pre-sorted"; - for (size_t i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) iter[i] = sorted_list[i] = static_cast::value_type>(i); break; case 2: - /* reverse-sorted list */ + /* reverse-sorted list */ test_type = "reverse-sorted"; - for (size_t i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) iter[i] = sorted_list[i] = static_cast::value_type>(n - i); break; - } + } - // pre-sort sorted_list for later validity testing + // pre-sort sorted_list for later validity testing std::sort(sorted_list, sorted_list + n, compare); test_case++; return true; @@ -187,7 +187,7 @@ bool init_iter(T * iter, T * sorted_list, size_t n, const Compare &compare, bool break; } - // pre-sort sorted_list for later validity testing + // pre-sort sorted_list for later validity testing std::sort(sorted_list, sorted_list + n, compare); test_case++; return true; @@ -196,14 +196,14 @@ bool init_iter(T * iter, T * sorted_list, size_t n, const Compare &compare, bool } -//! The initialization routine specialized to the class Minimal +//! The initialization routine specialized to the class Minimal /*! Minimal cannot have floats assigned to it. This function uses the set_val method */ template < > bool init_iter(Minimal* iter, Minimal * sorted_list, size_t n, const MinimalCompare &compare, bool reset) { static char test_case = 0; - const char num_cases = 3; + const char num_cases = 3; if (reset) test_case = 0; @@ -218,22 +218,22 @@ bool init_iter(Minimal* iter, Minimal * sorted_list, size_t n, const MinimalComp } break; case 1: - /* presorted list */ + /* presorted list */ test_type = "pre-sorted"; for (size_t i = 0; i < n; i++) { - iter[i].set_val( int(i) ); + iter[i].set_val( int(i) ); sorted_list[i].set_val( int(i) ); } break; case 2: - /* reverse-sorted list */ + /* reverse-sorted list */ test_type = "reverse-sorted"; for (size_t i = 0; i < n; i++) { - iter[i].set_val( int(n-i) ); + iter[i].set_val( int(n-i) ); sorted_list[i].set_val( int(n-i) ); } break; - } + } std::sort(sorted_list, sorted_list + n, compare); test_case++; return true; @@ -241,12 +241,12 @@ bool init_iter(Minimal* iter, Minimal * sorted_list, size_t n, const MinimalComp return false; } -//! The initialization routine specialized to the class concurrent_vector +//! The initialization routine specialized to the class concurrent_vector /*! Minimal cannot have floats assigned to it. This function uses the set_val method */ template < > -bool init_iter(tbb::concurrent_vector::iterator iter, tbb::concurrent_vector::iterator sorted_list, +bool init_iter(tbb::concurrent_vector::iterator iter, tbb::concurrent_vector::iterator sorted_list, size_t n, const MinimalCompare &compare, bool reset) { static char test_case = 0; const char num_cases = 3; @@ -287,15 +287,15 @@ bool init_iter(tbb::concurrent_vector::iterator iter, tbb::concurrent_v return false; } -//! The initialization routine specialized to the class string -/*! strings are created from floats. +//! The initialization routine specialized to the class string +/*! strings are created from floats. */ template<> bool init_iter(std::string *iter, std::string *sorted_list, size_t n, const std::less &compare, bool reset) { static char test_case = 0; - const char num_cases = 1; - + const char num_cases = 1; + if (reset) test_case = 0; if (test_case < num_cases) { @@ -314,7 +314,7 @@ bool init_iter(std::string *iter, std::string *sorted_list, size_t n, const std: sorted_list[i] = iter[i] = std::string(buffer); } break; - } + } std::sort(sorted_list, sorted_list + n, compare); test_case++; return true; @@ -322,14 +322,14 @@ bool init_iter(std::string *iter, std::string *sorted_list, size_t n, const std: return false; } -//! The current number of threads in use (for Verbose only) +//! The current number of threads in use (for Verbose only) static size_t current_p; -//! The current data type being sorted (for Verbose only) -static std::string current_type; +//! The current data type being sorted (for Verbose only) +static std::string current_type; //! The default test routine. -/*! Tests all data set sizes from 0 to N, all grainsizes from 0 to G=10, and selects from +/*! Tests all data set sizes from 0 to N, all grainsizes from 0 to G=10, and selects from all possible interfaces to parallel_sort depending on whether a scratch space and compare have been provided. */ @@ -337,18 +337,18 @@ template bool parallel_sortTest(size_t n, RandomAccessIterator iter, RandomAccessIterator sorted_list, const Compare *comp) { bool passed = true; - Compare local_comp; + Compare local_comp; init_iter(iter, sorted_list, n, local_comp, true); do { - REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(), + REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(), static_cast(current_p), static_cast(n)); if (comp != NULL) { tbb::parallel_sort(iter, iter + n, local_comp ); } else { tbb::parallel_sort(iter, iter + n ); } - if (!Validate(iter, sorted_list, n)) + if (!Validate(iter, sorted_list, n)) passed = false; REMARK("passed\n"); } while (init_iter(iter, sorted_list, n, local_comp, false)); @@ -378,17 +378,17 @@ bool parallel_sortTest(size_t n, Minimal * iter, Minimal * sorted_list, const Mi //! The test routine specialize to concurrent_vector of Minimal, since it does not have a less defined for it template<> -bool parallel_sortTest(size_t n, tbb::concurrent_vector::iterator iter, +bool parallel_sortTest(size_t n, tbb::concurrent_vector::iterator iter, tbb::concurrent_vector::iterator sorted_list, const MinimalCompare *compare) { bool passed = true; if (compare == NULL) return passed; - + init_iter(iter, sorted_list, n, *compare, true); do { REMARK("%s %s p=%llu n=%llu :",current_type.c_str(), test_type.c_str(), static_cast(current_p), static_cast(n)); - + tbb::parallel_sort(iter, iter + n, *compare ); if (!Validate(iter, sorted_list, n)) @@ -403,13 +403,13 @@ bool parallel_sortTest(size_t n, tbb::concurrent_vector::iterator iter, by each type are tested. */ void Flog() { - // For each type create: - // the list to be sorted by parallel_sort (array) + // For each type create: + // the list to be sorted by parallel_sort (array) // the list to be sort by STL sort (array_2) // and a less function object const size_t N = 50000; - + Minimal *minimal_array = new Minimal[N]; Minimal *minimal_array_2 = new Minimal[N]; MinimalCompare minimal_less; @@ -431,8 +431,8 @@ void Flog() { tbb::concurrent_vector minimal_cv2; minimal_cv1.grow_to_at_least(N); minimal_cv2.grow_to_at_least(N); - - + + // run the appropriate tests for each type current_type = "Minimal(less)"; @@ -443,18 +443,18 @@ void Flog() { parallel_sortTest(50000, minimal_array, minimal_array_2, &minimal_less); current_type = "float (no less)"; - parallel_sortTest(0, float_array, float_array_2, static_cast *>(NULL)); - parallel_sortTest(1, float_array, float_array_2, static_cast *>(NULL)); - parallel_sortTest(10, float_array, float_array_2, static_cast *>(NULL)); - parallel_sortTest(9999, float_array, float_array_2, static_cast *>(NULL)); - parallel_sortTest(50000, float_array, float_array_2, static_cast *>(NULL)); + parallel_sortTest(0, float_array, float_array_2, static_cast *>(NULL)); + parallel_sortTest(1, float_array, float_array_2, static_cast *>(NULL)); + parallel_sortTest(10, float_array, float_array_2, static_cast *>(NULL)); + parallel_sortTest(9999, float_array, float_array_2, static_cast *>(NULL)); + parallel_sortTest(50000, float_array, float_array_2, static_cast *>(NULL)); current_type = "float (less)"; - parallel_sortTest(0, float_array, float_array_2, &float_less); - parallel_sortTest(1, float_array, float_array_2, &float_less); - parallel_sortTest(10, float_array, float_array_2, &float_less); - parallel_sortTest(9999, float_array, float_array_2, &float_less); - parallel_sortTest(50000, float_array, float_array_2, &float_less); + parallel_sortTest(0, float_array, float_array_2, &float_less); + parallel_sortTest(1, float_array, float_array_2, &float_less); + parallel_sortTest(10, float_array, float_array_2, &float_less); + parallel_sortTest(9999, float_array, float_array_2, &float_less); + parallel_sortTest(50000, float_array, float_array_2, &float_less); current_type = "concurrent_vector (no less)"; parallel_sortTest(0, float_cv1.begin(), float_cv2.begin(), static_cast *>(NULL)); @@ -571,7 +571,7 @@ int TestMain () { // Test that all workers sleep when no work TestCPUUserTime(p); } - } + } return Harness::Done; } diff --git a/src/test/test_parallel_while.cpp b/src/test/test_parallel_while.cpp index 0bffcbf59971d347ea44137dd0a72c2e944bc673..71cdce9bd96c75d0681c6b632781c80acd560951 100644 --- a/src/test/test_parallel_while.cpp +++ b/src/test/test_parallel_while.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -32,7 +32,7 @@ class MinimalArgumentType { enum { DEAD=0xDEAD, LIVE=0x2718, - INITIALIZED=0x3141 + INITIALIZED=0x3141 } my_state; public: ~MinimalArgumentType() { @@ -50,7 +50,7 @@ public: long get_value() const { ASSERT( my_state==INITIALIZED, NULL ); return my_value; - } + } }; class IntegerStream { @@ -59,7 +59,7 @@ class IntegerStream { public: IntegerStream( long n ) : my_limit(n), my_index(0) {} bool pop_if_present( MinimalArgumentType& v ) { - if( my_index>=my_limit ) + if( my_index>=my_limit ) return false; v.set_value( my_index ); my_index+=2; @@ -82,11 +82,11 @@ public: value.set_value(i+1); my_while.add( value ); } - for( int j=0; jthread_num) - min(stat.m_rangeNum, settings->thread_num); if (disparity > settings->above_threads_size_tolerance) { REPORT("ERROR: '%s (f=%d|e=%d)': |#ranges(%llu)-#threads(%llu)|=%llu > %llu=tolerance\n", - rangeName, int(settings->provide_feedback), int(settings->ensure_non_empty_size), stat.m_rangeNum, + rangeName, int(settings->provide_feedback), int(settings->ensure_non_empty_size), stat.m_rangeNum, settings->thread_num, disparity, uint64_t(settings->above_threads_size_tolerance)); ASSERT(disparity <= settings->above_threads_size_tolerance, "Incorrect number of range " "objects was created before work balancing phase started"); diff --git a/src/test/test_pipeline.cpp b/src/test/test_pipeline.cpp index 7fa6e5717827f015788751111a3f1c3505448fc7..4e6542aa34e515444dc5740632c83a07e04094e4 100644 --- a/src/test/test_pipeline.cpp +++ b/src/test/test_pipeline.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -64,11 +64,11 @@ static unsigned out_of_order_count; class BaseFilter: public tbb::filter { bool* const my_done; - const bool my_is_last; + const bool my_is_last; bool my_is_running; public: tbb::atomic current_token; - BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : + BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : filter(type), my_done(done), my_is_last(is_last), @@ -78,7 +78,7 @@ public: virtual Buffer* get_buffer( void* item ) { current_token++; return static_cast(item); - } + } /*override*/void* operator()( void* item ) { Harness::ConcurrencyTracker ct; if( is_serial() ) @@ -87,7 +87,7 @@ public: Buffer* b = get_buffer(item); if( b ) { if( is_ordered() ) { - if( b->sequence_number == Buffer::unused ) + if( b->sequence_number == Buffer::unused ) b->sequence_number = current_token-1; else ASSERT( b->sequence_number==current_token-1, "item arrived out of order" ); @@ -95,8 +95,8 @@ public: if( b->sequence_number != current_token-1 && b->sequence_number != Buffer::unused ) out_of_order_count++; } - ASSERT( b->id < StreamSize, NULL ); - ASSERT( !my_done[b->id], "duplicate processing of token?" ); + ASSERT( b->id < StreamSize, NULL ); + ASSERT( !my_done[b->id], "duplicate processing of token?" ); ASSERT( b->is_busy, NULL ); my_done[b->id] = true; if( my_is_last ) { @@ -106,7 +106,7 @@ public: } } my_is_running = false; - return b; + return b; } }; @@ -121,12 +121,12 @@ public: {} /*override*/Buffer* get_buffer( void* ) { unsigned long next_input; - unsigned free_buffer = 0; + unsigned free_buffer = 0; { // lock protected scope tbb::spin_mutex::scoped_lock lock(input_lock); if( current_token>=StreamSize ) return NULL; - next_input = current_token++; + next_input = current_token++; // once in a while, emulate waiting for input; this only makes sense for serial input if( is_serial() && WaitTest.required() ) WaitTest.probe( ); @@ -139,9 +139,9 @@ public: } } ASSERT( free_bufferid == Buffer::unused, NULL); b->id = next_input; ASSERT( b->sequence_number == Buffer::unused, NULL); @@ -190,8 +190,8 @@ bool do_hacking_tests = true; const tbb::internal::Token tokens_before_wraparound = 0xF; void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) { - // There are 3 filter types: parallel, serial_in_order and serial_out_of_order - static const tbb::filter::mode filter_table[] = { tbb::filter::parallel, tbb::filter::serial_in_order, tbb::filter::serial_out_of_order}; + // There are 3 filter types: parallel, serial_in_order and serial_out_of_order + static const tbb::filter::mode filter_table[] = { tbb::filter::parallel, tbb::filter::serial_in_order, tbb::filter::serial_out_of_order}; const unsigned number_of_filter_types = sizeof(filter_table)/sizeof(filter_table[0]); REMARK( "testing with %lu threads and %lu filters\n", nthread, number_of_filters ); ASSERT( number_of_filters<=MaxFilters, "too many filters" ); @@ -234,7 +234,7 @@ void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) { } } // Account for clipping of parallelism. - if( parallelism_limit>nthread ) + if( parallelism_limit>nthread ) parallelism_limit = nthread; if( parallelism_limit>ntokens ) parallelism_limit = (unsigned)ntokens; @@ -259,7 +259,7 @@ void TestTrivialPipeline( unsigned nthread, unsigned number_of_filters ) { StreamSize = StreamSize*8/3; } } - if( Harness::ConcurrencyTracker::PeakParallelism() < parallelism_limit ) + if( Harness::ConcurrencyTracker::PeakParallelism() < parallelism_limit ) REMARK( "nthread=%lu ntokens=%lu MaxParallelism=%lu parallelism_limit=%lu\n", nthread, ntokens, Harness::ConcurrencyTracker::PeakParallelism(), parallelism_limit ); for( unsigned i=0; i < number_of_filters; ++i ) { diff --git a/src/test/test_pipeline_with_tbf.cpp b/src/test/test_pipeline_with_tbf.cpp index 509dcfe040bd0c81cfef15dec60c029ab6638c01..96380f62e6697a5e2b45d15e0d708f7943406f22 100644 --- a/src/test/test_pipeline_with_tbf.cpp +++ b/src/test/test_pipeline_with_tbf.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -72,11 +72,11 @@ static unsigned out_of_order_count; template class BaseFilter: public T { bool* const my_done; - const bool my_is_last; + const bool my_is_last; bool my_is_running; public: tbb::atomic current_token; - BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : + BaseFilter( tbb::filter::mode type, bool done[], bool is_last ) : T(type), my_done(done), my_is_last(is_last), @@ -86,9 +86,9 @@ public: virtual Buffer* get_buffer( void* item ) { current_token++; return static_cast(item); - } + } /*override*/void* operator()( void* item ) { - // Check if work is done only on one thread when ntokens==1 or + // Check if work is done only on one thread when ntokens==1 or // when pipeline has only one filter that is serial and non-thread-bound if( is_serial_execution && !this->is_bound() ) { // Get id of current thread @@ -97,7 +97,7 @@ public: // Serialized execution is expected, so there should be no race. if( thread_id == id0 ) thread_id = id; - // Check if work is done on one thread + // Check if work is done on one thread ASSERT( thread_id == id, "non-thread-bound stages executed on different threads when must be executed on a single one"); } Harness::ConcurrencyTracker ct; @@ -118,7 +118,7 @@ public: } } if( this->is_ordered() ) { - if( b->sequence_number == Buffer::unused ) + if( b->sequence_number == Buffer::unused ) b->sequence_number = current_token-1; else ASSERT( b->sequence_number==current_token-1, "item arrived out of order" ); @@ -126,8 +126,8 @@ public: if( b->sequence_number != current_token-1 && b->sequence_number != Buffer::unused ) out_of_order_count++; } - ASSERT( b->id < StreamSize, NULL ); - ASSERT( !my_done[b->id], "duplicate processing of token?" ); + ASSERT( b->id < StreamSize, NULL ); + ASSERT( !my_done[b->id], "duplicate processing of token?" ); ASSERT( b->is_busy, NULL ); my_done[b->id] = true; if( my_is_last ) { @@ -137,7 +137,7 @@ public: } } my_is_running = false; - return b; + return b; } }; @@ -153,12 +153,12 @@ public: {} /*override*/Buffer* get_buffer( void* ) { unsigned long next_input; - unsigned free_buffer = 0; + unsigned free_buffer = 0; { // lock protected scope tbb::spin_mutex::scoped_lock lock(input_lock); if( this->current_token>=StreamSize ) return NULL; - next_input = this->current_token++; + next_input = this->current_token++; // once in a while, emulate waiting for input; this only makes sense for serial input if( this->is_serial() && WaitTest.required() ) WaitTest.probe( ); @@ -171,9 +171,9 @@ public: } } ASSERT( free_bufferid == Buffer::unused, NULL); b->id = next_input; ASSERT( b->sequence_number == Buffer::unused, NULL); @@ -243,10 +243,10 @@ void clear_global_state() { class PipelineTest { // There are 3 non-thread-bound filter types: serial_in_order and serial_out_of_order, parallel - static const tbb::filter::mode non_tb_filters_table[3]; // = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order, tbb::filter::parallel}; - // There are 2 thread-bound filter types: serial_in_order and serial_out_of_order - static const tbb::filter::mode tb_filters_table[2]; // = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order }; - + static const tbb::filter::mode non_tb_filters_table[3]; // = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order, tbb::filter::parallel}; + // There are 2 thread-bound filter types: serial_in_order and serial_out_of_order + static const tbb::filter::mode tb_filters_table[2]; // = { tbb::filter::serial_in_order, tbb::filter::serial_out_of_order }; + static const unsigned number_of_non_tb_filter_types = sizeof(non_tb_filters_table)/sizeof(non_tb_filters_table[0]); static const unsigned number_of_tb_filter_types = sizeof(tb_filters_table)/sizeof(tb_filters_table[0]); static const unsigned number_of_filter_types = number_of_non_tb_filter_types + number_of_tb_filter_types; @@ -282,11 +282,11 @@ const tbb::filter::mode PipelineTest::non_tb_filters_table[3] = { tbb::filter::serial_in_order, // 0 tbb::filter::serial_out_of_order, // 2 tbb::filter::parallel // 4 -}; +}; const tbb::filter::mode PipelineTest::tb_filters_table[2] = { tbb::filter::serial_in_order, // 1 tbb::filter::serial_out_of_order // 3 -}; +}; #include "harness_cpu.h" @@ -334,7 +334,7 @@ double PipelineTest::TestOneConfiguration(unsigned numeral, unsigned nthread, un ASSERT(number_of_tb_filters,NULL); clear_global_state(); // Account for clipping of parallelism. - if( parallelism_limit>nthread ) + if( parallelism_limit>nthread ) parallelism_limit = nthread; if( parallelism_limit>ntokens ) parallelism_limit = (unsigned)ntokens; @@ -360,7 +360,7 @@ double PipelineTest::TestOneConfiguration(unsigned numeral, unsigned nthread, un for( unsigned j=0; j1: - // one iteration for ntokens=1 and second for ntokens=max_tokens - // Iteration for ntokens=1 is required in each test case to check if pipeline run only on one thread - unsigned max_iteration = max_tokens > 1 ? 2 : 1; + // one iteration for ntokens=1 and second for ntokens=max_tokens + // Iteration for ntokens=1 is required in each test case to check if pipeline run only on one thread + unsigned max_iteration = max_tokens > 1 ? 2 : 1; tbb::internal::Token ntokens = 1; for( unsigned iteration = 0; iteration < max_iteration; iteration++) { - if( iteration > 0 ) + if( iteration > 0 ) ntokens = max_tokens; // Count maximum iterations number unsigned limit = 1; @@ -511,8 +511,8 @@ int TestMain () { // Test pipelines with 1 and maximal number of filters for( unsigned n=1; n<=MaxFilters; n*=MaxFilters ) { - // Thread-bound stages are serviced by user-created threads; those - // don't run the pipeline and don't service non-thread-bound stages + // Thread-bound stages are serviced by user-created threads; those + // don't run the pipeline and don't service non-thread-bound stages PipelineTest::TestTrivialPipeline(nthread,n); } diff --git a/src/test/test_priority_queue_node.cpp b/src/test/test_priority_queue_node.cpp index 640426e1713fd282aec61beaade440404ab2ca0d..2f01ffe3f0540e37996160bbe7fdbb74a9f226ba 100644 --- a/src/test/test_priority_queue_node.cpp +++ b/src/test/test_priority_queue_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -78,7 +78,7 @@ struct parallel_put_get : NoAssign { parallel_put_get( tbb::flow::priority_queue_node &q ) : my_q(q) {} void operator()(int tid) const { for ( int i = 0; i < N; i+=C ) { - int j_end = ( N < i + C ) ? N : i + C; + int j_end = ( N < i + C ) ? N : i + C; // dump about C values into the Q for ( int j = i; j < j_end; ++j ) { ASSERT( my_q.try_put( T (N*tid + j ) ) == true, NULL ); @@ -115,23 +115,23 @@ int test_reservation(int) { T v=bogus_value, w=bogus_value; ASSERT( q.try_reserve(v) == true, NULL ); - ASSERT( v == T(3), NULL ); + ASSERT( v == T(3), NULL ); ASSERT( q.try_release() == true, NULL ); v = bogus_value; g.wait_for_all(); ASSERT( q.try_reserve(v) == true, NULL ); - ASSERT( v == T(3), NULL ); + ASSERT( v == T(3), NULL ); ASSERT( q.try_consume() == true, NULL ); v = bogus_value; g.wait_for_all(); - + ASSERT( q.try_get(v) == true, NULL ); - ASSERT( v == T(2), NULL ); + ASSERT( v == T(2), NULL ); v = bogus_value; g.wait_for_all(); ASSERT( q.try_reserve(v) == true, NULL ); - ASSERT( v == T(1), NULL ); + ASSERT( v == T(1), NULL ); ASSERT( q.try_reserve(w) == false, NULL ); ASSERT( w == bogus_value, NULL ); ASSERT( q.try_get(w) == false, NULL ); @@ -140,7 +140,7 @@ int test_reservation(int) { v = bogus_value; g.wait_for_all(); ASSERT( q.try_reserve(v) == true, NULL ); - ASSERT( v == T(1), NULL ); + ASSERT( v == T(1), NULL ); ASSERT( q.try_consume() == true, NULL ); v = bogus_value; g.wait_for_all(); @@ -230,7 +230,7 @@ int test_parallel(int num_threads) { // Tests // // Predecessors cannot be registered -// Empty Q rejects item requests +// Empty Q rejects item requests // Single serial sender, items in FIFO order // Chained Qs ( 2 & 3 ), single sender, items at last Q in FIFO order // @@ -331,7 +331,7 @@ int test_serial() { return 0; } -int TestMain() { +int TestMain() { tbb::tick_count start = tbb::tick_count::now(), stop; for (int p = 2; p <= 4; ++p) { tbb::task_scheduler_init init(p); @@ -339,7 +339,7 @@ int TestMain() { test_reservation(p); test_reservation >(p); test_parallel(p); - } + } stop = tbb::tick_count::now(); REMARK("Priority_Queue_Node Time=%6.6f\n", (stop-start).seconds()); REMARK("Testing resets\n"); diff --git a/src/test/test_queue_node.cpp b/src/test/test_queue_node.cpp index f20450fbf4f5697b7af623799f6ec7938aca54f3..8aeaa32c5e7b6a4cfb017776cdcab919a904e305 100644 --- a/src/test/test_queue_node.cpp +++ b/src/test/test_queue_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -71,14 +71,14 @@ struct touches { int my_num_threads; touches( int num_threads ) : my_num_threads(num_threads) { - my_last_touch = new T* [my_num_threads]; - my_touches = new bool* [my_num_threads]; + my_last_touch = new T* [my_num_threads]; + my_touches = new bool* [my_num_threads]; for ( int p = 0; p < my_num_threads; ++p) { my_last_touch[p] = new T[my_num_threads]; - for ( int p2 = 0; p2 < my_num_threads; ++p2) + for ( int p2 = 0; p2 < my_num_threads; ++p2) my_last_touch[p][p2] = -1; - my_touches[p] = new bool[N*my_num_threads]; + my_touches[p] = new bool[N*my_num_threads]; for ( int n = 0; n < N*my_num_threads; ++n) my_touches[p][n] = false; } @@ -103,8 +103,8 @@ struct touches { printf("Error: value seen in wrong order by local thread\n"); return false; } - my_last_touch[tid][v_tid] = v; - my_touches[tid][v] = true; + my_last_touch[tid][v_tid] = v; + my_touches[tid][v] = true; return true; } @@ -112,7 +112,7 @@ struct touches { bool *all_touches = new bool[N*my_num_threads]; for ( int n = 0; n < N*my_num_threads; ++n) all_touches[n] = false; - + for ( int p = 0; p < my_num_threads; ++p) { for ( int n = 0; n < N*my_num_threads; ++n) { if ( my_touches[p][n] == true ) { @@ -161,7 +161,7 @@ struct parallel_put_get : NoAssign { void operator()(int tid) const { for ( int i = 0; i < N; i+=C ) { - int j_end = ( N < i + C ) ? N : i + C; + int j_end = ( N < i + C ) ? N : i + C; // dump about C values into the Q for ( int j = i; j < j_end; ++j ) { ASSERT( my_q.try_put( T (N*tid + j ) ) == true, NULL ); @@ -193,31 +193,31 @@ int test_reservation() { q.try_put(T(1)); q.try_put(T(2)); q.try_put(T(3)); - + T v; ASSERT( q.reserve_item(v) == true, NULL ); - ASSERT( v == T(1), NULL ); + ASSERT( v == T(1), NULL ); ASSERT( q.release_reservation() == true, NULL ); v = bogus_value; g.wait_for_all(); ASSERT( q.reserve_item(v) == true, NULL ); - ASSERT( v == T(1), NULL ); + ASSERT( v == T(1), NULL ); ASSERT( q.consume_reservation() == true, NULL ); v = bogus_value; g.wait_for_all(); - + ASSERT( q.try_get(v) == true, NULL ); - ASSERT( v == T(2), NULL ); + ASSERT( v == T(2), NULL ); v = bogus_value; g.wait_for_all(); - + ASSERT( q.reserve_item(v) == true, NULL ); - ASSERT( v == T(3), NULL ); + ASSERT( v == T(3), NULL ); ASSERT( q.release_reservation() == true, NULL ); v = bogus_value; g.wait_for_all(); ASSERT( q.reserve_item(v) == true, NULL ); - ASSERT( v == T(3), NULL ); + ASSERT( v == T(3), NULL ); ASSERT( q.consume_reservation() == true, NULL ); v = bogus_value; g.wait_for_all(); @@ -333,7 +333,7 @@ int test_parallel(int num_threads) { // Tests // // Predecessors cannot be registered -// Empty Q rejects item requests +// Empty Q rejects item requests // Single serial sender, items in FIFO order // Chained Qs ( 2 & 3 ), single sender, items at last Q in FIFO order // @@ -446,7 +446,7 @@ int test_serial() { return 0; } -int TestMain() { +int TestMain() { tbb::tick_count start = tbb::tick_count::now(), stop; for (int p = 2; p <= 4; ++p) { tbb::task_scheduler_init init(p); @@ -454,7 +454,7 @@ int TestMain() { test_serial >(); test_parallel(p); test_parallel >(p); - } + } stop = tbb::tick_count::now(); REMARK("Queue_Node Time=%6.6f\n", (stop-start).seconds()); REMARK("Testing resets\n"); diff --git a/src/test/test_range_based_for.h b/src/test/test_range_based_for.h index d668e0e176382c1e0108a33f62219a379e4e9ecf..136df546a454ed3951d60ca1a80c0f417f994eea 100644 --- a/src/test/test_range_based_for.h +++ b/src/test/test_range_based_for.h @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_reader_writer_lock.cpp b/src/test/test_reader_writer_lock.cpp index 3beb16e0362f854ff2d2315ab67827cb2b7f509e..8945d36b6500bcd84b92ae43ed44b857238fea1d 100644 --- a/src/test/test_reader_writer_lock.cpp +++ b/src/test/test_reader_writer_lock.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_runtime_loader.cpp b/src/test/test_runtime_loader.cpp index 1c862e56224e6ebfc35ee17f037d008e7ee6363b..127d3f0b161bed07f9e620cbacf832638e585de3 100644 --- a/src/test/test_runtime_loader.cpp +++ b/src/test/test_runtime_loader.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_rwm_upgrade_downgrade.cpp b/src/test/test_rwm_upgrade_downgrade.cpp index cde95d67605de51a2bc1afc63004135f72ca0383..bfd996015367acc9fe07e351d29dd1350b3e134a 100644 --- a/src/test/test_rwm_upgrade_downgrade.cpp +++ b/src/test/test_rwm_upgrade_downgrade.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -66,7 +66,7 @@ int TestMain () { for( int p=MinThread; p<=MaxThread; ++p ) { REMARK("Testing on %d threads", p); Count = 0; - NativeParallelFor( p, Hammer(QRW_mutex) ); + NativeParallelFor( p, Hammer(QRW_mutex) ); Count = 0; NativeParallelFor( p, Hammer(SRW_mutex) ); } diff --git a/src/test/test_semaphore.cpp b/src/test/test_semaphore.cpp index 0a57d392619712386ee0fd7eba5cfb4f0bc13323..c55bd582894baf27fdd4e4affe7342e5c08a997b 100644 --- a/src/test/test_semaphore.cpp +++ b/src/test/test_semaphore.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_sequencer_node.cpp b/src/test/test_sequencer_node.cpp index 692fedf7cef8c9959ffdadebc6972293f0294faf..ae1af088bf7a4dc8fab5d5e20eaf26d339759bb4 100644 --- a/src/test/test_sequencer_node.cpp +++ b/src/test/test_sequencer_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -73,11 +73,11 @@ struct touches { int my_num_threads; touches( int num_threads ) : my_num_threads(num_threads) { - my_last_touch = new T[my_num_threads]; - my_touches = new bool* [my_num_threads]; + my_last_touch = new T[my_num_threads]; + my_touches = new bool* [my_num_threads]; for ( int p = 0; p < my_num_threads; ++p) { my_last_touch[p] = T(-1); - my_touches[p] = new bool[N]; + my_touches[p] = new bool[N]; for ( int n = 0; n < N; ++n) my_touches[p][n] = false; } @@ -100,8 +100,8 @@ struct touches { printf("Error: value seen in wrong order by local thread\n"); return false; } - my_last_touch[tid] = v; - my_touches[tid][v] = true; + my_last_touch[tid] = v; + my_touches[tid][v] = true; return true; } @@ -109,7 +109,7 @@ struct touches { bool *all_touches = new bool[N]; for ( int n = 0; n < N; ++n) all_touches[n] = false; - + for ( int p = 0; p < my_num_threads; ++p) { for ( int n = 0; n < N; ++n) { if ( my_touches[p][n] == true ) { @@ -141,7 +141,7 @@ struct parallel_gets : NoAssign { void operator()(int tid) const { for (int j = tid; j < N; j+=my_num_threads) { T v; - spin_try_get( my_q, v ); + spin_try_get( my_q, v ); my_touches.check( tid, v ); } } @@ -154,10 +154,10 @@ struct parallel_put_get : NoAssign { tbb::flow::sequencer_node &my_s1; tbb::flow::sequencer_node &my_s2; int my_num_threads; - tbb::atomic< int > &my_counter; - touches &my_touches; + tbb::atomic< int > &my_counter; + touches &my_touches; - parallel_put_get( tbb::flow::sequencer_node &s1, tbb::flow::sequencer_node &s2, int num_threads, + parallel_put_get( tbb::flow::sequencer_node &s1, tbb::flow::sequencer_node &s2, int num_threads, tbb::atomic &counter, touches &t ) : my_s1(s1), my_s2(s2), my_num_threads(num_threads), my_counter(counter), my_touches(t) {} void operator()(int tid) const { @@ -172,7 +172,7 @@ struct parallel_put_get : NoAssign { for (int i = i_start; i < i_end; ++i) { T v; - spin_try_get( my_s2, v ); + spin_try_get( my_s2, v ); my_touches.check( tid, v ); } } @@ -180,7 +180,7 @@ struct parallel_put_get : NoAssign { }; -// +// // Tests // // multiple parallel senders, multiple receivers, properly sequenced (relative to receiver) at output @@ -244,7 +244,7 @@ int test_parallel(int num_threads) { } -// +// // Tests // // No predecessors can be registered @@ -388,13 +388,13 @@ int test_serial() { return 0; } -int TestMain() { +int TestMain() { tbb::tick_count start = tbb::tick_count::now(), stop; for (int p = 2; p <= 4; ++p) { tbb::task_scheduler_init init(p); test_serial(); test_parallel(p); - } + } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES test_buffer_extract >().run_tests(); #endif diff --git a/src/test/test_source_node.cpp b/src/test/test_source_node.cpp index c7c0291cae283079c7da9a4674d8b6af632c2fe4..dee8b44f4c345b912852e1a3b7fda008ddcb7e06 100644 --- a/src/test/test_source_node.cpp +++ b/src/test/test_source_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -34,13 +34,13 @@ class test_push_receiver : public tbb::flow::receiver { public: - test_push_receiver() { - for (int i = 0; i < N; ++i ) + test_push_receiver() { + for (int i = 0; i < N; ++i ) my_counters[i] = 0; } int get_count( int i ) { - int v = my_counters[i]; + int v = my_counters[i]; return v; } @@ -73,7 +73,7 @@ class source_body { tbb::atomic my_count; int *ninvocations; - + public: source_body() : ninvocations(NULL) { my_count = 0; } @@ -86,7 +86,7 @@ public: return true; else return false; - } + } }; @@ -97,15 +97,15 @@ class function_body { public: - function_body( tbb::atomic *counters ) : my_counters(counters) { - for (int i = 0; i < N; ++i ) + function_body( tbb::atomic *counters ) : my_counters(counters) { + for (int i = 0; i < N; ++i ) my_counters[i] = 0; } bool operator()( T v ) { ++my_counters[(int)v]; return true; - } + } }; @@ -119,7 +119,7 @@ void test_single_dest() { tbb::flow::make_edge( src, dest ); g.wait_for_all(); for (int i = 0; i < N; ++i ) { - ASSERT( dest.get_count(i) == 1, NULL ); + ASSERT( dest.get_count(i) == 1, NULL ); } // push only @@ -131,10 +131,10 @@ void test_single_dest() { g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); } - // push & pull + // push & pull tbb::flow::source_node src2(g, source_body() ); tbb::atomic counters2[N]; function_body b2( counters2 ); @@ -149,7 +149,7 @@ void test_single_dest() { g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters2[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); } // test copy constructor @@ -158,7 +158,7 @@ void test_single_dest() { ASSERT( src_copy.register_successor(dest_c), NULL ); g.wait_for_all(); for (int i = 0; i < N; ++i ) { - ASSERT( dest_c.get_count(i) == 1, NULL ); + ASSERT( dest_c.get_count(i) == 1, NULL ); } } @@ -176,7 +176,7 @@ void test_reset() { // check the array for each value. for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); counters3[i] = 0; } g.reset(tbb::flow::rf_reset_bodies); // <-- re-initializes the counts. @@ -185,7 +185,7 @@ void test_reset() { // check output queue again. Should be the same contents. for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); counters3[i] = 0; } g.reset(); // doesn't reset the source_node_body to initial state, but does spawn a task @@ -195,7 +195,7 @@ void test_reset() { // array should be all zero for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 0, NULL ); + ASSERT( v == 0, NULL ); } remove_edge(src3, dest3); @@ -205,7 +205,7 @@ void test_reset() { g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 0, NULL ); + ASSERT( v == 0, NULL ); } // run graph @@ -214,7 +214,7 @@ void test_reset() { // check output for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); counters3[i] = 0; } g.reset(tbb::flow::rf_reset_bodies); // <-- reinitializes the counts @@ -222,7 +222,7 @@ void test_reset() { g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 0, NULL ); + ASSERT( v == 0, NULL ); } // start it up @@ -230,7 +230,7 @@ void test_reset() { g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 1, NULL ); + ASSERT( v == 1, NULL ); counters3[i] = 0; } g.reset(); // doesn't reset the source_node_body to initial state, and doesn't @@ -240,14 +240,14 @@ void test_reset() { // array should be all zero for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 0, NULL ); + ASSERT( v == 0, NULL ); } src_inactive.activate(); // source_node_body is already in final state, so source_node will not forward a message. g.wait_for_all(); for (int i = 0; i < N; ++i ) { int v = counters3[i]; - ASSERT( v == 0, NULL ); + ASSERT( v == 0, NULL ); } } @@ -258,7 +258,7 @@ void test_extract() { tbb::flow::graph g; typedef tbb::flow::source_node snode_type; typedef snode_type::successor_list_type successor_list_type; - snode_type s0(g, source_body(counts), /*is_active*/false ); + snode_type s0(g, source_body(counts), /*is_active*/false ); tbb::flow::join_node< tbb::flow::tuple, tbb::flow::reserving > j0(g); tbb::flow::join_node< tbb::flow::tuple, tbb::flow::reserving > j1(g); tbb::flow::join_node< tbb::flow::tuple, tbb::flow::reserving > j2(g); @@ -397,7 +397,7 @@ void test_extract() { } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ -int TestMain() { +int TestMain() { if( MinThread<1 ) { REPORT("number of threads must be positive\n"); exit(1); diff --git a/src/test/test_split_node.cpp b/src/test/test_split_node.cpp index 7710f6d135343d9ebd9389e1b1931e285a93ba92..5f80d56f4a972e02f4080b617dacdd44ea19e3af 100644 --- a/src/test/test_split_node.cpp +++ b/src/test/test_split_node.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_static_assert.cpp b/src/test/test_static_assert.cpp index d659ebfc8ed8571db6083e7da5233081255d7bc6..0d2cccca51412890983ba62d5a9498e96316c851 100644 --- a/src/test/test_static_assert.cpp +++ b/src/test/test_static_assert.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_std_thread.cpp b/src/test/test_std_thread.cpp index 2ab410311e36a70ae04c08c4e9a84d1f32fbface..ea5d9f60f909d17230f3fcce02a74dac503db640 100644 --- a/src/test/test_std_thread.cpp +++ b/src/test/test_std_thread.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_tagged_msg.cpp b/src/test/test_tagged_msg.cpp index 2ea789e3397e31e915c0fca9329a022fef05e9ab..ebb607a256925e371e0f4ab5497a194aa700e67e 100644 --- a/src/test/test_tagged_msg.cpp +++ b/src/test/test_tagged_msg.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -134,7 +134,7 @@ void RunTests() { ASSERT(ref_i == 4, "assign to i did not affect ref_i"); ASSERT( z == 3, "Error retrieving value from i"); - + //updating and retrieving tags ASSERT(j.tag() == 2, "Error retrieving tag for j"); j.set_tag(10); @@ -144,7 +144,7 @@ void RunTests() { k.set_tag('b'); ASSERT(k.tag() == 'b', "Error updating char tag"); - tagged_msg_type double_tagged_msg(3, 8.0); + tagged_msg_type double_tagged_msg(3, 8.0); ASSERT(is_a(double_tagged_msg), "Wrong type for double_tagged_msg (== double)"); ASSERT(!is_a(double_tagged_msg), "Wrong type for double_tagged_msg (!= char)"); ASSERT(!is_a(double_tagged_msg), "Wrong type for double_tagged_msg (!= int)"); @@ -152,7 +152,7 @@ void RunTests() { ASSERT(is_a(copytype), "Wrong type for double_tagged_msg (== double)"); ASSERT(!is_a(copytype), "Wrong type for double_tagged_msg (!= char)"); ASSERT(!is_a(copytype), "Wrong type for double_tagged_msg (!= int)"); - tagged_msg_type default_tagged_msg; + tagged_msg_type default_tagged_msg; ASSERT(!(is_a(default_tagged_msg)), "wrong type for default ( != double)"); ASSERT(!(is_a(default_tagged_msg)), "wrong type for default ( != int)"); ASSERT(!(is_a(default_tagged_msg)), "wrong type for default ( != bool)"); diff --git a/src/test/test_task.cpp b/src/test/test_task.cpp index ddb380f6fb123d2eed449c1f8e258d237ec70890..026d5a88d83d3ee2e60c42303c2133d8cf86d039 100644 --- a/src/test/test_task.cpp +++ b/src/test/test_task.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_task_arena.cpp b/src/test/test_task_arena.cpp index 16ed312f41302757b10dd37d7b4230b44045b8d3..7e84df6a5ac42b6e7cad409cd40ac14545703c1b 100644 --- a/src/test/test_task_arena.cpp +++ b/src/test/test_task_arena.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -77,7 +77,7 @@ void InitializeAndTerminate( int maxthread ) { ASSERT(!arena.is_active(), "arena should not be active; it was terminated"); break; } - case 0: { + case 0: { tbb::task_arena arena( 1 ); ASSERT(!arena.is_active(), "arena should not be active until initialized"); arena.initialize( std::rand() % maxthread + 1 ); // change the parameters @@ -151,7 +151,7 @@ class ArenaObserver : public tbb::task_scheduler_observer { old_id.local() = 0; } public: - ArenaObserver(tbb::task_arena &a, int maxConcurrency, int numReservedSlots, int id) + ArenaObserver(tbb::task_arena &a, int maxConcurrency, int numReservedSlots, int id) : tbb::task_scheduler_observer(a) , myId(id) , myMaxConcurrency(maxConcurrency) @@ -557,6 +557,126 @@ void TestArenaConcurrency( int p ) { } } +//--------------------------------------------------// +// Test creation/initialization of a task_arena that references an existing arena (aka attach). +// This part of the test uses the knowledge of task_arena internals + +typedef tbb::interface7::internal::task_arena_base task_arena_internals; + +struct TaskArenaValidator : public task_arena_internals { + int my_slot_at_construction; + TaskArenaValidator( const task_arena_internals& other ) + : task_arena_internals(other) /*copies the internal state of other*/ { + my_slot_at_construction = tbb::task_arena::current_thread_index(); + } + // Inspect the internal state + int concurrency() { return my_max_concurrency; } + int reserved_for_masters() { return (int)my_master_slots; } + + // This method should be called in task_arena::execute() for a captured arena + // by the same thread that created the validator. + void operator()() { + ASSERT( tbb::task_arena::current_thread_index()==my_slot_at_construction, + "Current thread index has changed since the validator construction" ); + } +}; + +void ValidateAttachedArena( tbb::task_arena& arena, bool expect_activated, + int expect_concurrency, int expect_masters ) { + ASSERT( arena.is_active()==expect_activated, "Unexpected activation state" ); + if( arena.is_active() ) { + TaskArenaValidator validator( arena ); + ASSERT( validator.concurrency()==expect_concurrency, "Unexpected arena size" ); + ASSERT( validator.reserved_for_masters()==expect_masters, "Unexpected # of reserved slots" ); + if( tbb::task_arena::current_thread_index()!=-1 ) { + // for threads already in arena, check that the thread index remains the same + arena.execute( validator ); + } + // Ideally, there should be a check for having the same internal arena object, + // but that object is not easily accessible for implicit arenas. + } +} + +struct TestAttachBody : NoAssign { + mutable int my_idx; // safe to modify and use within the NativeParallelFor functor + const int maxthread; + TestAttachBody( int max_thr ) : maxthread(max_thr) {} + + // The functor body for NativeParallelFor + void operator()( int idx ) const { + my_idx = idx; + int default_threads = tbb::task_scheduler_init::default_num_threads(); + + tbb::task_arena arena = tbb::task_arena( tbb::task_arena::attach() ); + ValidateAttachedArena( arena, false, -1, -1 ); // Nothing yet to attach to + + { // attach to an arena created via task_scheduler_init + tbb::task_scheduler_init init( idx+1 ); + + tbb::task_arena arena2 = tbb::task_arena( tbb::task_arena::attach() ); + ValidateAttachedArena( arena2, true, idx+1, 1 ); + + arena.initialize( tbb::task_arena::attach() ); + } + ValidateAttachedArena( arena, true, idx+1, 1 ); + + arena.terminate(); + ValidateAttachedArena( arena, false, -1, -1 ); + + // Check default behavior when attach cannot succeed + switch (idx%2) { + case 0: + { // construct as attached, then initialize + tbb::task_arena arena2 = tbb::task_arena( tbb::task_arena::attach() ); + ValidateAttachedArena( arena2, false, -1, -1 ); + arena2.initialize(); // must be initialized with default parameters + ValidateAttachedArena( arena2, true, default_threads, 1 ); + } + break; + case 1: + { // default-construct, then initialize as attached + tbb::task_arena arena2; + ValidateAttachedArena( arena2, false, -1, -1 ); + arena2.initialize( tbb::task_arena::attach() ); // must use default parameters + ValidateAttachedArena( arena2, true, default_threads, 1 ); + } + break; + } // switch + + // attach to an auto-initialized arena + tbb::empty_task& tsk = *new (tbb::task::allocate_root()) tbb::empty_task; + tbb::task::spawn_root_and_wait(tsk); + tbb::task_arena arena2 = tbb::task_arena( tbb::task_arena::attach() ); + ValidateAttachedArena( arena2, true, default_threads, 1 ); + + // attach to another task_arena + arena.initialize( maxthread, min(maxthread,idx) ); + arena.execute( *this ); + } + + // The functor body for task_arena::execute above + void operator()() const { + tbb::task_arena arena2 = tbb::task_arena( tbb::task_arena::attach() ); + ValidateAttachedArena( arena2, true, maxthread, min(maxthread,my_idx) ); + } + + // The functor body for tbb::parallel_for + void operator()( const Range& r ) const { + for( int i = r.begin(); iset_ref_count(1); for( int n = MinThread; n <= MaxThread; ++n ) { REMARK("%d masters, %d requested workers\r", n, p-1); @@ -305,10 +305,10 @@ void TestDequeueByMaster () { REMARK("Testing task dequeuing by master\n"); tbb::task_scheduler_init init(1); Harness::SpinBarrier bar(2); - tbb::task &r = *new ( tbb::task::allocate_root() ) tbb::empty_task; + tbb::task &r = *new ( tbb::task::allocate_root() ) tbb::empty_task; r.set_ref_count(3); - tbb::task::enqueue( *new(r.allocate_child()) BlockingTask(bar) ); - tbb::task::enqueue( *new(r.allocate_child()) BlockingTask(bar) ); + tbb::task::enqueue( *new(r.allocate_child()) BlockingTask(bar) ); + tbb::task::enqueue( *new(r.allocate_child()) BlockingTask(bar) ); r.wait_for_all(); tbb::task::destroy(r); } @@ -325,7 +325,7 @@ struct Functor : NoAssign { Harness::SpinBarrier &my_barrier; Functor(Harness::SpinBarrier &a_barrier) : my_barrier(a_barrier) { } - void operator()(const tbb::blocked_range& r) const + void operator()(const tbb::blocked_range& r) const { ASSERT(r.size() == 1, NULL); // allocate_root() uses current context of parallel_for which is destroyed when it finishes. @@ -356,13 +356,26 @@ void TestWakeups() tbb::parallel_for(tbb::blocked_range(0, NUM_TASKS), Functor(barrier)); // auto } +#define TBB_PREVIEW_GLOBAL_CONTROL 1 +#include "tbb/global_control.h" + int TestMain () { + TestWakeups(); // 1st because requests oversubscription - TestCascadedEnqueue(); // needs oversubscription - TestDequeueByMaster(); // no oversubscription needed - for( int p=MinThread; p<=MaxThread; ++p ) { - TestEnqueue(p); - TestSharedRoot(p); + for (int i=0; i<2; i++) { + tbb::global_control *c = i? + new tbb::global_control(tbb::global_control::max_allowed_parallelism, 1) : NULL; + if (i) // decrease workload for max_allowed_parallelism == 1 + NumRepeats = 10; + + TestCascadedEnqueue(); // needs oversubscription + if (!c) + TestDequeueByMaster(); // no oversubscription needed + for( int p=MinThread; p<=MaxThread; ++p ) { + TestEnqueue(p); + TestSharedRoot(p); + } + delete c; } return Harness::Done; } diff --git a/src/test/test_task_group.cpp b/src/test/test_task_group.cpp index 02d1c4cb73460235d74babca29ffbd686234e9c1..a2c48436e20ea59a70155097098d9fb2df50f016 100644 --- a/src/test/test_task_group.cpp +++ b/src/test/test_task_group.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_task_leaks.cpp b/src/test/test_task_leaks.cpp index 5e757361946d1015163aa12fc6d6f76ec379a677..9e4e3fe16663b64537f8f9a2f74ac3b18dd8f861 100644 --- a/src/test/test_task_leaks.cpp +++ b/src/test/test_task_leaks.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -18,15 +18,15 @@ reasons why the executable file might be covered by the GNU General Public License. */ -/* The test uses "single produces multiple consumers" (SPMC )pattern to check - if the memory of the tasks stolen by consumer threads is returned to the +/* The test uses "single produces multiple consumers" (SPMC )pattern to check + if the memory of the tasks stolen by consumer threads is returned to the producer thread and is reused. The test consists of a series of iterations, which execute a task tree. the test fails is the memory consumption is not stabilized during some number of iterations. - After the memory consumption stabilized the memory state is perturbed by + After the memory consumption stabilized the memory state is perturbed by switching producer thread, and the check is repeated. */ @@ -227,7 +227,7 @@ void TestTaskReclamation() { int last_error_iteration = 0, producer_switch_iteration = 0, producer_switches = 0; - bool switchProducer = false, + bool switchProducer = false, checkProducer = false; for( int i=0; i < MaxIterations; ++i ) { // These iterations check for excessive memory use and unreasonable task count diff --git a/src/test/test_task_priority.cpp b/src/test/test_task_priority.cpp index 5fbda7032628459843bd369819f24bc6cfd86f20..5da2a3c4a45cd8105b9943d7c3718faab275731e 100644 --- a/src/test/test_task_priority.cpp +++ b/src/test/test_task_priority.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -46,7 +46,7 @@ int BaseDepth = 0; const int DesiredNumThreads = 12; const int NumTests = 8; -const int TestRepeats = 4; +int TestSwitchBetweenMastersRepeats = 4; int g_NumMasters = 0; volatile intptr_t *g_LeavesExecuted = NULL; @@ -151,7 +151,7 @@ protected: parent_node->set_ref_count(NumLeafTasks + 1); --m_depth; for ( int i = 0; i < NumLeafTasks; ++i ) { - task *t = m_depth ? (task*) new(parent_node->allocate_child()) NodeType(m_tid, m_depth, m_opts, m_root) + task *t = m_depth ? (task*) new(parent_node->allocate_child()) NodeType(m_tid, m_depth, m_opts, m_root) : (task*) new(parent_node->allocate_child()) LeafTask(m_tid, m_opts); task::spawn(*t); } @@ -300,7 +300,7 @@ void TestPrioritySwitchBetweenTwoMasters () { } REMARK( "Stress tests: %s / %s \n", Low == tbb::priority_low ? "Low" : "Normal", High == tbb::priority_normal ? "Normal" : "High" ); PrepareGlobals( 2 ); - for ( int i = 0; i < TestRepeats; ++i ) { + for ( int i = 0; i < TestSwitchBetweenMastersRepeats; ++i ) { for ( BaseDepth = MinBaseDepth; BaseDepth <= MaxBaseDepth; ++BaseDepth ) { RunPrioritySwitchBetweenTwoMasters( 0, NoPriorities ); RunPrioritySwitchBetweenTwoMasters( 1, TestPreemption ); @@ -315,7 +315,7 @@ void TestPrioritySwitchBetweenTwoMasters () { } } #if __TBB_TASK_PRIORITY - const int NumRuns = TestRepeats * (MaxBaseDepth - MinBaseDepth + 1); + const int NumRuns = TestSwitchBetweenMastersRepeats * (MaxBaseDepth - MinBaseDepth + 1); for ( int i = 0; i < NumTests; ++i ) { if ( g_TestFailures[i] ) REMARK( "Test %d: %d failures in %d runs\n", i, g_TestFailures[i], NumRuns ); @@ -370,6 +370,9 @@ void EmulateWork( int ) { class PeriodicActivitiesBody { public: + static const int parallelIters[2]; + static const int seqIters[2]; + static int mode; void operator() ( int id ) const { tbb::task_group_context ctx; #if __TBB_TASK_PRIORITY @@ -377,13 +380,17 @@ public: #else /* !__TBB_TASK_PRIORITY */ (void)id; #endif /* !__TBB_TASK_PRIORITY */ - for ( int i = 0; i < 5; ++i ) { + for ( int i = 0; i < seqIters[mode]; ++i ) { tbb::task_scheduler_init init; - tbb::parallel_for( 1, 10000, &EmulateWork, ctx ); + tbb::parallel_for( 1, parallelIters[mode], &EmulateWork, ctx ); } } }; +const int PeriodicActivitiesBody::parallelIters[] = {10000, 100}; +const int PeriodicActivitiesBody::seqIters[] = {5, 2}; +int PeriodicActivitiesBody::mode = 0; + void TestPeriodicConcurrentActivities () { REMARK( "TestPeriodicConcurrentActivities: %s / %s \n", Low == tbb::priority_low ? "Low" : "Normal", High == tbb::priority_normal ? "Normal" : "High" ); NativeParallelFor ( 2, PeriodicActivitiesBody() ); @@ -562,14 +569,8 @@ void TestTGContextOnNewThread() { #include "harness_concurrency.h" #endif -int TestMain () { -#if !__TBB_TEST_SKIP_AFFINITY - Harness::LimitNumberOfThreads( DesiredNumThreads ); -#endif -#if !__TBB_TASK_PRIORITY - REMARK( "Priorities disabled: Running as just yet another task scheduler test\n" ); -#else - test_propagation::TestSetPriority(); // TODO: move down when bug 1996 is fixed +int RunTests () { +#if __TBB_TASK_PRIORITY TestEnqueueOrder(); #endif /* __TBB_TASK_PRIORITY */ TestPriorityAssertions(); @@ -592,9 +593,30 @@ int TestMain () { PreemptionActivatorId = 1; TestPrioritySwitchBetweenTwoMasters(); regression::TestTGContextOnNewThread(); + return Harness::Done; } +#define TBB_PREVIEW_GLOBAL_CONTROL 1 +#include "tbb/global_control.h" + +int TestMain () { +#if !__TBB_TEST_SKIP_AFFINITY + Harness::LimitNumberOfThreads( DesiredNumThreads ); +#endif +#if !__TBB_TASK_PRIORITY + REMARK( "Priorities disabled: Running as just yet another task scheduler test\n" ); +#else + test_propagation::TestSetPriority(); // TODO: move down when bug 1996 is fixed +#endif /* __TBB_TASK_PRIORITY */ + + RunTests(); + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + PeriodicActivitiesBody::mode = 1; + TestSwitchBetweenMastersRepeats = 1; + return RunTests(); +} + #else /* !__TBB_TASK_GROUP_CONTEXT */ int TestMain () { diff --git a/src/test/test_task_scheduler_init.cpp b/src/test/test_task_scheduler_init.cpp index 574624c1fb9b7f2dcea71311530f88336d73ff95..3a1c612a6a81dd9f06b89aaee6d2f8a5f333e38d 100644 --- a/src/test/test_task_scheduler_init.cpp +++ b/src/test/test_task_scheduler_init.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -135,14 +135,14 @@ public: } }; -/** The test will fail in particular if task_scheduler_init mistakenly hooks up +/** The test will fail in particular if task_scheduler_init mistakenly hooks up auto-initialization mechanism. **/ void AssertExplicitInitIsNotSupplanted () { int hardwareConcurrency = tbb::task_scheduler_init::default_num_threads(); tbb::task_scheduler_init init(1); Harness::ConcurrencyTracker::Reset(); tbb::parallel_for( Range(0, hardwareConcurrency * 2, 1), ConcurrencyTrackingBody(), tbb::simple_partitioner() ); - ASSERT( Harness::ConcurrencyTracker::PeakParallelism() == 1, + ASSERT( Harness::ConcurrencyTracker::PeakParallelism() == 1, "Manual init provided more threads than requested. See also the comment at the beginning of main()." ); } diff --git a/src/test/test_task_scheduler_observer.cpp b/src/test/test_task_scheduler_observer.cpp index 93ceec28e01672d2b00b3107a3e26e0f9c1c2749..89783f7f3b4dc2253ccb30472d55f5e2f68eec3b 100644 --- a/src/test/test_task_scheduler_observer.cpp +++ b/src/test/test_task_scheduler_observer.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -357,7 +357,7 @@ void TestObserver( int M, int T, uintptr_t testMode ) { theTestMode = testMode; NativeParallelFor( M, TestBody(T) ); // When T (number of threads in arena, i.e. master + workers) is less than P - // (hardware concurrency), more than T-1 workers can visit the same arena. This + // (hardware concurrency), more than T-1 workers can visit the same arena. This // is possible in case of imbalance or when other arenas are activated/deactivated // concurrently). ASSERT( !theNumObservers, "Unexpected alive observer(s)" ); diff --git a/src/test/test_task_steal_limit.cpp b/src/test/test_task_steal_limit.cpp index d41fb4a53dd6edd354878f74cd802461cd171512..b7ea23b0d1bf4a0450fd87deec0c5e8dfc9d0679 100644 --- a/src/test/test_task_steal_limit.cpp +++ b/src/test/test_task_steal_limit.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -34,7 +34,7 @@ using tbb::task; // that the stealing limiting heuristic used by the task scheduler does not // switch off stealing when a large amount of TLS data is reserved. #if _MSC_VER -__declspec(thread) +__declspec(thread) #elif __linux__ || ((__MINGW32__ || __MINGW64__) && __TBB_GCC_VERSION >= 40500) __thread #endif diff --git a/src/test/test_tbb_condition_variable.cpp b/src/test/test_tbb_condition_variable.cpp index 696a2e08017b9751d94f4b9d4a3d52856d684bd9..8f4386370de0896395aeecb5448218eb5c185fad 100644 --- a/src/test/test_tbb_condition_variable.cpp +++ b/src/test/test_tbb_condition_variable.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_tbb_fork.cpp b/src/test/test_tbb_fork.cpp index 4fb193411672856e97e1f07f5d6a545df9dacb76..bf7792452051cf5c2b8f18b4a6c60cd92cef0b6d 100644 --- a/src/test/test_tbb_fork.cpp +++ b/src/test/test_tbb_fork.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_tbb_header.cpp b/src/test/test_tbb_header.cpp index 68aa61c61d74a2062fdccc513ede2debf02ef902..6a3f4d0c0ff516df15955bbc4ddc1075809fed7a 100644 --- a/src/test/test_tbb_header.cpp +++ b/src/test/test_tbb_header.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -97,7 +97,7 @@ struct Body3 { template void TestExceptionClassExports ( const E& exc, tbb::internal::exception_id eid ) { - // The assertion here serves to shut up warnings about "eid not used". + // The assertion here serves to shut up warnings about "eid not used". ASSERT( eid ); TestTypeDefinitionPresence2(concurrent_lru_cache ); + #if __TBB_FLOW_GRAPH_CPP11_FEATURES + TestTypeDefinitionPresence2( flow::composite_node, tbb::flow::tuple > ); + #endif TestTypeDefinitionPresence( static_partitioner ); } #endif #if __TBB_TEST_SECONDARY -/* This mode is used to produce a secondary object file that is linked with +/* This mode is used to produce a secondary object file that is linked with the main one in order to detect "multiple definition" linker error. */ void secondary() diff --git a/src/test/test_tbb_thread.cpp b/src/test/test_tbb_thread.cpp index b7f82d4fdc1bd5c1ecdf12b5453fde3175aa3dbf..6885656597bfa4e0b579926bc3b6be1acf346c23 100644 --- a/src/test/test_tbb_thread.cpp +++ b/src/test/test_tbb_thread.cpp @@ -1,5 +1,5 @@ /* - 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 diff --git a/src/test/test_tbb_version.cpp b/src/test/test_tbb_version.cpp index 1258df579f244a3d27e2392fce3b5cff4e4b45b0..bfe01167b7abb846bf1f37f434c128f2775b1ecd 100644 --- a/src/test/test_tbb_version.cpp +++ b/src/test/test_tbb_version.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -197,7 +197,7 @@ int main(int argc, char *argv[] ) { REPORT( "Error (step 1):Internal test error (stderr open)\n" ); exit( 1 ); } - + while( !feof( stream_err ) ) { if( fgets( psBuffer, psBuffer_len, stream_err ) != NULL ){ if (strstr( psBuffer, "TBBmalloc: " )) { @@ -236,19 +236,21 @@ int main(int argc, char *argv[] ) { } -// Fill dictionary with version strings for platforms +// Fill dictionary with version strings for platforms void initialize_strings_vector(std::vector * vector) { vector->push_back(string_pair("TBB: VERSION\t\t4.4", required)); // check TBB_VERSION - vector->push_back(string_pair("TBB: INTERFACE VERSION\t9002", required)); // check TBB_INTERFACE_VERSION + vector->push_back(string_pair("TBB: INTERFACE VERSION\t9003", required)); // check TBB_INTERFACE_VERSION vector->push_back(string_pair("TBB: BUILD_DATE", required)); vector->push_back(string_pair("TBB: BUILD_HOST", required)); vector->push_back(string_pair("TBB: BUILD_OS", required)); #if _WIN32||_WIN64 #if !__MINGW32__ vector->push_back(string_pair("TBB: BUILD_CL", required)); -#endif vector->push_back(string_pair("TBB: BUILD_COMPILER", required)); +#else + vector->push_back(string_pair("TBB: BUILD_GCC", required)); +#endif #elif __APPLE__ vector->push_back(string_pair("TBB: BUILD_KERNEL", required)); vector->push_back(string_pair("TBB: BUILD_CLANG", required)); @@ -266,10 +268,11 @@ void initialize_strings_vector(std::vector * vector) vector->push_back(string_pair("TBB: BUILD_COMPILER", optional)); //if( getenv("COMPILER_VERSION") ) #if __ANDROID__ vector->push_back(string_pair("TBB: BUILD_NDK", optional)); + vector->push_back(string_pair("TBB: BUILD_LD", optional)); #else vector->push_back(string_pair("TBB: BUILD_LIBC", required)); -#endif // !__ANDROID__ vector->push_back(string_pair("TBB: BUILD_LD", required)); +#endif // !__ANDROID__ #endif // OS vector->push_back(string_pair("TBB: BUILD_TARGET", required)); vector->push_back(string_pair("TBB: BUILD_COMMAND", required)); diff --git a/src/test/test_thread.h b/src/test/test_thread.h index b6b3a5807b0773a810806406b17d1ce462d413d2..31618f01fa817ba2eff8403ac73ed236fdb7a874 100644 --- a/src/test/test_thread.h +++ b/src/test/test_thread.h @@ -1,5 +1,5 @@ /* - 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 @@ -54,9 +54,9 @@ class Base { protected: Base() : copy_throws(100) {++BaseCount;} Base( const Base& c ) : copy_throws(c.copy_throws) { - if( --copy_throws<=0 ) + if( --copy_throws<=0 ) __TBB_THROW(0); - ++BaseCount; + ++BaseCount; } ~Base() {--BaseCount;} }; @@ -84,7 +84,7 @@ public: void operator()(){ real_ids[0] = THIS_THREAD::get_id(); init_barrier.wait(); - + sum.fetch_and_add(1); } void operator()(int num){ @@ -93,7 +93,7 @@ public: sum.fetch_and_add(num); } - void operator()(int num, Data<0> dx) { + void operator()(int num, Data<0> dx) { real_ids[num] = THIS_THREAD::get_id(); const double WAIT = .1; @@ -138,7 +138,7 @@ void CheckRelations( const THREAD::id ids[], int n, bool duplicates_allowed ) { for( int k=0; k x(0); @@ -167,7 +167,7 @@ void CheckExceptionSafety() { if( i&4 ) y.copy_throws = d; bool exception_caught = false; for( int j=0; j<3; ++j ) { - try { + try { switch(j) { case 0: {THREAD t(f); t.join();} break; case 1: {THREAD t(f,x); t.join();} break; @@ -175,7 +175,7 @@ void CheckExceptionSafety() { } } catch(...) { exception_caught = true; - } + } ASSERT( !exception_caught||(i&((1<<(j+1))-1))!=0, NULL ); } } @@ -199,13 +199,13 @@ void RunTests() { Data<0> d100(100), d1(1), d0(0); const THREAD::id id_zero; THREAD::id id0, uniq_ids[THRDS]; - + THREAD thrs[THRDS]; THREAD thr; THREAD thr0(t); THREAD thr1(t, 2); THREAD thr2(t, 1, d100); - + ASSERT( thr0.get_id() != id_zero, NULL ); id0 = thr0.get_id(); tbb::move(thrs[0], thr0); @@ -270,11 +270,11 @@ void RunTests() { ASSERT( BaseCount==4, "object leak detected" ); #if TBB_USE_EXCEPTIONS - CheckExceptionSafety(); + CheckExceptionSafety(); #endif // Note: all tests involving BaseCount should be put before the tests - // involing detached threads, because there is no way of knowing when + // involing detached threads, because there is no way of knowing when // a detached thread destroys its arguments. THREAD thr_detach_0(t, d0); diff --git a/src/test/test_tick_count.cpp b/src/test/test_tick_count.cpp index e9c96aaed746af1415e6f6b071e9b925d0a7ce56..68f08681d9767da8bbc6ddab55a601d3da4e0baa 100644 --- a/src/test/test_tick_count.cpp +++ b/src/test/test_tick_count.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -20,6 +20,12 @@ #include "tbb/tick_count.h" #include "harness_assert.h" +#if __TBB_WIN8UI_SUPPORT + const char* GetEnv( const char* ) { return NULL; } +#else + #include + const char* GetEnv( const char* str ) { return std::getenv( str ); } +#endif //! Assert that two times in seconds are very close. void AssertNear( double x, double y ) { @@ -183,10 +189,14 @@ void TestResolution() { #include "tbb/tbb_thread.h" int TestMain () { + // Increased tolerance for Virtual Machines + double tolerance_multiplier = GetEnv( "VIRTUAL_MACHINE" ) ? 50. : 1.; + REMARK( "tolerance_multiplier = %g \n", tolerance_multiplier ); + tbb::tick_count t0 = tbb::tick_count::now(); - TestSimpleDelay(/*ntrial=*/1000000,/*duration=*/0, /*tolerance=*/2E-6); + TestSimpleDelay(/*ntrial=*/1000000,/*duration=*/0, /*tolerance=*/2E-6 * tolerance_multiplier); tbb::tick_count t1 = tbb::tick_count::now(); - TestSimpleDelay(/*ntrial=*/1000, /*duration=*/0.001,/*tolerance=*/5E-6); + TestSimpleDelay(/*ntrial=*/1000, /*duration=*/0.001,/*tolerance=*/5E-6 * tolerance_multiplier); tbb::tick_count t2 = tbb::tick_count::now(); TestArithmetic(t0,t1,t2); diff --git a/src/test/test_tuple.cpp b/src/test/test_tuple.cpp index 8097d331c81e43627e5d51b6a9b0e9016b6bacf0..3b54b3f66a1267cbb7fb9ea6fb82e69e875556ea 100644 --- a/src/test/test_tuple.cpp +++ b/src/test/test_tuple.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -68,7 +68,7 @@ void RunOneComparisonTest() { ASSERT(!(t_tuple((T1)2,(T2)1,(T3)1) == u_tuple((U1)1,(U2)1,(U3)1)),NULL); ASSERT(!(t_tuple((T1)1,(T2)2,(T3)1) == u_tuple((U1)1,(U2)1,(U3)1)),NULL); ASSERT(!(t_tuple((T1)1,(T2)1,(T3)2) == u_tuple((U1)1,(U2)1,(U3)1)),NULL); - + ASSERT(!(t_tuple((T1)1,(T2)1,(T3)1) < u_tuple((U1)1,(U2)1,(U3)1)),NULL); ASSERT(!(t_tuple((T1)1,(T2)1,(T3)1) > u_tuple((U1)1,(U2)1,(U3)1)),NULL); ASSERT(!(t_tuple((T1)1,(T2)1,(T3)1) != u_tuple((U1)1,(U2)1,(U3)1)),NULL); @@ -177,7 +177,7 @@ void RunTests() { ASSERT(!(mixed_tuple_left(1,2.f,1,1) == mixed_tuple_right(1.f,1,1,1)),NULL); ASSERT(!(mixed_tuple_left(1,1.f,2,1) == mixed_tuple_right(1.f,1,1,1)),NULL); ASSERT(!(mixed_tuple_left(1,1.f,1,2) == mixed_tuple_right(1.f,1,1,1)),NULL); - + ASSERT(!(mixed_tuple_left(1,1.f,1,1) < mixed_tuple_right(1.f,1,1,1)),NULL); ASSERT(!(mixed_tuple_left(1,1.f,1,1) > mixed_tuple_right(1.f,1,1,1)),NULL); ASSERT(!(mixed_tuple_left(1,1.f,1,1) != mixed_tuple_right(1.f,1,1,1)),NULL); diff --git a/src/test/test_write_once_node.cpp b/src/test/test_write_once_node.cpp index cb21a6026ca782ec405e1398d3b9d815000dbee1..8af17d24257e5227a9b9347d0541cc6f44814880 100644 --- a/src/test/test_write_once_node.cpp +++ b/src/test/test_write_once_node.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -23,7 +23,7 @@ #include "tbb/task_scheduler_init.h" #define N 300 -#define T 4 +#define T 4 #define M 4 template< typename R > @@ -48,7 +48,7 @@ void simple_read_write_tests() { for (int i = 0; i < M; ++i) { tbb::flow::make_edge( n, r[i] ); } - + if ( t%2 ) { for (int i = 0; i < M; ++i) { size_t c = r[i].my_count; @@ -60,7 +60,7 @@ void simple_read_write_tests() { R v1(static_cast(i)); bool result = n.try_put( v1 ); - if ( !(t%2) && i == 1 ) + if ( !(t%2) && i == 1 ) ASSERT( result == true, NULL ); else ASSERT( result == false, NULL ); @@ -70,9 +70,9 @@ void simple_read_write_tests() { for (int j = 0; j < N; ++j ) { R v2(0); ASSERT( n.try_get( v2 ), NULL ); - if ( t%2 ) + if ( t%2 ) ASSERT( R(N+1) == v2, NULL ); - else + else ASSERT( R(1) == v2, NULL ); } } @@ -152,7 +152,7 @@ void parallel_read_write_tests() { } } -int TestMain() { +int TestMain() { simple_read_write_tests(); simple_read_write_tests(); for( int p=MinThread; p<=MaxThread; ++p ) { diff --git a/src/test/test_yield.cpp b/src/test/test_yield.cpp index 4c95c90ef905ead02b922df664b9c69ad5177187..0156f3d7abe257b371b3a239d75397bd777b04d0 100644 --- a/src/test/test_yield.cpp +++ b/src/test/test_yield.cpp @@ -1,5 +1,5 @@ /* - 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 @@ -38,7 +38,7 @@ struct RoundRobin: NoAssign { void operator()( long k ) const { tbb::tick_count t0 = tbb::tick_count::now(); for( long i=0; i<10000; ++i ) { - // Wait for previous thread to notify us + // Wait for previous thread to notify us for( int j=0; CyclicCounter!=k && !Quit; ++j ) { __TBB_Yield(); if( j%100==0 ) { @@ -50,7 +50,7 @@ struct RoundRobin: NoAssign { } } } - // Notify next thread that it can run + // Notify next thread that it can run CyclicCounter = (k+1)%number_of_threads; } }