Next:
Argument Passing and Up: Storage Association Previous: Storage Association Discussion

## Examples of Storage Association

IMPLICIT REAL (A-Z) COMMON /FOO/ A(100), B(100), C(100), D(100), E(100) DIMENSION X(100), Y(150), Z(200), ZZ(300)

EQUIVALENCE ( A(1), Y(1) ) !Aggregate variable group is not mappable. !Sizes are: 200, 100, 100, 100.

EQUIVALENCE ( B(100), Y(1) ), ( B(1), ZZ(1) ) !Aggregate variable group is mappable only by mapping ZZ. !ZZ is an aggregate cover for B, C, D, and Y. !Sizes are: 100, 300, 100.

EQUIVALENCE ( E(1), Y(1) ) !Aggregate variable group is mappable by mapping Y. !Sizes are: 100, 100, 100, 100, 150.

COMMON /TWO/ A(20,40),E(10,10),G(10,100,1000),H(100),P(100) REAL COVER(200) EQUIVALENCE (COVER(1), H(1)) !HPF\$ ALIGN E ... !HPF\$ SEQUENCE A, Z !HPF\$ DISTRIBUTE Z (CYCLIC(2)) There are four components of the same size in both occurrences. Components one and four are sequential. Components two and four are explicitly mapped, with the same type, shape and mapping attributes.

The first component, A, must be declared sequential in both occurrences because its shape is different. It may not be explicitly mapped in either because it is not rank-one or scalar in the first.

E and G must agree in type and shape in both occurrences. E must have the same explicit mapping and G must have no explicit mapping in both occurrences, since they are nonsequential variables.

The fourth component must have the same explicit mapping in both occurrences, and must be made sequential explicitly in the second.

paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994