]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
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_set_num_threads: | |
7 | ||
8 | omp_set_num_threads -- Set upper team size limit | |
9 | ************************************************ | |
10 | ||
11 | Description: | |
12 | Specifies the number of threads used by default in subsequent parallel | |
13 | sections, if those do not specify a ``num_threads`` clause. The | |
14 | argument of ``omp_set_num_threads`` shall be a positive integer. | |
15 | ||
16 | C/C++: | |
17 | .. list-table:: | |
18 | ||
19 | * - *Prototype*: | |
20 | - ``void omp_set_num_threads(int num_threads);`` | |
21 | ||
22 | Fortran: | |
23 | .. list-table:: | |
24 | ||
25 | * - *Interface*: | |
26 | - ``subroutine omp_set_num_threads(num_threads)`` | |
27 | * - | |
28 | - ``integer, intent(in) :: num_threads`` | |
29 | ||
30 | See also: | |
31 | :ref:`OMP_NUM_THREADS`, :ref:`omp_get_num_threads`, :ref:`omp_get_max_threads` | |
32 | ||
33 | Reference: | |
3ed1b4ce | 34 | :openmp:`4.5`, Section 3.2.1. |