HOME
| OPENMP API Specification: Version 5.1 November 2020

2.16.3  parallel sections Construct

Summary The parallel sections construct is a shortcut for specifying a parallel construct containing a sections construct and no other statements.

Syntax

SVG-Viewer needed.

The syntax of the parallel sections construct is as follows:  

 
#pragma omp parallel sections [clause[ [,] clause] ... ] new-line 
    { 
    [#pragma omp section new-line] 
        structured-block-sequence 
    [#pragma omp section new-line 
        structured-block-sequence] 
    ... 
    }  

where clause can be any of the clauses accepted by the parallel or sections directives, except the nowait clause, with identical meanings and restrictions.

SVG-Viewer needed.

SVG-Viewer needed.

The syntax of the parallel sections construct is as follows:  

 
!$omp parallel sections [clause[ [,] clause] ... ] 
    [!$omp section] 
        structured-block-sequence 
    [!$omp section 
        structured-block-sequence] 
    ... 
!$omp end parallel sections  

where clause can be any of the clauses accepted by the parallel or sections directives, with identical meanings and restrictions.

SVG-Viewer needed.

Description

SVG-Viewer needed.

The semantics are identical to explicitly specifying a parallel directive immediately followed by a sections directive.

SVG-Viewer needed.

SVG-Viewer needed.

The semantics are identical to explicitly specifying a parallel directive immediately followed by a sections directive, and an end sections directive immediately followed by an end parallel directive.

SVG-Viewer needed.

Restrictions The restrictions for the parallel construct and the sections construct apply.

Cross References

SVG-Viewer needed.