XcalableACC: An Integration of XcalableMP and OpenACC
133
2.5.3 layout Clause
The layout clause specifies data or work mapping on devices.
The layout clause may appear on declare directives and on loop,
parallel loop, and kernels loop constructs. If the layout clause
appears on a declare directive, it specifies the data mapping to the device set for
arrays which are appeared in data clauses on the directive. “ * ” represents that the
dimension is not distributed, and block represents that the dimension is divided
into contiguous blocks, which are distributed onto the device array.
Example
Figure 10 is an example of the layout clause. In line 2, the devices directive
defines a device set d. In lines 3–4, the declare directive declares that an array
a is distributed and allocated on d. In lines 6–9, the kernels loop directive
distributes and offloads the following loops to d.
2.5.4 shadow Clause
The shadow clause in the declare directive specifies the width of the shadow
area of arrays, which is used to communicate the neighbor element of the block of
the arrays.
Example
Figure 11 is an example of the shadow clause. In line 2, the devices directive
defines a device set d. In lines 3–5, the declare directive declares that an array
a is distributed and allocated with shadow areas on the device set d. In lines 7–10,
the kernels loop construct divides and offloads the loop to the device set d. In
Fig. 10 Xacc Code example with layout clause
Précédent

- 140/265

Suivant