We will refer to a block of code enclosed by a TASK_REGION ... END TASK_REGION pair as a task region. The TASK_REGION directives are a way for the programmer to assert that a section of code satisfies a set of conditions. The compiler is expected to use these assertions to generate task-parallel code.
A task region can contain blocks of code that are directed to execute ON processor subsets. All other code executes on a subset that contains all active processors. Every ON block at the outermost nesting level (i.e., not inside another ON block or another task region) inside a task region is defined as a lexical task. Every execution instance of a lexical task is defined as an execution task and will also be referred to as just task when the distinction is clear from the context. An execution task is associated with a set of active processors discussed earlier in this chapter.
The following restrictions must hold inside a task region: