Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

TASKLOOP SIMD

OpenMP* Fortran Compiler Directive: Specifies a loop that can be executed concurrently using SIMD instructions and that those iterations will also be executed in parallel using OpenMP* tasks.

Syntax

!$OMP TASKLOOP SIMD [clause[[,] clause]... ]

   do-loop

[!$OMP END TASKLOOP SIMD]

clause

Can be almost all of the clauses accepted by the TASKLOOP or SIMD directives with identical meanings and restrictions.

do-loop

Is one or more DO iterations (DO loops). The DO iteration cannot be a DO WHILE or a DO loop without loop control. The DO loop iteration variable must be of type integer.

All loops associated with the construct must be structured and perfectly nested; that is, there must be no intervening code and no other OpenMP* Fortran directives between any two loops.

The iterations of the DO loop are distributed across the existing team of threads. The values of the loop control parameters of the DO loop associated with a DO directive must be the same for all the threads in the team. You cannot branch out of a DO loop associated with a TASKLOOP directive.

If the END TASKLOOP SIMD directive is not specified, an END TASKLOOP SIMD directive is assumed at the end of do-loop.

The binding thread set of the TASKLOOP SIMD region is the current team. A TASKLOOP SIMD region binds to the innermost enclosing parallel region.

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 SIMD loops in a manner consistent with any clauses that apply to the SIMD construct.

The effect of any clause that applies to both constructs is as if it were applied to both constructs separately, except for the COLLAPSE clause. For the purpose of converting each task to a SIMD loop, the COLLAPSE directive is ignored, and an IN_REDUCTION clause behaves as if a REDUCTION clause, with the same reduction-identifier and list items, is applied to the SIMD construct.

This directive specifies a composite construct.