Skip to content

Commit

Permalink
Committing TBB 2019 Update 8 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbbdev committed Jun 6, 2019
1 parent 4233fef commit 4bdba61
Show file tree
Hide file tree
Showing 81 changed files with 336 additions and 281 deletions.
32 changes: 23 additions & 9 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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.

------------------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
4 changes: 2 additions & 2 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions cmake/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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;
Expand All @@ -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``,
Expand Down
4 changes: 2 additions & 2 deletions examples/common/gui/winvideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions examples/common/gui/xcode/tbbExample/OpenGLView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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();
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions examples/graph/fgbzip2/fgbzip2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}

Expand Down
20 changes: 10 additions & 10 deletions examples/graph/stereo/lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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").
*/

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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]),
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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!
*/
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)";
Expand Down
Loading

0 comments on commit 4bdba61

Please sign in to comment.