インテル® Fortran コンパイラー 14.0 ユーザー・リファレンス・ガイド

TARGET Directive

OpenMP* Fortran Compiler Directive: Creates a device data environment and executes the construct on the same device. This directive only applies to Intel® MIC Architecture.

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

   block

!$OMP END TARGET

clause

Is one or more of the following:

  • DEVICE (integer-expression)

    Specifies the target device.

    The integer-expression must evaluate to a positive scalar integer value.

    If DEVICE is not specified, the default device is determined by the internal control variable (ICV) named device-num-var.

    At most one DEVICE clause can appear in a TARGET directive.

  • MAP ([map-type: ] list)

  • IF (expression)

    Specifies a conditional statement.

    The expression is a scalar logical expression that evaluates to .TRUE. or .FALSE..

    When an IF clause is specified and the expression evaluates to .FALSE., the target region is not executed by the device. It is executed by the encountering task.

    At most one IF clause can appear in a TARGET directive.

block

Is a structured block (section) of statements or constructs. No branching into or out of the block of code is allowed.

The binding task for a TARGET construct is the encountering task. The target region binds to the enclosing parallel or task region.

This construct provides a superset of the functionality provided by the TARGET DATA construct.

The TARGET construct also specifies that the region is executed by a device. The encountering task waits for the device to complete the target region at the end of the construct.

If a TARGET, TARGET DATA, or TARGET UPDATE construct appears within a target region, the construct is ignored.

関連情報


このヘルプトピックについてのフィードバックを送信