The scheme is illustrated in Figure A.35. The basic operation is simple. Most of the complications come from the run-time checks need to ensure one doesn't produce an illegally distributed result.
is a range element of the form
the macros RESTRICT_DIST_GROUP and CHECK_DIMENSION
are defined as
The restrict() calls may throw a DimensionNotInGroupException
runtime exception if the location belongs to a range whose process
dimension is not in
.grp(). Similarly, one of the calls to checkRestriction() will throw a DimensionNotInGroupException
if any of the original array ranges is distributed over this process
dimension--the restriction is supposed to occur in a dimension over
which the array is replicated.
If the array is a sequential array that was created in non-HPspmd code, will be null and a NullPointerException will be thrown.