C++ 嵌套并行区域OpenMP
在OpenMP中,这意味着什么 默认情况下,嵌套并行区域是序列化的 这是否意味着线程会不断地执行此操作?我也不能低估这一部分:C++ 嵌套并行区域OpenMP,c++,openmp,C++,Openmp,在OpenMP中,这意味着什么 默认情况下,嵌套并行区域是序列化的 这是否意味着线程会不断地执行此操作?我也不能低估这一部分: A throw executed inside a parallel region must cause execution to resume within the dynamic extent of the same structured block, and it must be caught by the same thread that threw the e
A throw executed inside a parallel region must cause execution to resume within
the dynamic extent of the same structured block, and it must be caught by the
same thread that threw the exception.
如前所述(向下滚动至“17.1嵌套并行性”),默认情况下,嵌套并行区域不会并行化,因此按顺序运行。可以使用OMP\u Nested=true
(作为环境变量)或OMP\u set\u Nested(1)
(在代码中)创建嵌套线程
编辑:还有一个类似的问题。什么是嵌套并行区域嵌套并行区域是另一个并行区域内的并行区域,就像任何其他嵌套结构一样。我链接的网站有一些示例,并在Internet上搜索“openmp嵌套并行区域”给出了大量的例子和解释。