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.
6 .. _omp_get_ancestor_thread_num:
8 omp_get_ancestor_thread_num -- Ancestor thread ID
9 *************************************************
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``.
21 - ``int omp_get_ancestor_thread_num(int level);``
27 - ``integer function omp_get_ancestor_thread_num(level)``
32 :ref:`omp_get_level`, :ref:`omp_get_thread_num`, :ref:`omp_get_team_size`
35 :openmp:`4.5`, Section 3.2.18.