Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

DO SIMD

OpenMP* Fortran Compiler Directive: Specifies that the iterations of the loop will be distributed across threads in the team. Iterations executed by each thread can also be executed concurrently using SIMD instructions.

Syntax

!$OMP DO SIMD [clause[[,] clause] ... ]

      do-loop

[!$OMP END DO SIMD[NOWAIT]]

clause

Can be any of the clauses accepted by the DO or SIMD directives.

do-loop

Is one or more DO iterations (DO loops). The DO iteration cannot be a DO WHILE or a DO loop without loop control. The DO loop iteration variable must be of type integer.

All loops associated with the construct must be structured and perfectly nested; that is, there must be no intervening code and no other OpenMP* Fortran directives between any two loops.

The iterations of the DO loop are distributed across the existing team of threads. The values of the loop control parameters of the DO loop associated with a DO directive must be the same for all the threads in the team.

You cannot branch out of a DO loop associated with a DO SIMD directive.

If the END DO SIMD directive is not specified, an END DO SIMD directive is assumed at the end of do-loop.

You can specify the NOWAIT clause to avoid the implied barrier at the end of a loop construct.

The DO SIMD construct converts the associated DO loop to a SIMD loop in a way that is consistent with any clauses that apply to the SIMD construct. The resulting SIMD chunks and any remaining iterations will be distributed across the implicit tasks of the parallel region in a way that is consistent with any clauses that apply to the DO construct.

This directive specifies a composite construct.