HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

14.1  interop Construct

Name: interop

Association: none

Category: executable

Properties: device

Clauses

depend, destroy, device, init, nowait, use

  15.1.2  hint Clause

Clause set

action-clause

Properties: required

Members: destroy, init, use

Binding

The binding task set for an interop region is the generating task. The interop region binds to the region of the generating task.

Semantics

The interop construct retrieves interoperability properties from the OpenMP implementation to enable interoperability with foreign execution contexts. When an interop construct is encountered, the encountering task executes the region.

For each action-clause, the interop-type set is the set of interop-type modifiers specified for the clause if the clause is init or for the init clause that initialized the interop-var that is specified for the clause if the clause is not init.

If the interop-type set includes targetsync, an empty mergeable task is generated. If the nowait clause is not present on the construct then the task is also an included task. Any depend clauses that are present on the construct apply to the generated task.

The interop construct ensures an ordered execution of the generated task relative to foreign tasks executed in the foreign execution context through the foreign synchronization object that is accessible through the targetsync property. When the creation of the foreign task precedes the encountering of an interop construct in happens before order (see Section 1.4.5), the foreign task must complete execution before the generated task begins execution. Similarly, when the creation of a foreign task follows the encountering of an interop construct in happens before order, the foreign task must not begin execution until the generated task completes execution. No ordering is imposed between the encountering thread and either foreign tasks or OpenMP tasks by the interop construct.

If the interop-type set does not include targetsync, the nowait clause has no effect.

Restrictions

Restrictions to the interop construct are as follows:

Cross References