Sliced Expressions

A parallel variable may have a parallel index which denotes a sequence of positions within the parallel variable. The sequence denoted by a slice experssion is as follows:

 [first:last:stride]pvar ...
The first expression denotes the first position in the sequence. The last expression denotes a limit for the last position in the sequence. The stride expression denotes a stride or increment between successive positions in the sequence.

The "shape" of a sliced expression has a rank that is equal to the rank of the parallel variable where the size of each dimension is equal to the active positions determined by the sliced expression. This is used to determine conformability between sliced parallel variables with a parallel expression.

 shape [100][100]S;
 int:S x, y;
 ...
 [1][0:99:10]x;  /* Denotes the sequence [1] in the first axis, and
                    {0,10,20,30,40,50,60,70,80,90} in the second axis;
                    the shape of the result is "shape [1][10]" */

 [1][0:99:10]x = [1][0:99:10]y;   /* conformable: the resulting "shape"
                                     of each sliced expression is the same */

 [1][0:99:10]x = y;   /* nonconformable: the "shape" of the sliced expression
                         for parallel variable x is [1][10] while the
                         shape of y is [100][100]. */

Options:

©1995 Pacific-Sierra Research Corporation. All rights reserved.

Send comments or suggestions to dpce2 at crescentbaysoftware.com.