HOME
| OPENMP API Specification: Version 5.0 November 2018

2.13.3  parallel sections Construct

SummaryThe 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 
    [#pragma omp section new-line 
        structured-block] 
    ... 
    }  

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 
    [!$omp section 
        structured-block] 
    ... 
!$omp end parallel sections  

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

The last section ends at the end parallel sections directive. nowait cannot be specified on an end parallel sections directive.

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.

RestrictionsThe restrictions for the parallel construct and the sections construct apply.

Cross References

SVG-Viewer needed.