Electronic Design

Intel Threading Building Blocks

By James ReindersISBN: 0-596-51480-8

The second revision of Intel’s Thread Building Block (TBB) product (See Threads Make The Move To Open Source) was threefold. First, there was a new version of TBB with its collection of improvements and bug fixes. The second was the move to open source. The third was James Reindeers’ book. Parallel programming has tended to languish in the throws of academia for ages due to the limited availability of multicore processors. That has all changed and what was uncommon is now common. It is also time for programmers to catch up as well. TBB is just one way of attacking problems using multiple cores but it represents a wide range of possible applications. Those who have not slogged through TBB version 1 will find this book invaluable since it addresses TBB’s use from basic algorithms to a plethora of examples, code included. The books targets C++ programmers since that was TBB’s original target as well but the move to open source will make it suitable for other platforms as well and the methodology presented in the book will be equally applicable to those. Of course, one of the best things about the open source move is the ability to download the latest and greatest from www.threadbuildingblocks.org The book starts out by answering the question: Why Threaded Building Blocks? This is important because of the multitude of parallel programming options opening up. The chapter starts by addressing basic alternatives like raw threads, MPI (message passing interface), and OpenMP. These are mature but comparatively primitive solutions. Reindeers moves onto algorithms that work well with TBB, and then moves to stream processing that is very common in parallel programming environments. His writing is concise, insightful and a pleasant read especially for a subject some might find rather dry. He then moves onto the basic data objects: concurrent_queue, concurrent_vector, concurrent_hash_map. TBB programmers can't do much without them. A subsequent chapter delves into memory management details. Likewise, mutual exclusion is given its own chapter. It is one well-worth reading because the nuances of parallel programming and mapping algorithms to TBB. The task scheduler article is one of the more interesting ones since TBB is essentially designed to maximum the efficiency of threads on a multicore system. This and the next chapter on concurrency and debugging are most beneficial to those TBB programmers who have already figured out the basics. Finally there is the rather large Examples chapter that covers everything from the venerable Game of Life to a gaming-style physic interaction application. This is where the code examples and the insight come into play. The book wraps up with an overview of related materials from programming languages and issues for parallel programming as well as cache. The introduction to lamda functions is useful but begs yet another book. The book will be invaluable to those using TBB. It is also a worthwhile for those looking at parallel programming even if they don’t intend to be TBB aficionados. The techniques are described well and can provide insight to other approaches as well as why TBB can be useful.

TAGS: Intel
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.