-
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:
-
- Ebook
- Safari Books Online
- Print Release:
- July 2007
- Ebook Release:
- June 2009
- Pages:
- 336
- 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
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.
