HOME
| OPENMP API Specification: Version 5.0 November 2018

3.2.1  omp_set_num_threads

SummaryThe omp_set_num_threads routine affects the number of threads to be used for subsequent parallel regions that do not specify a num_threads clause, by setting the value of the first element of the nthreads-var ICV of the current task.

Format

SVG-Viewer needed.

 

 
void omp_set_num_threads(int num_threads);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
subroutine omp_set_num_threads(num_threads) 
integer num_threads  

SVG-Viewer needed.

Constraints on ArgumentsThe value of the argument passed to this routine must evaluate to a positive integer, or else the behavior of this routine is implementation defined.

BindingThe binding task set for an omp_set_num_threads region is the generating task.

EffectThe effect of this routine is to set the value of the first element of the nthreads-var ICV of the current task to the value specified in the argument.

Cross References