http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-371AAA48-F691-4F8A-998C-4BD761817B12.htm
Using the OpenMP* API
The OpenMP* API specification provides the following standard ways to change the desired number of threads on the coprocessor:
-
Calling the function omp_set_num_threads(n) before the omp parallel region
-
Using the clause #pragma omp parallel num_threads(n)
-
Setting the environment variable OMP_NUM_THREADS=n