Next: Conditions for Omitting Explicit
Up: Data Mapping in Subprogram Interfaces
Previous: Example
The set of mappings of named objects is endowed with a partial order
modulo a certain equivalence. Roughly speaking, if and
are two mappings, then to say that is a specialization of
(i.e., `` is below '' in this ordering) is to say that
is partially specified and that is one of the mappings
that is consistent with . This notion is used below in
Section 4.6, and also in
Section 8.8.
The precise definition is as follows.
First, we define a notion of equivalence for dist-format
specifications:
- Using the notation for the phrase ``is equivalent to'',
BLOCK = BLOCK
CYCLIC = CYCLIC
* = *
BLOCK(n) = BLOCK(m) iff m and n have the same value
CYCLIC(n) = CYCLIC(m) iff m and n have the same value
CYCLIC = CYCLIC(1)
- Other than this, no two lexically distinct dist-format
specifications are equivalent.
This is an equivalence relation in the usual mathematical sense.
Now we define the partial order on mappings: Let S (``special'')
and G (``general'') be two data objects.
The mapping of S is a specialization of the mapping of
G if and only if either:
- G has the INHERIT attribute, or
- S does not have the INHERIT attribute, and the
following constraints all hold:
- S is a named object, and
- The shapes of the ultimate align targets of S and
G are the same, and
- Corresponding dimensions of S and G are
mapped to corresponding dimensions of their respective ultimate
align targets, and corresponding elements of S and
G are aligned with corresponding elements of their
respective ultimate align targets, and
- Either
- The ultimate align targets of both S and G
are not explicitly distributed, or
- The ultimate align targets of both S and G
are explicitly distributed. In this case, the distribution
directive specified for the ultimate align target of G
must satisfy one of the following conditions:
- It has no dist-onto-clause, or
- It has a dist-onto-clause of
``ONTO *'', or
- It has a dist-onto-clause specifying a
processor arrangement having the same shape as that
explicitly specified in a distribution directive for the
ultimate align target of S.
and must also satisfy one of the following conditions:
- It has no dist-format-clause, or
- It has a dist-format-clause of ``*'', or
- Each dist-format is equivalent (in the sense
defined above) to the dist-format in the
corresponding position of the dist-format-clause in
an explicit distribution directive for the ultimate align
target of S.
With this definition,
- Any mapping of a named object is a specialization of itself.
- If , , and are named objects, and if the mapping
of is a specialization of the mapping of and the mapping
of is a specialization of the mapping of , then the
mapping of is a specialization of the mapping of .
That is, the specialization relation, as applied to mappings of named
objects, is reflexive and transitive, and it can therefore be applied
to produce an equivalence relation on the set of mappings of named
objects: two such mappings can be said to be equivalent iff each is a
specialization of the other. With this definition, the specialization
relation yields a partial ordering on the set of mappings of named
objects, modulo equivalence. The INHERIT mapping is the
unique maximal element in this partial order.
Next: Conditions for Omitting Explicit
Up: Data Mapping in Subprogram Interfaces
Previous: Example