Intel Threading Building Blocks

Sept. 12, 2007
By James Reinders
ISBN: 0-596-51480-8

The second revision of Intel’s Thread Building Block (TBB) product 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. 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.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!