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
本文介绍如何通过OpenMP API调整并行计算中使用的线程数量。主要方法包括:调用 omp_set_num_threads 函数、使用 #pragma omp parallel num_threads 子句以及设置 OMP_NUM_THREADS 环境变量。
1290

被折叠的 条评论
为什么被折叠?



