OpenMP - How does the thread decide when to defer a task and when to execute immediately
问题 The OpenMP specification document says that "When a thread encounters a task construct, it may choose to execute the task immediately or defer its execution until a later time". However, the specification does not say how this choice is made. How does the thread decide when to execute the task immediately and when to defer the execution? If this is implementation specific, how does compilers like gcc solve this? 回答1: There are two conditions coming from the standard: When an if clause is