Next: Effect and Restrictions
Up: The Java Adlib API
Previous: Effect and Restrictions
Contents
A skew() method is a communication schedule for performing a skewed
shift--a shift where the shift amount is itself an array--in a particular
dimension of a distributed array placing the result in another array.
The source and destination must have the same shape and same element-type, and
they must be identically aligned.
The skew() operation does not copy values from source array that would
go past the edge of destination array, and at the other extreme of the
range elements of destination that are not targeted by elements from
source array are unchanged from their input value.
The related operation cskew() is almost identical to
skew() except that it implements a circular shift, rather then an
``edge-off'' shift.
General signature of skew() function is
where the variable
runs over all primitive types and Object,
and the notation 
# means a multiarray of arbitrary rank,
with elements of type
.
The shift argument is a multiarray. The elements of this array specifies
the amount and direction of the shift. The shift-amount array should have rank
one less than the source array.
The dimension argument is in the range 0, ...,
-1 where
is the rank
of the arrays.
The skew method is implemented by a schedule object with HPspmd
class Skew
. Each primitive type and Object has
its own schedule class.
This class has a constructor with arguments identical to the method above,
and has one public method with no arguments called execute(),
which executes the schedule.
The effective public interface of the Skew
class is
The source array is the source and the destination array is
destination.
The array of shift mounts is shift
The dimension argument selects the array dimension in which
the shift occurs. The flag mode
specifies the type of shift. It takes one of the values Adlib.CYCL,
Adlib.EDGE, or Adlib.NONE.
Subsections
Next: Effect and Restrictions
Up: The Java Adlib API
Previous: Effect and Restrictions
Contents
Bryan Carpenter
2004-06-09