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

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.