Skip to content
Permalink
Browse files

Committing TBB 2019 Update 8 source code

  • Loading branch information...
tbbdev committed Jun 6, 2019
1 parent 4233fef commit 4bdba61bafc6ba2d636f31564f1de5702d365cf7
Showing with 336 additions and 281 deletions.
  1. +23 −9 CHANGES
  2. +2 −2 README.md
  3. +1 −1 build/Makefile.test
  4. +2 −2 build/build.py
  5. +2 −2 build/common.inc
  6. +10 −10 cmake/README.rst
  7. +2 −2 examples/common/gui/winvideo.h
  8. +5 −5 examples/common/gui/xcode/tbbExample/OpenGLView.m
  9. +3 −3 examples/graph/fgbzip2/fgbzip2.cpp
  10. +10 −10 examples/graph/stereo/lodepng.cpp
  11. +4 −4 examples/graph/stereo/lodepng.h
  12. +1 −1 examples/graph/stereo/stereo.cpp
  13. +1 −1 examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.cpp
  14. +1 −1 examples/parallel_for/tachyon/msvs/win8ui/Package.appxmanifest
  15. +1 −1 examples/parallel_for/tachyon/src/apitrigeom.cpp
  16. +1 −1 examples/parallel_for/tachyon/src/apitrigeom.h
  17. +2 −2 examples/parallel_for/tachyon/src/grid.cpp
  18. +70 −70 examples/parallel_for/tachyon/src/objbound.cpp
  19. +1 −1 examples/parallel_for/tachyon/src/types.h
  20. +1 −1 examples/parallel_reduce/primes/primes.cpp
  21. +18 −18 examples/test_all/fibonacci/Fibonacci.cpp
  22. +2 −2 include/tbb/cache_aligned_allocator.h
  23. +1 −1 include/tbb/internal/_concurrent_queue_impl.h
  24. +1 −1 include/tbb/internal/_flow_graph_item_buffer_impl.h
  25. +1 −1 include/tbb/internal/_tbb_windef.h
  26. +1 −1 include/tbb/task.h
  27. +1 −1 include/tbb/task_arena.h
  28. +1 −1 include/tbb/tbb_stddef.h
  29. +1 −1 include/tbb/tbb_thread.h
  30. +1 −1 python/tbb/pool.py
  31. +1 −1 src/perf/run_statistics.sh
  32. +1 −1 src/perf/time_lru_cache_throughput.cpp
  33. +1 −1 src/rml/server/rml_server.cpp
  34. +1 −1 src/rml/test/test_server.h
  35. +11 −11 src/tbb/arena.cpp
  36. +1 −1 src/tbb/condition_variable.cpp
  37. +1 −1 src/tbb/mac32-tbb-export.lst
  38. +1 −1 src/tbb/mac64-tbb-export.lst
  39. +1 −1 src/tbb/market.cpp
  40. +1 −1 src/tbb/scheduler.cpp
  41. +1 −1 src/tbb/task_stream_extended.h
  42. +2 −2 src/tbb/tools_api/ittnotify.h
  43. +1 −1 src/tbb/tools_api/ittnotify_static.c
  44. +2 −2 src/tbbmalloc/MapMemory.h
  45. +5 −5 src/tbbmalloc/backend.cpp
  46. +2 −2 src/tbbmalloc/backend.h
  47. +2 −2 src/tbbmalloc/frontend.cpp
  48. +1 −1 src/tbbmalloc/large_objects.h
  49. +2 −2 src/tbbmalloc/proxy.cpp
  50. +1 −1 src/tbbmalloc/tbb_function_replacement.cpp
  51. +1 −1 src/tbbmalloc/tbbmalloc_internal.h
  52. +2 −2 src/test/harness_allocator.h
  53. +5 −5 src/test/harness_graph.h
  54. +1 −1 src/test/harness_test_cases_framework.h
  55. +2 −2 src/test/test_allocator_STL.h
  56. +6 −6 src/test/test_async_msg.cpp
  57. +6 −6 src/test/test_async_node.cpp
  58. +2 −2 src/test/test_buffer_node.cpp
  59. +2 −2 src/test/test_concurrent_associative_common.h
  60. +1 −1 src/test/test_concurrent_hash_map.cpp
  61. +2 −2 src/test/test_concurrent_priority_queue.cpp
  62. +4 −4 src/test/test_flow_graph_priorities.cpp
  63. +3 −3 src/test/test_function_node.cpp
  64. +2 −2 src/test/test_initializer_list.h
  65. +1 −1 src/test/test_join_node_msg_key_matching.cpp
  66. +1 −1 src/test/test_limiter_node.cpp
  67. +2 −2 src/test/test_malloc_compliance.cpp
  68. +1 −1 src/test/test_malloc_overload.cpp
  69. +9 −9 src/test/test_malloc_whitebox.cpp
  70. +2 −2 src/test/test_multifunction_node.cpp
  71. +2 −2 src/test/test_opencl_node.cpp
  72. +2 −2 src/test/test_parallel_do.cpp
  73. +27 −11 src/test/test_parallel_for.cpp
  74. +1 −1 src/test/test_parallel_for_each.cpp
  75. +2 −2 src/test/test_priority_queue_node.cpp
  76. +2 −2 src/test/test_queue_node.cpp
  77. +1 −2 src/test/test_semaphore.cpp
  78. +30 −4 src/test/test_task_arena.cpp
  79. +1 −1 src/test/test_task_scheduler_init.cpp
  80. +1 −1 src/test/test_tbb_version.cpp
  81. +2 −2 src/test/test_tick_count.cpp
