Intel® Fortran Compiler 16.0 User and Reference Guide
Parallel Directive Clause: Specifies a conditional expression. If the expression evaluates to .FALSE., the construct is not executed.
IF (expression)
expression |
Must be a scalar logical expression that evaluates to .TRUE. or .FALSE.. At most one IF clause can appear in the directive. |
The following are additional rules that apply to specific OpenMP Fortran directives:
For the CANCEL OpenMP* Fortran directive, if expression evaluates to false, the construct does not request cancellation.
For the PARALLEL OpenMP Fortran directive:
The enclosed code section is executed in parallel only if expression evaluates to .TRUE.. Otherwise, the parallel region is serialized. If this clause is not used, the region is executed as if an IF(.TRUE.) clause were specified.
This clause is evaluated by the master thread before any data scope attributes take effect.
For the TARGET OpenMP Fortran directive, if expression evaluates to .FALSE., the target region is not executed by the device. It is executed by the encountering task.
For the TARGET DATA OpenMP Fortran directive, if expression evaluates to .FALSE., the new device data environment is not created.
For the TARGET UPDATE OpenMP Fortran directive, if expression evaluates to .FALSE., the TARGET UPDATE directive is ignored.
For the TASK OpenMP Fortran directive:
The enclosed code section is to be executed in parallel only if expression evaluates to .TRUE.. If this clause is not used, the region is executed as if an IF(.TRUE.) clause was specified.
If expression evaluates to .FALSE., the encountering thread must suspend the current task region and begin execution of the generated task immediately. The suspended task region will not be resumed until the generated task is completed.
This clause is evaluated by the master thread before any data scope attributes take effect.