Threading Building Blocks
   HOME

TheInfoList



OR:

oneAPI Threading Building Blocks (oneTBB; formerly Threading Building Blocks or TBB), is a
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
template Template may refer to: Tools * Die (manufacturing), used to cut or shape material * Mold, in a molding process * Stencil, a pattern or overlay used in graphic arts (drawing, painting, etc.) and sewing to replicate letters, shapes or designs Co ...
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
developed by
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
for
parallel programming Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different for ...
on
multi-core processor A multi-core processor is a microprocessor on a single integrated circuit with two or more separate processing units, called cores, each of which reads and executes program instructions. The instructions are ordinary CPU instructions (such a ...
s. Using TBB, a computation is broken down into tasks that can run in parallel. The library manages and schedules threads to execute these tasks.


Overview

A oneTBB program creates, synchronizes, and destroys graphs of dependent tasks according to ''algorithms'', i.e. high-level parallel programming paradigms (a.k.a. Algorithmic Skeletons). Tasks are then executed respecting graph dependencies. This approach groups TBB in a family of techniques for parallel programming aiming to decouple the programming from the particulars of the underlying machine. oneTBB implements
work stealing In parallel computing Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There ...
to balance a parallel workload across available processing cores in order to increase core utilization and therefore scaling. Initially, the workload is evenly divided among the available processor cores. If one core completes its work while other cores still have a significant amount of work in their queue, oneTBB reassigns some of the work from one of the busy cores to the idle core. This dynamic capability decouples the programmer from the machine, allowing applications written using the library to scale to utilize the available processing cores with no changes to the source code or the executable program file. In a 2008 assessment of the work stealing implementation in TBB, researchers from
Princeton University Princeton University is a private university, private research university in Princeton, New Jersey. Founded in 1746 in Elizabeth, New Jersey, Elizabeth as the College of New Jersey, Princeton is the List of Colonial Colleges, fourth-oldest ins ...
found that it was suboptimal for large numbers of processors cores, causing up to 47% of computing time spent in scheduling overhead when running certain benchmarks on a 32-core system. oneTBB, like the
STL STL may refer to: Communications * Standard telegraph level *Studio/transmitter link International law *Special Tribunal for Lebanon The Special Tribunal for Lebanon (STL), also referred to as the Lebanon Tribunal or the Hariri Tribunal, is a ...
(and the part of the C++ standard library based on it), uses templates extensively. This has the advantage of low-overhead polymorphism, since templates are a compile-time construct which modern C++
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
s can largely optimize away. oneTBB is available commercially as a binary distribution with support,https://software.intel.com/en-us/intel-tbb Intel Threading Building Blocks Commercial Version Homepage and as
open-source software Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Op ...
in both source and binary forms. oneTBB does not provide guarantees of
determinism Determinism is a philosophical view, where all events are determined completely by previously existing causes. Deterministic theories throughout the history of philosophy have developed from diverse and sometimes overlapping motives and consi ...
or freedom from
data race A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of ...
s.


Library contents

oneTBB is a collection of components for parallel programming: * Basic algorithms: parallel_for, parallel_reduce, parallel_scan * Advanced algorithms: parallel_pipeline, parallel_sort *
Container A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping. Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
s: concurrent_queue, concurrent_priority_queue, concurrent_vector, concurrent_hash_map * Memory allocation: scalable_malloc, scalable_free, scalable_realloc, scalable_calloc, scalable_allocator, cache_aligned_allocator *
Mutual exclusion In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurrent ...
: mutex, spin_mutex, queuing_mutex, spin_rw_mutex, queuing_rw_mutex, recursive_mutex * Timing: portable fine grained global time stamp * Task scheduler: direct access to control the creation and activation of tasks


Systems supported

The hardware, operating system, and software prerequisites for oneTBB.


Supported Hardware

* Intel Celeron processor family * Intel Core processor family * Intel Xeon processor family * Intel Xeon Phi processor family * Intel Atom processor family * Non-Intel processors compatible with the processors above


Supported Operating Systems

Systems with Microsoft Windows operating systems: * Microsoft Windows 10 * Microsoft Windows Server 2016 * Microsoft Windows Server 2019 Systems with Linux* operating systems: * Clear Linux * Amazon Linux 2 * CentOS 8 * Debian 10 * Fedora 34 * Red Hat Enterprise Linux 7, 8 * SuSE Linux Enterprise Server 15 * Ubuntu 18.04 LTS, 20.04, 21.04 Systems with macOS operating systems: * macOS 10.15, 11.x Systems with Android operating systems: * Android 9


Supported Compilers

* Intel oneAPI DPC++/C++ Compiler * Intel C++ Compiler 19.0 and 19.1 version * Microsoft Visual C++ 14.2 (Microsoft Visual Studio 2019, Windows OS only) * GNU Compilers (gcc) 4.8.5 - 11.1.1 * GNU C Library (glibc) version 2.17 - 2.33 * Clang 6.0.0-12.0.0


See also


Intel oneAPI Base Toolkit
* Intel
Integrated Performance Primitives Intel Integrated Performance Primitives (Intel IPP) is a multi-threaded software library of functions for multimedia and data processing applications, produced by Intel. The library supports Intel and compatible processors and is available for Li ...
(IPP) * Intel oneAPI
Data Analytics Library oneAPI Data Analytics Library (oneDAL; formerly Intel Data Analytics Acceleration Library or Intel DAAL), is a library of optimized algorithmic building blocks for data analysis stages most commonly associated with solving Big Data problems. T ...
(oneDAL) * Intel oneAPI
Math Kernel Library Intel oneAPI Math Kernel Library (Intel oneMKL; formerly Intel Math Kernel Library or Intel MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, ...
(oneMKL) *
Intel Advisor Intel Advisor (also known as "Advisor XE", "Vectorization Advisor" or "Threading Advisor") is a design assistance and analysis tool for SIMD vectorization, threading, memory use, and GPU offload optimization. The tool supports C, C++, Data Parall ...
*
Intel Inspector Intel Inspector (previously known as Intel Thread Checker) is a memory and thread checking and debugging tool to increase the reliability, security, and accuracy of C/C++ and Fortran applications. * Reliability: Find deadlocks and memory errors th ...
* Intel VTune Profiler *
Intel Concurrent Collections Concurrent Collections (known as CnC) is a programming model for software frameworks to expose parallelism in applications. The Concurrent Collections conception originated from tagged stream processing development with HP TStreams. TStreams Aro ...
(CnC) *
Algorithmic skeleton In computing, algorithmic skeletons, or parallelism patterns, are a high-level parallel programming model for parallel and distributed computing. Algorithmic skeletons take advantage of common programming patterns to hide the complexity of parall ...
*
Parallel computing Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different fo ...
* List of C++ multi-threading libraries * List of C++ template libraries *
Parallel Patterns Library The Parallel Patterns Library is a Microsoft library designed for use by native C++ developers that provides features for multicore programming. It was first bundled with Visual Studio 2010. It resembles the C++ Standard Library in style and works ...
*
Grand Central Dispatch Grand Central Dispatch (GCD or libdispatch), is a technology developed by Apple Inc. to optimize application support for systems with multi-core (computing), multi-core processors and other symmetric multiprocessing systems. It is an implement ...
(GCD)


Notes


References

* * * * *


External links


oneTBB Industry Specification
* * at Intel {{Parallel Computing Concurrent programming libraries Application programming interfaces C++ programming language family Generic programming Threads (computing) C++ libraries Intel software