インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス

IF Clause

Parallel Directive Clause: Specifies a conditional expression. If the expression evaluates to .FALSE., the construct is not executed.

Syntax

IF ([directive-name-modifier:] scalar-logical-expression)

directive-name-modifier

Names the associated construct that the IF clause applies to. Currently, you can specify one of the following associated constructs: PARALLEL, TARGET DATA, TARGET, TARGET UPDATE, TARGET ENTER DATA, TARGET EXIT DATA, TASK, or TASKLOOP.

scalar-logical-expression

Must be a scalar logical expression that evaluates to .TRUE. or .FALSE..

At most one IF clause can appear in a non-combined directive. In combined directives, IF clauses with different directive-name-modifiers can occur, at most one for each constituent directive making up the combined directive where IF is allowed.

Description

The effect of the IF clause depends on the construct to which it is applied:

The following are additional rules that apply to specific OpenMP Fortran directives: