next up previous contents
Next: Skew Up: Shift Previous: Shift   Contents

Effect and Restrictions

Effect:
On exit, if mode is Adlib.CYCL, cshift(), the value of


  destination [
$ x_0, \ldots , x_{\mbox{\tt dim}}, \ldots , x_{R - 1}$]
is


  source [
$ x_0, \ldots ,
x_{\mbox{\tt dim}} + \mbox{\tt shift} \ \bmod N,
\ldots , x_{R - 1}$]
where $ N$ is the extent of dimension dim. If mode is Adlib.EDGE, shift(), the exit value of the destination element is


  source [
$ x_0, \ldots ,
x_{\mbox{\tt dim}} + \mbox{\tt shift},
\ldots , x_{R - 1}$]
if $ x_{\mbox{\tt dim}} + \mbox{\tt shift}$ is in the range $ 0, \ldots , N - 1$, or unchanged from the entry value, if not. If mode is Adlib.NONE executing the schedule has no effect.
Value restrictions:
The value of dimension must be in the range 0, ...,$ R$-1 where $ R$ is the rank of the source array.
Type restrictions:
The elements of the source and destination arrays must have the same type if primitive. If the element types are Object, subtypes of all objects referenced by elements of the source array must be assignable to elements of the destination array.
Shape restrictions:
The source and destination array must have the same shape.
Alignment restrictions:
The source array must be aligned with the destination array.
Containment restrictions:
The source and destination arrays must be fully contained in the active progess group.
Overlap restrictions:
In-place updates are not allowed. The source and destination arrays must not overlap--no element of source array must be an alias for an element of the destination array. This is only an issue if both arguments are sections of the same array.
Replicated data:
If the arrays have replicated mapping, values for individual copies of the destination are generally taken from the nearest copy of the corresponding source array element. The definition of ``nearest'' is implementation dependent. This schedule does not implement a broadcast--consistent replication of copies in the destination array depends on consistency of copies in the source array.

next up previous contents
Next: Skew Up: Shift Previous: Shift   Contents
Bryan Carpenter 2004-06-09