# TARGET TEAMS

OpenMP* Fortran Compiler Directive: Creates a device data environment and executes the construct on the same device. It also creates a league of thread teams with the primary thread in each team executing the structured block.

## Syntax

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

loosely-structured-block

!$OMP END TARGET TEAMS

-or-

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

strictly-structured-block

!$OMP END TARGET TEAMS

clause | Can be any of the clauses accepted by the TARGET or TEAMS 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 TEAMS construct.

Parent topic: T to Z

## See Also

OpenMP Fortran Compiler Directives
Syntax Rules for Compiler Directives
TARGET Directive
TEAMS