Skip to Main Content
Intel Threading Building Blocks
book

Intel Threading Building Blocks

by James Reinders
July 2007
Intermediate to advanced content levelIntermediate to advanced
332 pages
10h 4m
English
O'Reilly Media, Inc.
Content preview from Intel Threading Building Blocks

Implementation

This program runs two simultaneous instances of this Game of Life. To show a side-by-side comparison, one of these instances is calculated using sequential programming and the other is calculated using parallel programming.

Each generation of a colony is calculated based on the position of the cells in the preceding generation. The decisions that determine what the next generation looks like are shown in Figure 11-1. Generation after generation, a colony grows, shrinks, and changes according to these very simple rules. Usually, it will eventually reach a state where every living cell stays alive, or where small figures oscillate between two or more repeating states. If we calculate the next four generations for the colony in Figure 11-2, we will see it progressing as shown in Figure 11-3.

Game of Life: Four sample steps

Figure 11-3. Game of Life: Four sample steps

The colony in this figure actually oscillates among four patterns, while at the same time moving diagonally across the grid. This pattern is known as the glider among Game of Life aficionados.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Rezaur Rahman

Publisher Resources

ISBN: 9780596514808Errata Page