HOME
| OPENMP API Specification: Version 5.1 November 2020

2.12.3  taskloop simd Construct

Summary The taskloop simd construct specifies a loop that can be executed concurrently using SIMD instructions and that those iterations will also be executed in parallel using explicit tasks. The taskloop simd construct is a composite construct.

Syntax

SVG-Viewer needed.

The syntax of the taskloop simd construct is as follows:  

 
#pragma omp taskloop simd [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 taskloop or simd directives with identical meanings and restrictions.

SVG-Viewer needed.

SVG-Viewer needed.

The syntax of the taskloop simd construct is as follows:  

 
!$omp taskloop simd [clause[[,] clause] ...] 
    loop-nest 
[!$omp end taskloop simd]  

where loop-nest is a canonical loop nest and clause can be any of the clauses accepted by the taskloop or simd directives with identical meanings and restrictions.

If an end taskloop simd directive is not specified, an end taskloop simd directive is assumed at the end of the do-loops.

SVG-Viewer needed.

Binding The binding thread set of the taskloop simd region is the current team. A taskloop simd region binds to the innermost enclosing parallel region.

Description The taskloop simd construct first distributes the iterations of the associated loops across tasks in a manner consistent with any clauses that apply to the taskloop construct. The resulting tasks are then converted to a SIMD loop in a manner consistent with any clauses that apply to the simd construct, except for the collapse clause. For the purposes of each task’s conversion to a SIMD loop, the collapse clause is ignored and the effect of any in_reduction clause is as if a reduction clause with the same reduction operator and list items is present on the simd construct.

Execution Model Events This composite construct generates the same events as the taskloop construct.

Tool Callbacks This composite construct dispatches the same callbacks as the taskloop construct.

Restrictions Restrictions to the taskloop simd construct are as follows:

Cross References