Publisher: O'Reilly Media Released: July 2007 Pages: 334
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. |
-
Chapter 1 Why Threading Building Blocks? -
Overview -
Benefits -
Chapter 2 Thinking Parallel -
Elements of Thinking Parallel -
Decomposition -
Scaling and Speedup -
What Is a Thread? -
Mutual Exclusion and Locks -
Correctness -
Abstraction -
Patterns -
Intuition -
Chapter 3 Basic Algorithms -
Initializing and Terminating the Library -
Loop Parallelization -
Recursive Range Specifications -
Recursive Range Specifications -
Summary of Loops -
Chapter 4 Advanced Algorithms -
Parallel Algorithms for Streams -
Chapter 5 Containers -
concurrent_queue -
concurrent_vector -
concurrent_vector -
concurrent_hash_map -
Chapter 6 Scalable Memory Allocation -
Limitations -
Problems in Memory Allocation -
Memory Allocators -
Replacing malloc, new, and delete -
Chapter 7 Mutual Exclusion -
When to Use Mutual Exclusion -
Mutexes -
Mutexes -
Atomic Operations -
Chapter 8 Timing -
Chapter 9 Task Scheduler -
When Task-Based Programming Is Inappropriate -
Much Better Than Raw Native Threads -
Initializing the Library Is Your Job -
Example Program for Fibonacci Numbers -
Task Scheduling Overview -
How Task Scheduling Works -
Recommended Task Recurrence Patterns -
Making Best Use of the Scheduler -
Task Scheduler Interfaces -
Task Scheduler Summary -
Chapter 10 Keys to Success -
Key Steps to Success -
Relaxed Sequential Execution -
Safe Concurrency for Methods and Libraries -
Debug Versus Release -
For Efficiency’s Sake -
Enabling Debugging Features -
Mixing with Other Threading Packages -
Naming Conventions -
Chapter 11 Examples -
The Aha! Factor -
A Few Other Key Points -
parallel_for Examples -
The Game of Life -
Parallel_reduce Examples -
CountStrings: Using concurrent_hash_map -
Quicksort: Visualizing Task Stealing -
A Better Matrix Multiply (Strassen) -
Advanced Task Programming -
Packet Processing Pipeline -
Memory Allocation -
Game Threading Example -
Physics Interaction and Update Code -
Open Dynamics Engine -
Chapter 12 History and Related Projects -
Libraries -
Languages -
Pragmas -
Generic Programming -
Caches -
Costs of Time Slicing -
Quick Introduction to Lambda Functions -
Further Reading -
Colophon |
- Title:
- Intel Threading Building Blocks
- By:
- James Reinders
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- July 2007
- Ebook:
- March 2010
- Pages:
- 334
- Print ISBN:
- 978-0-596-51480-8
- | ISBN 10:
- 0-596-51480-8
- Ebook ISBN:
- 978-0-596-15959-7
- | ISBN 10:
- 0-596-15959-5
|
-
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." View James Reinders's full profile page. |
Colophon 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. |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Jason Brittain, Ian F. Darwin
October 2007
Ebook: $31.99
Print & Ebook: $43.99
Print: $39.99
By Joey Lott, Darron Schall, Keith Peters
October 2006
Ebook: $31.99
Print & Ebook: $43.99
Print: $39.99
By Stephen Cawood
September 2005
Ebook: $9.99
Print: $24.95
|
Customer Reviews
3/30/2010 (7 of 8 customers found this review helpful) 2.0Little more than the Intel PDFs By kfsone from Bedford, TX - Difficult to understand
- Not comprehensive enough
- Too many errors
11/14/2009 (5 of 9 customers found this review helpful) By Chrilly from Altmelon, Austria/Europe About Me Designer, Developer
|
|
|