3.6.7 omp_get_uid_from_device – Obtain the unique id of a device

Description:

This function returns a pointer to a string that represents a unique identifier (UID) for the device specified by device_num. It returns a NULL (C/C++) or a disassociated pointer (Fortran) for omp_invalid_device. The effect of running this routine in a target region is unspecified.

GCC currently returns for initial device the value OMP_INITIAL_DEVICE.

C/C++:
Prototype:const char *omp_get_uid_from_device(int device_num);
Fortran:
Interface:character(:) function omp_get_uid_from_device(device_num)
Interface:pointer :: omp_get_uid_from_device
integer, intent(in) :: device_num
See also:

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

Reference:

OpenMP specification v6.0, Section 24.8