COLLAPSE (n). STMicroelectronics PGI
Reklamë
Reklamë
Chapter 17. OpenMP Reference Information
• An omp threadprivate variable must not have an incomplete type or a reference type.
WORKSHARE ... END WORKSHARE
The OpenMP WORKSHARE … END WORKSHARE Fortran directive pair provides a mechanism to effect parallel execution of non-iterative but implicitly data parallel constructs.
Syntax:
!$OMP WORKSHARE
< Fortran structured block to be executed in parallel >
!$OMP END WORKSHARE [NOWAIT]
Usage:
The Fortran structured block enclosed by the WORKSHARE … END WORKSHARE directive pair can consist only of the following types of statements and constructs:
• Array assignments
• Scalar assignments
• FORALL statements or constructs
• WHERE statements or constructs
• OpenMP ATOMIC, CRITICAL or PARALLEL constructs
The work implied by these statements and constructs is split up between the threads executing the
WORKSHARE construct in a way that is guaranteed to maintain standard Fortran semantics. The goal of the WORKSHARE construct is to effect parallel execution of non-iterative but implicitly data parallel array assignments, FORALL, and WHERE statements and constructs intrinsic to the Fortran language beginning with
Fortran 90. The Fortran structured block contained within a WORKSHARE construct must not contain any userdefined function calls unless the function is ELEMENTAL.
Directive and Pragma Clauses
Some directives and C/C++ pragmas accept clauses that further allow a user to control the scope attributes of variables for the duration of the directive or pragma. Not all clauses are allowed on all directives or pragmas, so the clauses that are valid are included with the description of the directive or pragma. Typically, if no data scope clause is specified for variables, the default scope is
shared
.
Table 5.2, “Directive and Pragma Clauses Summary Table ,” on page 62
provides a brief summary of the clauses associated with OpenMP directives and pragmas that PGI supports. This section contains more information about each of these clauses. For complete information and more details related to use of these clauses, refer to the OpenMP documentation available on the WorldWide Web.
COLLAPSE (n)
The COLLAPSE(n) clause specifies how many loops are associated with the loop construct.
309
Shkarko
Reklamë