omp_get_num_devices
– Number of target devices ¶Returns the number of available non-host devices.
The effect of running this routine in a target
region is unspecified.
Note that in GCC the function is marked pure, i.e. as returning always the same number. When GCC was not configured to support offloading, it is replaced by zero; compile with -fno-builtin-omp_get_num_devices if a run-time function is desired.
Prototype: | int omp_get_num_devices(void); |
Interface: | integer function omp_get_num_devices() |
omp_get_initial_device
– Return device number of initial device
OpenMP specification v4.5, Section 3.2.31.