omp_get_device_from_uid (GNU libgomp)

#### 3.6.6 `omp_get_device_from_uid` – Obtain the device number to a unique id ¶

Description:

  This function returns the device number associated with the passed unique-identifier (UID) string. If no device with this UID is available, the value `omp_invalid_device` is returned. The effect of running this routine in a `target` region is unspecified.

  GCC treats the UID string case sensitive; for the initial device, GCC currently only accepts the value `OMP_INITIAL_DEVICE` and returns for it the value of `omp_initial_device`.

C/C++:

  Prototype: | `int omp_get_device_from_uid(const char *uid);`

Fortran:

  Interface: | `integer function omp_get_device_from_uid(uid)`
  | `character(len=*), intent(in) :: uid`

See also:

  `omp_get_uid_from_device` – Obtain the unique id of a device, Offload-Target Specifics

Reference:

  OpenMP specification v6.0, Section 24.7