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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

TARGET PARALLEL DO

OpenMP* Fortran Compiler Directive: Provides an abbreviated way to specify a TARGET directive containing a PARALLEL DO directive and no other statements.

Syntax

!$OMP TARGET PARALLEL DO [clause[[,] clause] ... ]

      do-loop

[!$OMP END TARGET PARALLEL DO]

clause

Can be any of the clauses accepted by the TARGET or PARALLEL DO directives, except for the COPYIN clause.

do-loop

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

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

If the END TARGET PARALLEL DO directive is not specified, the TARGET PARALLEL DO is assumed at the end of do-loop. If used, the END TARGET PARALLEL DO directive must appear immediately after the end of do-loop.

The semantics are identical to explicitly specifying a TARGET directive immediately followed by a PARALLEL DO directive.

The restrictions for the TARGET and PARALLEL DO constructs apply to this directive except for the following:

  • If any IF clause in the directive includes a directive-name-modifier then all IF clauses in the directive must include a directive-name-modifier.

  • At most one IF clause with no directive-name-modifier can appear on the directive.

  • At most one IF clause with the PARALLEL directive-name-modifier can appear on the directive.

  • At most one IF clause with the TARGET directive-name-modifier can appear on the directive.