3.6.4 omp_get_num_devices – Number of target devices

Description:

Returns the number of target devices.

The effect of running this routine in a target region is unspecified.

C/C++:
Prototype:int omp_get_num_devices(void);
Fortran:
Interface:integer function omp_get_num_devices()
Reference:

OpenMP specification v4.5, Section 3.2.31.