Structured Parallel Programming: Patterns for Efficient Computation

Structured Parallel Programming: Patterns for Efficient Computation

James Reinders

Language: English

Pages: 432

ISBN: 0124159931

Format: PDF / Kindle (mobi) / ePub


Programming is now parallel programming. Much as structured programming revolutionized traditional serial programming decades ago, a new kind of structured programming, based on patterns, is relevant to parallel programming today. Parallel computing experts and industry insiders Michael McCool, Arch Robison, and James Reinders describe how to design and implement maintainable and efficient parallel algorithms using a pattern-based approach. They present both theory and practice, and give detailed concrete examples using multiple programming models. Examples are primarily given using two of the most popular and cutting edge programming models for parallel programming: Threading Building Blocks, and Cilk Plus. These architecture-independent models enable easy integration into existing applications, preserve investments in existing code, and speed the development of parallel applications. Examples from realistic contexts illustrate patterns and themes in parallel algorithm design that are widely applicable regardless of implementation technology.

  • The patterns-based approach offers structure and insight that developers can apply to a variety of parallel programming models
  • Develops a composable, structured, scalable, and machine-independent approach to parallel computing
  • Includes detailed examples in both Cilk Plus and the latest Threading Building Blocks, which support a wide variety of computers

AP European History Crash Course (Advanced Placement (AP) Crash Course)

Integrated Chinese: Simplified Characters Textbook, Level 1, Part 1

Microeconomics: Principles and Applications (6th Edition)

Automated Planning: Theory & Practice (The Morgan Kaufmann Series in Artificial Intelligence)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 This page intentionally left blank Listings 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 4.1 4.2 4.3 4.4 4.5 4.6 Add two vectors in C, with implied.

. . . . . . . . . . . . . . . . . . Sketch of bzip2 pipeline in Cilk Plus using a consumer reducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Serial merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parallel merge in Cilk Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Additionally, Intel Cilk Plus and OpenCL have gained sufficient recognition Preliminaries xxv and usage to be worth exploring as well. You should also look at our web site—we hope to add additional examples there that would not fit in the book, and you can also download the source code for all examples in the book from that site. A deep knowledge of computer architecture is not needed to understand this book and use the patterns we present. We have purposefully left out any in-depth.

Technology and products. Their passion to help others also helped us produce the best book we could. Much of the discussion for best practices for OpenMP in the desktop environment was derived from an analysis by Jay Hoeflinger and Brian Bliss of Intel. The Bzip2 example code is derived from Julian Seward’s Bzip2 implementation, available at http://bzip.org The TBB code for Bzip2 descends from a port done by Hyojin Sung while she was an intern at Intel. The cache-oblivious stencil code (Section.

Such as those due to I/O operations, need to be ordered. We will not distinguish between these two kinds of dependency, since in either case the fundamental requirement is that tasks be ordered in time. For task management the fork–join pattern is often used in this book. In the fork–join pattern, new serial control flows are created by splitting an existing serial control flow at a fork point. Conversely, two separate serial control flows are synchronized by merging them together at a join.

Download sample

Download