32 CHANGES
@@ -2,6 +2,20 @@
The list of most significant changes made over time in
Intel(R) Threading Building Blocks (Intel(R) TBB).

Intel TBB 2019 Update 8
TBB_INTERFACE_VERSION == 11008

Changes (w.r.t. Intel TBB 2019 Update 7):

Bugs fixed:

- Fixed a bug in TBB 2019 Update 7 that could lead to incorrect memory
reallocation on Linux (https://github.com/intel/tbb/issues/148).
- Fixed enqueuing tbb::task into tbb::task_arena not to fail on threads
with no task scheduler initialized
(https://github.com/intel/tbb/issues/116).

------------------------------------------------------------------------
Intel TBB 2019 Update 7
TBB_INTERFACE_VERSION == 11007

@@ -20,7 +34,7 @@ Changes (w.r.t. Intel TBB 2019 Update 6):
- Added packaging of CMake configuration files to TBB packages built
using build/build.py script
(https://github.com/intel/tbb/issues/141).

Changes affecting backward compatibility:

- Removed the number_of_decrement_predecessors parameter from the
@@ -34,7 +48,7 @@ Preview Features:

Open-source contributions integrated:

- Fixed makefiles to properly obtain the GCC version for GCC 7
- Fixed makefiles to properly obtain the GCC version for GCC 7
and later (https://github.com/intel/tbb/pull/147) by Timmmm.

------------------------------------------------------------------------
@@ -93,7 +107,7 @@ Bugs fixed:
it follows a thread-bound filter.
- Fixed a performance regression observed when multiple parallel
algorithms start simultaneously.

------------------------------------------------------------------------
Intel TBB 2019 Update 4
TBB_INTERFACE_VERSION == 11004
@@ -102,7 +116,7 @@ Changes (w.r.t. Intel TBB 2019 Update 3):

- global_control class is now a fully supported feature.
- Added deduction guides for tbb containers: concurrent_hash_map,
concurrent_unordered_map, concurrent_unordered_set.
concurrent_unordered_map, concurrent_unordered_set.
- Added tbb::scalable_memory_resource function returning
std::pmr::memory_resource interface to the TBB memory allocator.
- Added tbb::cache_aligned_resource class that implements
@@ -119,7 +133,7 @@ Changes (w.r.t. Intel TBB 2019 Update 3):

Bugs fixed:

- Fixed compilation for tbb::concurrent_vector when used with
- Fixed compilation for tbb::concurrent_vector when used with
std::pmr::polymorphic_allocator.

Open-source contributions integrated:
@@ -582,7 +596,7 @@ Changes (w.r.t. Intel TBB 4.4 Update 5):
- Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU
libstdc++ when it cannot be properly recognized, e.g. when used
with Clang on Linux* OS. Inspired by a contribution from David A.
- Added graph/stereo example to demostrate tbb::flow::async_msg.
- Added graph/stereo example to demonstrate tbb::flow::async_msg.
- Removed a few cases of excessive user data copying in the flow graph.
- Reworked split_node to eliminate unnecessary overheads.
- Added support for C++11 move semantics to the argument of
@@ -1293,7 +1307,7 @@ Changes (w.r.t. Intel TBB 4.1 Update 4):
were added on OS X*.
- For OS X* exact exception propagation is supported with Clang;
it requires use of libc++ and corresponding Intel TBB binaries.
- Support for C++11 initializer lists in constructor and assigment
- Support for C++11 initializer lists in constructor and assignment
has been added to concurrent_hash_map, concurrent_unordered_set,
concurrent_unordered_multiset, concurrent_unordered_map,
concurrent_unordered_multimap.
@@ -1889,7 +1903,7 @@ Changes (w.r.t. 20100310 open-source release):
- Reworked enumerable_thread_specific to use a custom implementation of
hash map that is more efficient for ETS usage models.
- Added example for class task_group; see examples/task_group/sudoku.
- Removed two examples, as they were long outdated and superceded:
- Removed two examples, as they were long outdated and superseded:
pipeline/text_filter (use pipeline/square);
parallel_while/parallel_preorder (use parallel_do/parallel_preorder).
- PDF documentation updated.
@@ -2107,7 +2121,7 @@ Changes (w.r.t. Intel TBB 2.1 U3 commercial-aligned release):

- Added tests for aligned memory allocations and malloc replacement.
- Several improvements for better bundling with Intel(R) C++ Compiler.
- A few other small changes in code and documentaion.
- A few other small changes in code and documentation.

Bugs fixed:

@@ -1,5 +1,5 @@
# Threading Building Blocks 2019 Update 7
[![Stable release](https://img.shields.io/badge/version-2019_U7-green.svg)](https://github.com/01org/tbb/releases/tag/2019_U7)
# Threading Building Blocks 2019 Update 8
[![Stable release](https://img.shields.io/badge/version-2019_U8-green.svg)](https://github.com/01org/tbb/releases/tag/2019_U8)
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)

Threading Building Blocks (TBB) lets you easily write parallel C++ programs that take
@@ -111,7 +111,7 @@ TEST_BIGOBJ = test_opencl_node.$(TEST_EXT) \
$(TEST_BIGOBJ): override CXXFLAGS += $(BIGOBJ_KEY)
endif

# TODO: remove repetition of .$(TEST_EXT) in the list bellow
# TODO: remove repetition of .$(TEST_EXT) in the list below
# The main list of TBB tests
TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
test_global_control.$(TEST_EXT) \
@@ -49,7 +49,7 @@
parser.add_argument('--copy-tool', default=None, help='Use this command for copying ($ tool file dest-dir)')
parser.add_argument('--build-args', default="", help='specify extra build args')
parser.add_argument('--build-prefix', default='local', help='build dir prefix')
parser.add_argument('--cmake-dir', help='directory to install CMake configuraion files. Default: <prefix>/lib/cmake/tbb')
parser.add_argument('--cmake-dir', help='directory to install CMake configuration files. Default: <prefix>/lib/cmake/tbb')
if is_win:
parser.add_argument('--msbuild', default=False, action='store_true', help='Use msbuild')
parser.add_argument('--vs', default="2012", help='select VS version for build')
@@ -79,7 +79,7 @@ def custom_cp(src, dst):
cmake_dir = jp(args.prefix, "lib", "cmake", "tbb") if args.cmake_dir is None else args.cmake_dir

if is_win:
os.environ["OS"] = "Windows_NT" # make sure TBB will interpret it corretly
os.environ["OS"] = "Windows_NT" # make sure TBB will interpret it correctly
libext = '.dll'
libpref = ''
dll_dir = bin_dir
@@ -156,8 +156,8 @@ ifndef BUILDING_PHASE
.DELETE_ON_ERROR: # Make will delete target if error occurred when building it.
# MAKEOVERRIDES contains the command line variable definitions. Reseting it to
# empty allows propogating all exported overridden variables to nested makes.
# MAKEOVERRIDES contains the command line variable definitions. Resetting it to
# empty allows propagating all exported overridden variables to nested makes.
# NOTEs:
# 1. All variable set in command line are propagated to nested makes.
# 2. All variables declared with the "export" keyword are propagated to
@@ -212,7 +212,7 @@ Variables set during TBB configuration:
TBBInstallConfig
^^^^^^^^^^^^^^^^

Module for generation and installation of TBB CMake configuration files (TBBConfig.cmake and TBBConfigVersion.cmake files) on Linux and macOS.
Module for generation and installation of TBB CMake configuration files (TBBConfig.cmake and TBBConfigVersion.cmake files) on Linux, macOS and Windows.

Provides the following functions:

@@ -238,7 +238,7 @@ The use case is applicable for package maintainers who create own TBB packages a
Parameter Description
=========================================== ===========================================================
``INSTALL_DIR <directory>`` Directory to install CMake configuration files
``SYSTEM_NAME Linux|Darwin`` OS name to generate config files for
``SYSTEM_NAME Linux|Darwin|Windows`` OS name to generate config files for
``TBB_VERSION_FILE <version_file>`` Path to ``tbb_stddef.h`` to parse version from and
write it to TBBConfigVersion.cmake
``TBB_VERSION <major>.<minor>.<interface>`` Directly specified TBB version;
@@ -264,15 +264,15 @@ The use case is applicable for package maintainers who create own TBB packages a

The use case is applicable for users who have installed TBB, but do not have (or have incorrect) CMake configuration files for this TBB.

============================ ==============================================
==================================== ==============================================
Parameter Description
============================ ==============================================
``INSTALL_DIR <directory>`` Directory to install CMake configuration files
``SYSTEM_NAME Linux|Darwin`` OS name to generate config files for
``LIB_PATH <lib_path>`` Path to installed TBB binaries (.lib files on Windows)
``BIN_PATH <bin_path>`` Path to installed TBB DLLs (applicable for Windows only)
``INC_PATH <inc_path>`` Path to installed TBB headers
============================ ==============================================
==================================== ==============================================
``INSTALL_DIR <directory>`` Directory to install CMake configuration files
``SYSTEM_NAME Linux|Darwin|Windows`` OS name to generate config files for
``LIB_PATH <lib_path>`` Path to installed TBB binaries (.lib files on Windows)
``BIN_PATH <bin_path>`` Path to installed TBB DLLs (applicable for Windows only)
``INC_PATH <inc_path>`` Path to installed TBB headers
==================================== ==============================================

``LIB_PATH`` and ``INC_PATH`` will be converted to relative paths based on ``INSTALL_DIR``.
By default TBB version will be parsed from ``<inc_path>/tbb/tbb_stddef.h``,
@@ -23,7 +23,7 @@
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
// Check that the target Windows version has all API calls requried.
// Check that the target Windows version has all API calls required.
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#endif
@@ -41,7 +41,7 @@
#pragma comment(lib, "gdi32.lib")
#pragma comment(lib, "user32.lib")

// maximum mumber of lines the output console should have
// maximum number of lines the output console should have
static const WORD MAX_CONSOLE_LINES = 500;
const COLORREF RGBKEY = RGB(8, 8, 16); // at least 8 for 16-bit palette
HWND g_hAppWnd; // The program's window handle
@@ -25,7 +25,7 @@
void on_mouse_func(int x, int y, int k);
void on_key_func(int x);

bool initilized = false;
bool initialized = false;

#if TARGET_OS_IPHONE

@@ -38,15 +38,15 @@ @implementation OpenGLView

- (void)drawRect:(CGRect)start
{
if (initilized == false) {
if (initialized == 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;
initialized = true;
}

CGColorSpaceRef colourSpace = CGColorSpaceCreateDeviceRGB();
@@ -89,10 +89,10 @@ @implementation OpenGLView

- (void) drawRect:(NSRect)start
{
if (initilized == false) {
if (initialized == false) {
NSLog(@"INITIALIZE");
timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES];
initilized = true;
initialized = true;
}
glWindowPos2i(0, (int)self.visibleRect.size.height);
glPixelZoom( (float)self.visibleRect.size.width /(float)g_sizex,
@@ -275,7 +275,7 @@ class AsyncMsgActivity {
m_readQueue.pop(readWork);

// Reading thread waits for buffers to be received
// (the graph reuses limitted number of buffers)
// (the graph reuses limited number of buffers)
// and reads the file while there is something to read
while (m_io.hasDataToRead()) {
readWork.bufferMsg.seqId = m_io.chunksRead();
@@ -471,10 +471,10 @@ int main(int argc, char* argv[]) {
if (verbose) std::cout << "Running flow graph based compression algorithm." << std::endl;
fgCompression(io, blockSizeIn100KB);
} else if (asyncType == "async_node") {
if (verbose) std::cout << "Running flow graph based compression algorithm with async_node based asynchronious IO operations." << std::endl;
if (verbose) std::cout << "Running flow graph based compression algorithm with async_node based asynchronous IO operations." << std::endl;
fgCompressionAsyncNode(io, blockSizeIn100KB);
} else if (asyncType == "async_msg") {
if (verbose) std::cout << "Running flow graph based compression algorithm with async_msg based asynchronious IO operations. Using limited memory: " << memoryLimitIn1MB << "MB." << std::endl;
if (verbose) std::cout << "Running flow graph based compression algorithm with async_msg based asynchronous IO operations. Using limited memory: " << memoryLimitIn1MB << "MB." << std::endl;
fgCompressionAsyncMsg(io, blockSizeIn100KB, memoryLimitIn1MB);
}

@@ -1734,7 +1734,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
another huffman tree is used for the dist values ("d"). These two trees are
stored using their code lengths, and to compress even more these code lengths
are also run-length encoded and huffman compressed. This gives a huffman tree
of code lengths "cl". The code lenghts used to describe this third tree are
of code lengths "cl". The code lengths used to describe this third tree are
the code length code lengths ("clcl").
*/

@@ -1746,7 +1746,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
uivector frequencies_ll; /*frequency of lit,len codes*/
uivector frequencies_d; /*frequency of dist codes*/
uivector frequencies_cl; /*frequency of code length codes*/
uivector bitlen_lld; /*lit,len,dist code lenghts (int bits), literally (without repeat codes).*/
uivector bitlen_lld; /*lit,len,dist code lengths (int bits), literally (without repeat codes).*/
uivector bitlen_lld_e; /*bitlen_lld encoded with repeat codes (this is a rudemtary run length compression)*/
/*bitlen_cl is the code length code lengths ("clcl"). The bit lengths of codes to represent tree_cl
(these are written as is in the file, it would be crazy to compress these using yet another huffman
@@ -1887,7 +1887,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
if(!uivector_resize(&bitlen_cl, tree_cl.numcodes)) ERROR_BREAK(83 /*alloc fail*/);
for(i = 0; i != tree_cl.numcodes; ++i)
{
/*lenghts of code length tree is in the order as specified by deflate*/
/*lengths of code length tree is in the order as specified by deflate*/
bitlen_cl.data[i] = HuffmanTree_getLength(&tree_cl, CLCL_ORDER[i]);
}
while(bitlen_cl.data[bitlen_cl.size - 1] == 0 && bitlen_cl.size > 4)
@@ -1903,7 +1903,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
After the BFINAL and BTYPE, the dynamic block consists out of the following:
- 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN
- (HCLEN+4)*3 bits code lengths of code length alphabet
- HLIT + 257 code lenghts of lit/length alphabet (encoded using the code length
- HLIT + 257 code lengths of lit/length alphabet (encoded using the code length
alphabet, + possible repetition codes 16, 17, 18)
- HDIST + 1 code lengths of distance alphabet (encoded using the code length
alphabet, + possible repetition codes 16, 17, 18)
@@ -1926,10 +1926,10 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
addBitsToStream(bp, out, HDIST, 5);
addBitsToStream(bp, out, HCLEN, 4);

/*write the code lenghts of the code length alphabet*/
/*write the code lengths of the code length alphabet*/
for(i = 0; i != HCLEN + 4; ++i) addBitsToStream(bp, out, bitlen_cl.data[i], 3);

/*write the lenghts of the lit/len AND the dist alphabet*/
/*write the lengths of the lit/len AND the dist alphabet*/
for(i = 0; i != bitlen_lld_e.size; ++i)
{
addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_cl, bitlen_lld_e.data[i]),
@@ -3821,7 +3821,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
#endif /* #ifdef LODEPNG_COMPILE_ENCODER */

/*
Paeth predicter, used by PNG filter type 4
Paeth predictor, used by PNG filter type 4
The parameters are of type short, but should come from unsigned chars, the shorts
are only needed to make the paeth calculation correct.
*/
@@ -4161,7 +4161,7 @@ static unsigned postProcessScanlines(unsigned char* out, unsigned char* in,
/*
This function converts the filtered-padded-interlaced data into pure 2D image buffer with the PNG's colortype.
Steps:
*) if no Adam7: 1) unfilter 2) remove padding bits (= posible extra bits per scanline if bpp < 8)
*) if no Adam7: 1) unfilter 2) remove padding bits (= possible extra bits per scanline if bpp < 8)
*) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace
NOTE: the in buffer will be overwritten with intermediate data!
*/
@@ -5509,7 +5509,7 @@ static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const
{
/*
This function converts the pure 2D image with the PNG's colortype, into filtered-padded-interlaced data. Steps:
*) if no Adam7: 1) add padding bits (= posible extra bits per scanline if bpp < 8) 2) filter
*) if no Adam7: 1) add padding bits (= possible extra bits per scanline if bpp < 8) 2) filter
*) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter
*/
unsigned bpp = lodepng_get_bpp(&info_png->color);
@@ -5949,7 +5949,7 @@ const char* lodepng_error_text(unsigned code)
case 54: return "repeat symbol in tree while there was no value symbol yet";
/*jumped past tree while generating huffman tree, this could be when the
tree will have more leaves than symbols after generating it out of the
given lenghts. They call this an oversubscribed dynamic bit lengths tree in zlib.*/
given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/
case 55: return "jumped past tree while generating huffman tree";
case 56: return "given output image colortype or bitdepth not supported for color conversion";
case 57: return "invalid CRC encountered (checking CRC can be disabled)";

0 comments on commit 4bdba61

Please sign in to comment.
You can’t perform that action at this time.