HOME
| OPENMP API Specification: Version 5.1 November 2020

2.16.17  Target Parallel Worksharing-Loop Construct

Summary The target parallel worksharing-loop construct is a shortcut for specifying a target construct containing a parallel worksharing-loop construct and no other statements.

Syntax

SVG-Viewer needed.

The syntax of the target parallel worksharing-loop construct is as follows:  

 
#pragma omp target parallel for [clause[ [,] clause] ... ] new-line 
    loop-nest  

where loop-nest is a canonical loop nest and clause can be any of the clauses accepted by the target or parallel for directives, except for copyin, with identical meanings and restrictions.

SVG-Viewer needed.

SVG-Viewer needed.

The syntax of the target parallel worksharing-loop construct is as follows:  

 
!$omp target parallel do [clause[ [,] clause] ... ] 
    loop-nest 
[!$omp end target parallel do]  

where loop-nest is a canonical loop nest and clause can be any of the clauses accepted by the target or parallel do directives, except for copyin, with identical meanings and restrictions.

If an end target parallel do directive is not specified, an end target parallel do directive is assumed at the end of the loop-nest.

SVG-Viewer needed.

Description The semantics are identical to explicitly specifying a target directive immediately followed by a parallel worksharing-loop directive.

Restrictions The restrictions for the target and parallel worksharing-loop constructs apply except for the following explicit modifications:

Cross References