Download presentation
Presentation is loading. Please wait.
Published byShinta Tanuwidjaja Modified over 6 years ago
1
Chapter 8: ZPL and Other Global View Languages
Principles of Parallel Programming First Edition by Calvin Lin Lawrence Snyder
2
Global view parallel languages
Programmers see the whole computation Do not focus on processes Language support for implicit parallelism
3
ZPL http://research.cs.washington.edu/zpl/home/ Focus on arrays
Implicit parallelism Compiler generates processes/threads Inserts communication calls Handles synchronization [1..n] count: =+<<(array==3); ZPL for count 3s
4
Array language A := A + 1; adds 1 to all elements of A
Performs in parallel [1..n] A := A + 1; only updates 1 .. N Named regions region R = [1..m, 1..n]
5
Code Spec 8.1 Primitive data types available in ZPL.
6
Code Spec 8.2 Syntax of control statements in ZPL.
7
Code Spec 8.3 ZPL’s primitive operators and operator-assignments.
8
Figure 8.1 ZPL program that implements Conway’s Game of Life.
9
Code Spec 8.4 Specifying the entry procedure for ZPL.
10
Figure 8.2 The SUMMA matrix multiplication algorithm in ZPL.
11
Code Spec 8.5 Requirements of ZPL’s partial reduce and flood operators.
12
Code Spec 8.6 Requirements of ZPL’s remap operator.
13
Figure 8.3 ZPL program for ranking coffee drinker data.
14
Figure 8. 4 Bounding region
Figure 8.4 Bounding region. Regions used in the program are superimposed so that their indices align; the black square has the same index in all regions. Once aligned, the bounding region is the smallest region containing the indices of the superimposed regions.
15
Figure 8. 5 Block allocation of the bounding region
Figure 8.5 Block allocation of the bounding region. The bounding region (a) is partitioned using a balanced allocation (b), which assigns a set of indices (c). The contributing regions’ indices are inherited from those indices (d).
16
Code Spec 8.7 ZPL performance model.
17
NESL Based on ML High level global view language Data parallel
Allows programmers to asses the behavior of their programs
18
Basic data type Sequence [6, 14, 0, -5] essentially a list
Basic operation Apply-to-each {a+1 : a in [6, 14, 0, -5]}; applies the increment to each element
19
Figure 8.6 A NESL matrix multiplication function.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.