In the last section triplet section subscripts motivated us to define
subranges as a new
kind of range. Likewise, scalar section subscripts drive us to define
a new kind of group. A restricted group is defined to be
the subset of processes in some parent group to which a particular
location is mapped. In the current example, the distribution group of
b is defined to be the subset of processes in p to which
the location x is mapped.
The division operator is overloaded to describe these subgroups,
The distribution group of b is equivalent to q, defined by
In a sense the definition of a restricted group was tacit in the definition
of an abstract location. Without formally defining the idea, we
used it implicitly in section 2.5. In Figure
2.7 of that section the set of processes with
coordinates , and , to which location x
is mapped, can be written as
The restricted groups introduced here have a simple concrete representation. A restricted group can be specified by its set of effective process dimensions and the identity of the lead process in the group--the process with coordinate zero relative to the dimensions effective in the group. The dimension set can be specified as a subset of the dimensions of the parent grid using a simple bitmask. The identity of the lead process can be specified through a single integer ranking the processes of the parent grid. So a general HPJava group can be parametrized by a reference to the parent Procs object, plus just two int fields. It turns out that this representation is not only compact; it also lends itself to efficient computation of the most commonly used operations on groups.
Notice by the way that the inquiry function dim() is a member of the Procs class (the process grid class), not the superclass Group, which also embraces restricted groups.