next up previous contents
Next: Visualisation of New Variables Up: Data Parallel Execution Previous: New Variables - Conditions

 

New Variables Example 1

INDEPENDENT loops can be formed by creating copies of x and y for each inner iteration.

Copies of j can be made for further independence.

    !HPF$ INDEPENDENT, NEW (j)
    DO i = 1, n
     !HPF$ INDEPENDENT, NEW (x,y)
     DO j = 1, m
      x = A(j)
      y = B(j)
      C(i,j) = x+y
     END DO
    END DO

After the loop x, y, i and j will have an undetermined value so cannot be used before being assigned a new value. (In regular Fortran they could be.)


next up previous contents
Next: Visualisation of New Variables Up: Data Parallel Execution Previous: New Variables - Conditions

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.