int omp_get_max_threads(void);
SummaryThe omp_get_max_threads routine returns an upper bound on the number of threads that could be used to form a new team if a parallel construct without a num_threads clause were encountered after execution returns from this routine.
BindingThe binding task set for an omp_get_max_threads region is the generating task.
EffectThe value returned by omp_get_max_threads is the value of the first element of the nthreads-var ICV of the current task. This value is also an upper bound on the number of threads that could be used to form a new team if a parallel region without a num_threads clause were encountered after execution returns from this routine.
Note – The return value of the omp_get_max_threads routine can be used to allocate sufficient storage dynamically for all threads in the team formed at the subsequent active parallel region.