December 31, 2008
Fundamental Concepts of Parallel ProgrammingParallel Programming Patterns
For years object-oriented programmers have been using design patterns to logically design their applications. Parallel programming is no different than object-oriented programming -- parallel programming problems generally fall into one of several well-known patterns. A few of the more common parallel programming patterns and their relationship to the aforementioned decompositions are in Table 2.
Table 2: Common Parallel Programming Patterns
In this section, we provide a brief overview of each pattern and the types of problems that each pattern may be applied to.
Figure 1: Wavefront Data Access Pattern
The numbers in Figure 1 illustrate the order in which the data elements are processed. For example, elements in the diagonal that contains the number 3 are dependent on data elements 1 and 2 being processed previously. The shaded data elements in Figure 1 indicate data that has already been processed. In this pattern, it is critical to minimize the idle time spent by each thread. Load balancing is the key to success with this pattern.
For a more extensive and thorough look at parallel programming design patterns, see Patterns for Parallel Programming, by Timothy Mattson et al.
|
|
||||||||||||||||||||||||||||||
|
|
|
|