DISPATCH

OpenMP* Fortran Compiler Directive: Determines whether a variant of a procedure is called for a given function or subroutine call. This feature is only available for ifx.

Syntax

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

   statement

clause

Is one or more of the following:

  • DEPEND ([depend-modifier, ] dependence-type : locator-list)

    Adds the DEPEND properties to the interoperability set.

  • DEVICE (scalar-integer-expression)

    Causes the value of the default-device-var ICV of the generated task to be set to the value of the DEVICE clause expression.

  • IS_DEVICE_PTR (list)

    Identifies its list items as device pointers. The IS_DEVICE_PTR property for each list item is added to the interoperability requirement set.

    Each IS_DEVICE_PTR list item must be of type C_PTR from the intrinsic module ISO_C_BINDING

  • NOCONTEXT (scalar-logical-expression)

    If a NOCONTEXT clause appears and the scalar-logical-expression evaluates to .TRUE., the DISPATCH construct is not added to the construct set of the OpenMP context.

    If the NOCONTEXT expression evaluates to .FALSE., the DISPATCH directive is added to the OpenMP* context.

  • NOVARIANTS (scalar-logical-expression)

    If a NOVARIANTS clause appears, and the scalar-logical-expression evaluates to .TRUE., no function variant is selected for execution as the target-call, even if one would otherwise have been selected.

    If the NOVARIANTS expression evaluates to .FALSE., and a variant exists that specified an OpenMP* context in the MATCH clause that matches the current context, the variant is called

  • NOWAIT

    Adds the NOWAIT property to the interoperability requirement set.

Variables used in the expression of a NOVARIANTS clause or a NOCONTEXT clause are implicitly referenced in all enclosing contexts of the DISPATCH directive.

Only one of each of the following clauses is permitted in a DISPATCH directive: NOWAIT, NOCONTEXT, and NOVARIANT.

statement

Is a Fortran statement with one of these forms:

  • var = target_proc ( [argument-list] )

  • CALL target_proc [ ( [argument-list] ) ]

target_proc must be a procedure name; it cannot be a procedure pointer.

The DISPATCH directive creates an explicit task around the associated code as if a TASK construct was present. Properties added to the interoperability requirement set can be removed by other directives. The task will be an included task if the interoperability requirement set does not contain a NOWAIT property.

If the interoperability requirements set contains DEPEND properties, it is as if the TASK construct contained the corresponding DEPEND clauses.

See Also