omp_set_num_threads

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Sets the number of threads in subsequent parallel regions, unless overridden by a num_threads clause.

void omp_set_num_threads(  
   int num_threads  
);  

where,

num_threads
The number of threads in the parallel region.

For more information, see 3.1.1 omp_set_num_threads Function.

See omp_get_num_threads for an example of using omp_set_num_threads.

Functions

Show: