# TARGET PARALLEL

OpenMP* Fortran Compiler Directive: Creates a device data environment in a parallel region and executes the construct on that device.

## Syntax

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

loosely-structured-block

!$OMP END TARGET PARALLEL

-or-

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

strictly-structured-block

!$OMP END TARGET PARALLEL

clause | Can be any of the clauses accepted by the TARGET or PARALLEL directives with identical meanings and restrictions.
loosely-structured-block | Is a structured block (section) of statements or constructs. You cannot branch into or out of the block.
strictly-structured-block | Is a Fortran BLOCK construct. You cannot branch into or out of the BLOCK construct.

This directive provides a shortcut for specifying a TARGET construct immediately followed by a PARALLEL construct. The effect of any clause that applies to both constructs is as if it were applied to both constructs separately. The only exceptions are 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.

Parent topic: T to Z

## See Also

OpenMP Fortran Compiler Directives
Syntax Rules for Compiler Directives
IF Clause
TARGET Directive
PARALLEL Directive