next up previous contents index
Next: Region Scope Rules Up: Regions Previous: Regions

Derived Regions

           

The of, in, and at operators provide ways to derive new regions relative to some existing region. For example, the of operator is used to refer to adjacent regions as shown below:

    direction east = [0,1];
    region    R    = [1..n, 1..m];
              E    = east of R;
Here, the region [E] is adjacent to [R] in the east direction, so it has the indices 1..n, m+1..m+1. Section 5.3.6 provides additional details. The in operator is similar to the of operator except it refers to a region that is completely contained by [R]. The at operator translates the indices of a region by the specified direction.

Note that both [E] and [east of R] are considered to be ``Of Regions.'' Thus, the following two statements are equivalent.

    [east of R] wrap A;
    [E]         wrap A;
However, a subtle detail is that [E] and [east of R] differ in their effects on memory allocation. First, unnamed Of Regions, such as [east of R], are not used when determining the data partitioning. This is consistent with the view that these regions serve primarily to define boundary conditions. By contrast, the indices in [E] are used to determine data partitioning. Second, implicit storage (defined in Section 4.2.4) is defined for unnamed Of Regions but not for named Of Regions.



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