### 15.3.2 ALIGN Directive (TU*X only)

The ALIGN directive specifies that certain data objects are to be mapped (aligned) in the same way as certain other data objects.

The ALIGN directive takes one of the following forms:

  !HPF$ ALIGN a-object [(s-list)] WITH [*] a-target [(sub-list)]
  !HPF$ ALIGN [(s-list)] WITH [*] a-target [(sub-list)] :: a-object [, a-object]...
  a-object
  Is the name of the object to be aligned; it must be a simple name and not a subobject designator. This object cannot also appear in an INHERIT or DISTRIBUTE directive.
  s-list
  Is a list of one or more of the following:
  - A colon (:)

    Specifies that positions along the axis will be spread out across the matching axis of the a-target [(sub-list)].

  - An asterisk (*)

    Specifies that the axis is collapsed. Positions along that axis make no difference in determining the corresponding position within the a-target.

  - An align dummy (a scalar integer variable)

    Specifies a range over all valid index values for that dimension of the a-object.

  The length of the list must equal the rank of a-object.

  a-target
  Is the name of the object that a-object is aligned with.
  sub-list
  Is a list of one or more of the following:
  - An integer expression
  - A subscript triplet
  - An asterisk (*)
  - A subscript use expression (an integer expression that names an align dummy variable exactly once as a linear function of that variable)

Rules and Behavior

The ALIGN directive can appear only in the specification part of a scoping unit.

If a-object is scalar, the s-list (and its enclosing parentheses) must be omitted. (In some cases this will preclude the use of the first form of the directive.)

Subscripts for the ALIGN directive are restricted to the form `m * i + n`.

If an asterisk (*) follows WITH, every a-object must be a dummy argument. In this case, the asterisk indicates that the directive constitutes an assertion about the current mapping of a dummy argument on entry to a subprogram, rather than a request for a desired mapping of that dummy argument.

The following rules apply to pure procedure data items that are explicitly mapped and appear in an ALIGN directive:

- If a pure procedure dummy argument or dummy result appears in an ALIGN directive as the a-object, the a-target must be another dummy argument or dummy result. The dummy cannot appear in a DISTRIBUTE or INHERIT directive.
- If a pure procedure local variable appears in an ALIGN directive as the a-object, the a-target must be another local variable, a dummy argument, or dummy result. The variable cannot appear in a DISTRIBUTE directive.

For More Information:

- On syntax rules for all HPF directives, see Section 15.3.1.
- On pure procedures, see Section 8.5.1.2 and your user manual.

Previous Page Next Page Table of Contents