next up previous contents index
Next: Procedure Prototypes Up: Declarations Previous: Rank Defined Arrays

Implicit Storage for Parallel Variables

     

Of Regions are viewed as boundary conditions, so in some cases storage is implicitly extended for parallel arrays that are modified in the context of an Of Region. The region must be of the form [dir of R], where dir is some direction and R is the region that was used to declare the variable. Variables that are accessed but not modified in an Of Region do not define implicit storage because the intent of this mechanism is to provide a simple means of both allocating and initializing boundary conditions. Examples are shown below.

    region  R  = [1..n, 1..n];
            R2 = [2..n+1, 2..n+1];
            E  = east of R;
    
    var     A, B, C: [R] float;-- A, B and C declared to have the same base size

    . . .

[east of R]  A := 1.0;      -- A's storage is implicitly extended to include
                            -- [east of R]
[E]          B := 1.0;      -- B's storage is implicitly extended since E is
                            -- a synonym for "east of R"
[E]          write(C);      -- No implicit extension of storage since C is not
                            -- modified by this statement.
[east of R2] A := 0.0;      -- Error.  No implicit extension of storage since R2
                            -- is not the base region for A.

Note that it is an error to reference a parallel variable outside of its defined storage. Thus, the following is illegal.

    var     A, B : [R] float;

    . . .

[east of R] A := 1.0;       -- implicit storage defined for A
[R]         A := B@east;    -- error: no implicit storage defined for B



Kay Nettle
Fri Feb 21 21:14:29 CST 1997