HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

11.2  scope Construct

Name: scope

Association: block

Category: executable

Properties: work-distribution, worksharing, thread-limiting

Clauses

allocate, firstprivate, nowait, private, reduction

Binding

The binding thread set for a scope region is the current team. A scope region binds to the innermost enclosing parallel region. Only the threads of the team that executes the binding parallel region participate in the execution of the structured block and the implied barrier of the scope region if the barrier is not eliminated by a nowait clause.

Semantics

The scope construct specifies that all threads in a team execute the associated structured block and any additionally specified OpenMP operations. An implicit barrier occurs at the end of a scope region if the nowait clause is not specified.

Execution Model Events

The scope-begin event occurs after an implicit task encounters a scope construct but before the task starts to execute the structured block of the scope region.

The scope-end event occurs after an implicit task finishes execution of a scope region but before it resumes execution of the enclosing region.

Tool Callbacks

A thread dispatches a registered ompt_callback_work callback with ompt_scope_begin as its endpoint argument and ompt_work_scope as its work_type argument for each occurrence of a scope-begin event in that thread. Similarly, a thread dispatches a registered ompt_callback_work callback with ompt_scope_end as its endpoint argument and ompt_work_scope as its work_type argument for each occurrence of a scope-end event in that thread. The callbacks occur in the context of the implicit task. The callbacks have type signature ompt_callback_work_t.

Cross References