next up previous contents
Next: Visualisation of Independent Loop Up: Data Parallel Execution Previous: Independent Loops - Conditions

 

Independent Example 1

This is independent,

    !HPF$ INDEPENDENT
    DO i = 1, n
     b(i) = b(i) + b(i)
    END DO

this is not, (dependence on order of execution),

    DO i = 1, n
     b(i) = b(i+1) + b(i)
    END DO

nor is this,

    DO i = 1, n
     b(i) = b(i-1) + b(i)
    END DO

however, this is

!HPF$ INDEPENDENT
    DO i = 1, n
     a(i) = b(i-1) + b(i)
    END DO

For more information, click here gif


next up previous contents
Next: Visualisation of Independent Loop Up: Data Parallel Execution Previous: Independent Loops - Conditions

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