Next: Distribution directives Up: Data Distribution Previous: Decomposition directives

Alignment directives

An alignment directive aligns one array to another array. Arrays aligned with each other share a common ``data parallelism''. Alignment directives specify which elements of two arrays are to be allocated together by aligning each axis of a source array with a given target array.

An alignment-directive is:
ALIGN source-spec WITH target-spec

A source-spec is:
source-array-name (index-name-list )

A target-spec is:
target-array-name (target-axis-spec-list )

A target-axis-spec is one of:

A stride-value is:
integer-constant

An offset-value is:
integer-constant

An index-value is:
[-] integer-constant

The number of index-names in a source-spec must equal the rank of the source array. The number of target-axis-specs in a target-spec must equal the rank of the target array.

The following examples of alignment directives specify different alignment patterns:
1. Alignment offsets:
ALIGN A(I,J) with X(I-1,J+1)
2. Alignment strides:
ALIGN B(I,J) with X(I2,J2)
3. Embedding:
ALIGN C(I) with X(I,2)
4. Permutation:
ALIGN D(I,J) with X(J,I)
5. Collapse:
ALIGN E(I,*) with Y(I)
6. Replication:
ALIGN F(I) with X(I,*)

Alignment is usually machine independent. A complete specification of the alignment directive is available in [1].


zbozkus@
Thu Jul 6 21:09:19 EDT 1995