Expressing Parallelism in C++ with Threading Building Blocks

Print Friendly, PDF & Email

Parallelism helps applications make the best use of processors on single or multiple devices. However, parallelism implementation itself can prove a challenging task. In this video, Mike Voss, principal engineer with the Core and Visual Computing Group at Intel discusses the benefits of Intel® Threading Building Blocks (Intel® TBB), a C++ library, and how it can simplify the work of adding parallelism without the need to probe into threading details.

TBB is available as part of Intel System Studio and Intel Parallel Studio XE. It is also available through the free tools program and the open-source website

Optimized for use with Intel processors, the TBB library supports multiple platforms including Linux*, Android*, Windows*, and MacOS*. This flexibility combined with easy-to-use APIs and high performance, helps developers bring their applications to market faster. In use cases today, TBB helps accelerate many complex applications in astrophysics, animation rendering, and artificial intelligence.

In addition to TBB’s ability to make application parallelism easier, it is also composable. In other words, developers can widely express parallelism in applications, and the TBB library will execute it efficiently – even in cases where parallelism nests within parallelism. As a result, TBB works well in scenarios involving multiple parallel applications running simultaneously, while avoiding over-subscription of system resources.

Getting the greatest level of performance from applications often involves multiple levels of parallelism. At the highest level, a task or message passing layer facilitates communications between applications. In the middle, a fork-join layer captures parallel loops using threading. Below that, a SIMD layer benefits from vectorization. TBB enables high-level execution interfaces that make the most of each layer through a single library and thread pool.

Download this free library and others today >