Skip to main content
  • Book
  • Open Access
  • © 2019

Pro TBB

C++ Parallel Programming with Threading Building Blocks

Apress
  • An open access modern guide to Threading Building Blocks, written by leading engineers and keynote presenters on parallel computing
  • Designed for C++ programmers at all levels of parallel programming experience
  • Understand key concepts in concurrency and how to use TBB to leverage the power of parallel systems

Buy it now

Buying options

Softcover Book USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

Table of contents (20 chapters)

  1. Front Matter

    Pages i-lxvi
  2. Part 1

    1. Front Matter

      Pages 1-1
    2. Jumping Right In: “Hello, TBB!”

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 3-31Open Access
    3. Generic Parallel Algorithms

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 33-78Open Access
    4. Flow Graphs

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 79-107Open Access
    5. TBB and the Parallel Algorithms of the C++ Standard Template Library

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 109-136Open Access
    6. Synchronization : Why and How to Avoid It

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 137-178Open Access
    7. Data Structures for Concurrency

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 179-206Open Access
    8. Scalable Memory Allocation

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 207-231Open Access
    9. Mapping Parallel Patterns to TBB

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 233-248Open Access
  3. Part 2

    1. Front Matter

      Pages 249-249
    2. The Pillars of Composability

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 251-276Open Access
    3. Using Tasks to Create Your Own Algorithms

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 277-311Open Access
    4. Controlling the Number of Threads Used for Execution

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 313-336Open Access
    5. Using Work Isolation for Correctness and Performance

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 337-356Open Access
    6. Creating Thread-to-Core and Task-to-Thread Affinity

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 357-371Open Access
    7. Using Task Priorities

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 373-385Open Access
    8. Cancellation and Exception Handling

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 387-410Open Access
    9. Tuning TBB Algorithms: Granularity, Locality, Parallelism, and Determinism

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 411-449Open Access
    10. Flow Graphs: Beyond the Basics

      • Michael Voss, Rafael Asenjo, James Reinders
      Pages 451-511Open Access

About this book

This open access book is a modern guide for all C++ programmers to learn Threading Building Blocks (TBB). Written by TBB and parallel programming experts, this book reflects their collective decades of experience in developing and teaching parallel programming with TBB, offering their insights in an approachable manner. Throughout the book the authors present numerous examples and best practices to help you become an effective TBB programmer and leverage the power of parallel systems. 

Pro TBB starts with the basics, explaining parallel algorithms and C++'s built-in standard template library for parallelism. You'll learn the key concepts of managing memory, working with data structures and how to handle typical issues with synchronization. Later chapters apply these ideas to complex systems to explain performance tradeoffs, mapping common parallel patterns, controlling threads and overhead, and extending TBB to program heterogeneous systems or system-on-chips.  

What You'll Learn

  • Use Threading Building Blocks to produce code that is portable, simple, scalable, and more understandable
  • Review best practices for parallelizing computationally intensive tasks in your applications
  • Integrate TBB with other threading packages
  • Create scalable, high performance data-parallel programs
  • Work with generic programming to write efficient algorithms

Who This Book Is For

C++ programmers learning to run applications on multicore systems, as well as C or C++ programmers without much experience with templates. No previous experience with parallel programming or multicore processors is required.


Reviews

“Pro TBB … is an invaluable book … . The book provides comprehensive coverage of a full-fledged model of parallelism. Besides the TBB constructs, various mechanisms that address issues of exception handling, task partitioning, concurrent data structures, mutual exclusion, granularity, and task-thread affinity are elaborated and evaluated in great detail. The first part of the book is a light introduction to TBB, and the second part provides an in-depth presentation with examples and a performance analysis of TBB constructs.” (B. Belkhouche, Computing Reviews, July 29, 2021)

  

Authors and Affiliations

  • Austin, USA

    Michael Voss

  • Málaga, Spain

    Rafael Asenjo

  • Portland, USA

    James Reinders

About the authors

Michael Voss is a Principal Engineer in the Intel Architecture, Graphics and Software Group at Intel. He has been a member of the TBB development team since before the 1.0 release in 2006 and was the initial architect of the TBB flow graph API.  He is also one of the lead developers of Flow Graph Analyzer, a graphical tool for analyzing data flow applications targeted at both homogeneous and heterogeneous platforms. He has co-authored over 40 published papers and articles on topics related to parallel programming and frequently consults with customers across a wide range of domains to help them effectively use the threading libraries provided by Intel.  Prior to joining Intel in 2006, he was an Assistant Professor in the Edward S. Rogers Department of Electrical and Computer Engineering at the University of Toronto. He received his Ph.D. from the School of Electrical and Computer Engineering at Purdue University in 2001.  


Rafael Asenjo, Professor of Computer Architecture at the University of Malaga, Spain, obtained a PhD in Telecommunication Engineering in 1997 and was an Associate Professor at the Computer Architecture Department from 2001 to 2017. He was a Visiting Scholar at the University of Illinois in Urbana-Champaign (UIUC) in 1996 and 1997 and Visiting Research Associate in the same University in 1998. He was also a Research Visitor at IBM T.J. Watson in 2008 and at Cray Inc. in 2011. He has been using TBB since 2008 and over the last five years, he has focused on productively exploiting heterogeneous chips leveraging TBB as the orchestrating framework. In 2013 and 2014 he visited UIUC to work on CPU+GPU chips. In 2015 and 2016 he also started to research into CPU+FPGA chips while visiting U. of Bristol. He served as General Chair for ACM PPoPP'16 and as an Organization Committee member as well as a Program Committee member for several HPC related conferences (PPoPP, SC, PACT, IPDPS, HPCA, EuroPar, and SBAC-PAD). His research interests include heterogeneous programming models and architectures, parallelization of irregular codes and energy consumption.  


James Reinders is a consultant with more than three decades experience in Parallel Computing, and is an author/co-author/editor of nine technical books related to parallel programming.  He has had the great fortune to help make key contributions to two of the world's fastest computers (#1 on Top500 list) as well as many other supercomputers, and software developer tools. James finished 10,001 days (over 27 years) at Intel in mid-2016, and now continues to write, teach, program, and do consulting in areas related to parallel computing (HPC and AI).  

Bibliographic Information

Buy it now

Buying options

Softcover Book USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access