| OPENMP API Specification: Version 5.0 November 2018

2.8  Worksharing Constructs

A worksharing construct distributes the execution of the corresponding region among the members of the team that encounters it. Threads execute portions of the region in the context of the implicit tasks that each one is executing. If the team consists of only one thread then the worksharing region is not executed in parallel.

A worksharing region has no barrier on entry; however, an implied barrier exists at the end of the worksharing region, unless a nowait clause is specified. If a nowait clause is present, an implementation may omit the barrier at the end of the worksharing region. In this case, threads that finish early may proceed straight to the instructions that follow the worksharing region without waiting for the other members of the team to finish the worksharing region, and without performing a flush operation.

The OpenMP API defines the worksharing constructs that are described in this section as well as the worksharing-loop construct, which is described in Section 2.9.2 on page 288.

  2.8.1  sections Construct
  2.8.2  single Construct
  2.8.3  workshare Construct

RestrictionsThe following restrictions apply to worksharing constructs: