15.3.8 SHADOW Directive (TU*X only)

The SHADOW directive lets you manually set shadow-edge widths for each dimension in an array.

The SHADOW directive takes the following form:

!HPF$ SHADOW s-object (shadow-spec)

s-object
Is the name of array or array component.


shadow-spec
Is a list of one or more shadow specifications in the form width or low-width : high-width, where width is an integer expression greater than or equal to zero.

Rules and Behavior

The SHADOW directive lets you manually set shadow-edge widths for array dimensions.

Shadow edges are allocated by the compiler to hold copies of array elements that are near neighbors to each processor's edge elements.

The compiler automatically tries to determine appropriate shadow-edge widths for all dimensions of arrays that do not appear in a SHADOW directive.

This directive is most useful and efficient in the following situations:

You can limit shadow-edge widths to a maximum value by using the -nearest_neighbor compiler option.

An optional double colon (::) can appear between the shadow-spec and the name of the object. For example, the following two lines are equivalent:

  !HPF$ SHADOW A(3,2,0)
  !HPF$ SHADOW (3,2,0) :: A

Examples

Consider the following example:

         REAL A(1000, 1000, 1000)
  !HPF$ DISTRIBUTE A(BLOCK, BLOCK, BLOCK)
  !HPF$ SHADOW A(3,2,0)

In this case, shadow edges 3 array elements wide will be allocated for the first dimension of array A. Shadow edges 2 array elements wide will be allocated for the second dimension of A. No shadow storage will be allocated for the third dimension, because a shadow-edge width of zero is specified.

For More Information:

For details on syntax rules for all HPF directives, see Section 15.3.1.


Previous Page Next Page Table of Contents