]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/doc/openmp-runtime-library-routines/ompgetancestorthreadnum.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openmp-runtime-library-routines / ompgetancestorthreadnum.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_ancestor_thread_num:
7
8 omp_get_ancestor_thread_num -- Ancestor thread ID
9 *************************************************
10
11 Description:
12 This function returns the thread identification number for the given
13 nesting level of the current thread. For values of :samp:`{level}` outside
14 zero to ``omp_get_level`` -1 is returned; if :samp:`{level}` is
15 ``omp_get_level`` the result is identical to ``omp_get_thread_num``.
16
17 C/C++:
18 .. list-table::
19
20 * - *Prototype*:
21 - ``int omp_get_ancestor_thread_num(int level);``
22
23 Fortran:
24 .. list-table::
25
26 * - *Interface*:
27 - ``integer function omp_get_ancestor_thread_num(level)``
28 * -
29 - ``integer level``
30
31 See also:
32 :ref:`omp_get_level`, :ref:`omp_get_thread_num`, :ref:`omp_get_team_size`
33
34 Reference:
35 :openmp:`4.5`, Section 3.2.18.