A.7 Data Dependence Examples

This loop can easily be parallelized, since there are no loopcarried dependencies:

DO 10 I = 1,N
A(I) = B(I) + 2
C(I) = A(I) + D(I)
10  CONTINUE

The next loop cannot be parallelized directly. An antidependence on A exists from the second assignment statement to the first. Addition of synchronization is needed to parallelize the loop. (That, in turn, may slow execution.)

DO 10 I = 1,N
A(I) = B(I) + 2
C(I) = A(I+1) + D(I)
10  CONTINUE


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers