next up previous contents
Next: Forall Construct Up: Data Parallel Execution Previous: Execution Process

Do-loops and Forall Statements

Take care, FORALL semantics are different to DO-loop semantics,

    DO i = 2, n-1
     a(i) = a(i-1) + a(i) + a(i+1)
    END DO

is different to,

    FORALL (i=2:n-1) &
     a(i) = a(i-1) + a(i) + a(i+1)

which is the same as,

     a(2:n-1) = a(1:n-2) + a(2:n-1) + a(3:n)

For more information, click here gif


next up previous contents
Next: Forall Construct Up: Data Parallel Execution Previous: Execution Process

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