Chapter 18. PGI Accelerator Compilers Reference
cache (list)]
host [(width)]
independent
kernel
parallel [(width)]
private( list)
seq [(width)]
shortloop
unroll [(width)]
vector [(width)]
Description
An accelerator loop mapping directive applies to a loop which must appear on the following line. It can describe what type of parallelism to use to execute the loop and declare loop-private variables and arrays.
Combined Directive
The combined accelerator region and loop mapping directive is a shortcut for specifying a loop directive nested immediately inside an accelerator region directive. The meaning is identical to explicitly specifying a region construct containing a loop directive. Any clause that is allowed in a region directive or a loop directive is allowed in a combined directive.
Syntax
In C, the syntax of the combined accelerator region and loop directive is:
#pragma acc region for [clause [, clause]...] new-line
for loop
In Fortran the syntax of the combined accelerator region and loop directive is:
!$acc region do [clause [, clause]...]
do loop where
clause
is any of the region or loop clauses described previously in this chapter.
The associated region is the body of the loop which must immediately follow the directive.
Restrictions
The following restrictions apply to a combined directive:
• The combined accelerator region and loop directive may not appear within the body of another accelerator region.
• All restrictions for the region directive and the loop directive apply.
Accelerator Declarative Data Directive
Declarative data directives specify that an array or arrays are to be allocated in the device memory for the duration of the implicit data region of a function, subroutine, or program. They also specify whether the data values are to be transferred from the host to the device memory upon entry to the implicit data region, and from the device to the host memory upon exit from the implicit data region.
321