Loops can be formed with the usual DO-END DO and DO WHILE, or by using an IF/GOTO and a label. However, the loops must have a single entry and a single exit to be vectorized. Following are the examples of correct and incorrect usages of loop constructs.
Example 1: Correct Usage |
---|
SUBROUTINE FOO (A, B, C) ENDDO |
Example 2: Incorrect Usage |
---|
SUBROUTINE FOO (A, B, C) |