作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
任何人都知道 omp_set_max_active_levels()
的范围,假设函数 A 有一个 omp 并行区域,并且在该区域中,A 的每个线程调用库函数 B,在库函数 B 中有 2 个级别的 omp 并行性。
那么,如果我们将函数A中的active omp level设置为3(A中为1,B中为2),是否可以保证库函数B的并行区域正常工作?
最佳答案
如果从事件并行区域内调用 omp_set_max_active_levels()
,则将(应该)忽略该调用。
关于c++ - omp_set_max_active_levels() 和函数调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18435425/
任何人都知道 omp_set_max_active_levels() 的范围,假设函数 A 有一个 omp 并行区域,并且在该区域中,A 的每个线程调用库函数 B,在库函数 B 中有 2 个级别的 o
我有一个具体的例子,但我也对更一般的答案感兴趣。给定以下代码和一个均匀平衡的二叉树: void mainTraverse(tree *node) { omp_set_nested(1);
我是一名优秀的程序员,十分优秀!