DO CONCURRENT construct (Fortran 2008)

With the DO CONCURRENT construct, you can specify that individual loop iterations have no interdependencies. The execution order of the iterations can be indeterminate at the beginning of execution of the DO CONCURRENT construct.

Read syntax diagramSkip visual syntax diagram
>>-DO_CONCURRENT_statement-------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>-statement_block---------------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>-+-END_DO_statement---+--------------------------------------><
   '-terminal_statement-'   

DO_CONCURRENT_statement
See DO CONCURRENT (Fortran 2008) for syntax details.
END_DO_statement
See END (Construct) for syntax details.
terminal_stmt
is a statement that terminates the DO CONCURRENT construct. See The terminal statement for details.

Example

The following example shows the usage of the DO CONCURRENT construct:

INTEGER,PARAMETER::M=100
INTEGER I
Real X(M), Y(M), Z(M)

DO CONCURRENT (I = 1:M)
   Z(I) = SQRT(X(I) + Y(I))
END DO


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us