]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/doc/openmp-runtime-library-routines/ompinparallel.rst
sphinx: copy files from texi2rst-generated repository
[thirdparty/gcc.git] / libgomp / doc / openmp-runtime-library-routines / ompinparallel.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_in_parallel:
7
8 omp_in_parallel -- Whether a parallel region is active
9 ******************************************************
10
11 Description:
12 This function returns ``true`` if currently running in parallel,
13 ``false`` otherwise. Here, ``true`` and ``false`` represent
14 their language-specific counterparts.
15
16 C/C++:
17 .. list-table::
18
19 * - *Prototype*:
20 - ``int omp_in_parallel(void);``
21
22 Fortran:
23 .. list-table::
24
25 * - *Interface*:
26 - ``logical function omp_in_parallel()``
27
28 Reference:
29 :openmp:`4.5`, Section 3.2.6.