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

15.4  taskgroup Construct

Name: taskgroup

Association: block

Category: executable

Properties: cancellable

Clauses

allocate, task_reduction

Binding

The binding task set of a taskgroup region is all tasks of the current team that are generated in the region. A taskgroup region binds to the innermost enclosing parallel region.

Semantics

The taskgroup construct specifies a wait on completion of the taskgroup set associated with the taskgroup region. When a thread encounters a taskgroup construct, it starts executing the region.

An implicit task scheduling point occurs at the end of the taskgroup region. The current task is suspended at the task scheduling point until all tasks in the taskgroup set complete execution.

Execution Model Events

The taskgroup-begin event occurs in each thread that encounters the taskgroup construct on entry to the taskgroup region.

The taskgroup-wait-begin event occurs when a task begins an interval of active or passive waiting in a taskgroup region.

The taskgroup-wait-end event occurs when a task ends an interval of active or passive waiting and resumes execution in a taskgroup region.

The taskgroup-end event occurs in each thread that encounters the taskgroup construct after the taskgroup synchronization on exit from the taskgroup region.

Tool Callbacks

A thread dispatches a registered ompt_callback_sync_region callback with ompt_sync_region_taskgroup as its kind argument and ompt_scope_begin as its endpoint argument for each occurrence of a taskgroup-begin event in the task that encounters the taskgroup construct. Similarly, a thread dispatches a registered ompt_callback_sync_region callback with ompt_sync_region_taskgroup as its kind argument and ompt_scope_end as its endpoint argument for each occurrence of a taskgroup-end event in the task that encounters the taskgroup construct. These callbacks occur in the task that encounters the taskgroup construct and have the type signature ompt_callback_sync_region_t.

A thread dispatches a registered ompt_callback_sync_region_wait callback with ompt_sync_region_taskgroup as its kind argument and ompt_scope_begin as its endpoint argument for each occurrence of a taskgroup-wait-begin event. Similarly, a thread dispatches a registered ompt_callback_sync_region_wait callback with ompt_sync_region_taskgroup as its kind argument and ompt_scope_end as its endpoint argument for each occurrence of a taskgroup-wait-end event. These callbacks occur in the context of the task that encounters the taskgroup construct and have type signature ompt_callback_sync_region_t.

Cross References