Multi-core chips from Intel and AMD offer a dramatic boost in speed and responsiveness, and plenty of opportunities for multiprocessing on ordinary desktop computers. But they also present a challenge: More than ever, multithreading is a requirement for good performance. This guide explains how to maximize the benefits of these processors through a portable C++ library that works on Windows, Linux, Macintosh, and Unix systems. With it, you'll learn how to use Intel Threading Building Blocks (TBB) effectively for parallel programming -- without having to be a threading expert.

Written by James Reinders, Chief Evangelist of Intel Software Products, and based on the experience of Intel's developers and customers, this book explains the key tasks in multithreading and how to accomplish them with TBB in a portable and robust manner. With plenty of examples and full reference material, the book lays out common patterns of uses, reveals the gotchas in TBB, and gives important guidelines for choosing among alternatives in order to get the best performance.

You'll learn how Intel Threading Building Blocks:

Enables you to specify tasks instead of threads for better portability, easier programming, more understandable source code, and better performance and scalability in general

Focuses on the goal of parallelizing computationally intensive work to deliver high-level solutions

Is compatible with other threading packages, and doesn't force you to pick one package for your entire program

Emphasizes scalable, data-parallel programming, which allows program performance to increase as you add processors

Relies on generic programming, which enables you to write the best possible algorithms with the fewest constraints

Any C++ programmer who wants to write an application to run on a multi-core system will benefit from this book. TBB is also very approachable for a C programmer or a C++ programmer without much experience with templates. Best of all, you don't need experience with parallel programming or multi-core processors to use this book.

James Reinders

James Reinders, Chief Evangelist of Intel Software Products, is a senior engineer who joined Intel Corporation in 1989 and has contributed to a number of projects, including the world's first TeraFLOP supercomputer (ASCI Red), compilers and architecture work for the iWarp, Pentium Pro, Pentium II, Itanium, and Pentium 4 processors. He has years of experience in processor architecture, optimizing compilers, parallel computer architecture, and making products for software developers.

Reinders is also the editorial columnist for the monthly "The Gauntlet" at www.devX.go-parallel.com, as well as the author of the Intel Press book titled "VTune Performance Analyzer Essentials" and contributor to the new book "Multi-Core Programming."

The animal on the cover of Intel Threading Building Blocks is a wild canary (Serinus canaria), a small songbird in the finch family. It is also known as an island canary or Atlantic canary because it is native to islands off western Europe, particularly Madeira, Azores, and the Canary Islands, for which the bird was named. The name comes from the Latin canaria ("of the dogs"), first used by Pliny the Elder in his Naturalis Historia because of the large dogs roaming the Islands. Canaries live in orchards, farmlands, and copses, and make their nests in bushes and trees.

Although the wild canary is darker and slightly larger than the domestic canary, it is otherwise similar in appearance. Its breast is yellow-green and its back is streaked with brown. Like many species, the male is more vibrantly colored than the female. The male also has a sweeter song. When the Spanish conquered the Islands in the 15th century, they domesticated the birds and began to breed them. By the 16th century, canaries were prized as pets throughout Europe. (Samuel Pepys writes about his "canary birds" in a 1661 diary entry.) Five hundred years of selective breeding have produced many canary varieties, including the bright yellow type common today. The small birds are popular pets because they can live up to 10 years, require little special attention, and are considered to have the most melodious song of all birds.

As late as the 1980s, coal miners used canaries as a warning system, with two birds in each coal pit. According to the U.S. Bureau of Mines, canaries were preferred to mice because they are more sensitive to fumes and more visibly show distress in the presence of gas. A canary in a mine would chirp all day, but if the carbon monoxide level rose, it would stop singing and sway on its perch before falling dead-warning the miners to get out fast.

The book mostly consists of slightly-annotated variations of the[@] PDFs, albeit slightly easier to read thanks to the O'Reilly layout. But, for example, the parallel_scan description is exactly the same - and just as difficult to comprehend - as that in the "GettingStarted.pdf" over at tbb.Alas the book is already out-of-date; the online documentation versions include C++0x Lambda expression examples, while the book includes a short comment on the possible future of Lambdas right at the end.The book retains the online-docs helter-skelter launch into things, so if you were hoping the book might walk you into how things work with a little more grace, you'll be dissapointed.Lastly: The book continues the emphasis on algorithmic crunching; I was hoping that in the book they might at least invest a little additional time into describing independent parallelism, aka threading. Alas, aside from the stock parallel_while and pipeline documentation from the tbb site, it doesn't really go into it. There is some coverage of the task scheduler, but it is an old version of the online documentation, so it explores how the task scheduler works rather than examining practical use cases.With that said: It fails to inspire any real "wow" as to how TBB might really benefit a non-trivial parallelization task over the equally algorithm-centric OpenMP.

In the former times the court-poets of dukes or kings wrote praise-poems to the diletantic literaric works of their masters. Cervantes reacted on this by writting ironic praise-poems for his own Don Quijote. I thought these times have long passed by. But famous scientist are doing nowadays practically the same. They are writing praise-poems to a rather mediocre book. The reason is the same than in the old times. Getting money from a rich person/organisation. But its nevertheless a shame. The author calls himself an Evangelist. Which is for European ears very unusuall. But its correct. The book has very little detailed technical content, it just tells the reader over and over again, how great TBBs are. TBBs are based on the Cilk-technology of M.I.T. The team developed also a massive parallel programm called Cilk-Chess. My own PC-based chess programm won in computer-chess tournaments several times against Cilk-Chess. The speedup of Cilk was - at least for chess - very modest. Writing an effective massive parallel chess programm requires a lot of work and knowledge. With Cilk/TBBs its relative straightforward. But the result is of little practical value. The book does not address the efficiency question at all. I have not found any detailed speedup analysis. But that's the real question in parallel programming. If its not considerable running faster than the linear version, there is no point for doing the work.