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