Next: omp_get_proc_bind, Previous: omp_get_num_teams, Up: Runtime Library Routines [Contents][Index]
omp_get_num_threads– Size of the active team
Returns the number of threads in the current team. In a sequential section of
omp_get_num_threads returns 1.
The default team size may be initialized at startup by the
OMP_NUM_THREADS environment variable. At runtime, the size
of the current team may be set either by the
clause or by
omp_set_num_threads. If none of the above were
used to define a specific value and
OMP_DYNAMIC is disabled,
one thread per CPU online is used.
omp_get_max_threads, omp_set_num_threads, OMP_NUM_THREADS
OpenMP specification v4.5, Section 3.2.2.