The range of a DO construct includes all the statements and constructs that follow the DO statement, up to and including the terminal statement. If the DO construct contains another construct, the inner (nested) construct must be entirely contained within the DO construct.
Execution of a DO construct differs depending on how the loop is controlled, as follows:
For simple DO constructs, there is no loop control. Statements in the DO range are repeated until the DO statement is terminated explicitly by a statement within the range.
For iterative DO statements, loop control is specified as do-var = expr1, expr2 [,expr3]. An iteration count specifies the number of times the DO range is executed. (For more information, see Iteration Loop Control.)
For DO WHILE statements, loop control is specified as a DO range. The DO range is repeated as long as a specified condition remains true. Once the condition is evaluated as false, the DO construct terminates. (For more information, see the DO WHILE statement.)
For DO CONCURRENT constructs, the values of the index variables for the iterations of the construct are determined by the rules for the index variables of the FORALL construct. The DO CONCURRENT range is executed for every active combination of the index-name values. Each execution of the range is an iteration. The executions can occur in any order. For more information, see the DO CONCURRENT construct.
Copyright © 1996-2010, Intel Corporation. All rights reserved.