HOME
| OPENMP API Specification: Version 5.1 November 2020

3.12  Interoperability Routines

The interoperability routines provide mechanisms to inspect the properties associated with an omp_interop_t object. Such objects may be initialized, destroyed or otherwise used by an interop construct. Additionally, an omp_interop_t object can be initialized to omp_interop_none, which is defined to be zero. An omp_interop_t object may only be accessed or modified through OpenMP directives and API routines.

An omp_interop_t object can be copied without affecting, or copying, the underlying state. Destruction of an omp_interop_t object destroys the state to which all copies of the object refer.


Table 3.1: Required Values of the omp_interop_property_t enum Type




enum name

contexts

name

property





omp_ipr_fr_id = -1

all

fr_id

An intptr_t value that represents the foreign runtime id of context





omp_ipr_fr_name = -2

all

fr_name

C string value that represents the foreign runtime name of context





omp_ipr_vendor = -3

all

vendor

An intptr_t that represents the vendor of context





omp_ipr_vendor_name = -4

all

vendor_name

C string value that represents the vendor of context





omp_ipr_device_num = -5

all

device_num

The OpenMP device ID for the device in the range 0 to omp_get_num_devices() inclusive





omp_ipr_platform = -6

target

platform

A foreign platform handle usually spanning multiple devices





omp_ipr_device = -7

target

device

A foreign device handle





omp_ipr_device_context = -8

target

device_context

A handle to an instance of a foreign device context





omp_ipr_targetsync = -9

targetsync

targetsync

A handle to a synchronization object of a foreign execution context





omp_ipr_first = -9






OpenMP reserves all negative values for properties, as listed in Table 3.1; implementation-defined properties may use zero and positive values. The special property, omp_ipr_first, will always have the lowest property value which may change in future versions of this specification. Valid values and types for the properties that Table 3.1 lists are specified in the OpenMP Additional Definitions document or are implementation defined unless otherwise specified.


Table 3.2: Required Values for the omp_interop_rc_t enum Type


enum name

description



omp_irc_no_value = 1

Parameters valid, no meaningful value available



omp_irc_success = 0

Successful, value is usable



omp_irc_empty = -1

The object provided is equal to omp_interop_none



omp_irc_out_of_range = -2

Property ID is out of range, see Table 3.1



omp_irc_type_int = -3

Property type is int; use omp_get_interop_int



omp_irc_type_ptr = -4

Property type is pointer; use omp_get_interop_ptr



omp_irc_type_str = -5

Property type is string; use omp_get_interop_str



omp_irc_other = -6

Other error; use omp_get_interop_rc_desc




Table 3.2 lists the return codes used by routines that take an int*ret_code argument.

Binding The binding task set for all interoperability routine regions is the generating task.

  3.12.1  omp_get_num_interop_properties
  3.12.2  omp_get_interop_int
  3.12.3  omp_get_interop_ptr
  3.12.4  omp_get_interop_str
  3.12.5  omp_get_interop_name
  3.12.6  omp_get_interop_type_desc
  3.12.7  omp_get_interop_rc_desc