]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/doc/openmp-runtime-library-routines/ompgetdevicenum.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openmp-runtime-library-routines / ompgetdevicenum.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _omp_get_device_num:
7
8 omp_get_device_num -- Return device number of current device
9 ************************************************************
10
11 Description:
12 This function returns a device number that represents the device that the
13 current thread is executing on. For OpenMP 5.0, this must be equal to the
14 value returned by the ``omp_get_initial_device`` function when called
15 from the host.
16
17 C/C++:
18 .. list-table::
19
20 * - *Prototype*:
21 - ``int omp_get_device_num(void);``
22
23 Fortran:
24 .. list-table::
25
26 * - *Interface*:
27 - ``integer function omp_get_device_num()``
28
29 See also:
30 :ref:`omp_get_initial_device`
31
32 Reference:
33 :openmp:`5.0`, Section 3.2.37.