lmseq
lmseq changes the number of elements in one region of one direction of the open part.
Syntax
lmseq direction left delta
direction:i,jork.left: the reduced index on the left side of the region. It runs from1to one less than the number of reduced indices in that direction.delta: a signed whole number added to the region’s element count.
What it does
lmseq resizes the single region between reduced index left and the next one. The region’s right end and every index list entry after it grow by delta. The coordinates and the number of partitions stay the same.
When James applies it
When it is read, in the Part phase, as mseq does: James folds it into the part’s index list at once. lmseq stores nothing of its own, so a later insprt does not renumber it. An lmseq written after an insprt reads the numbering the insprt made.
Rules James adds
- A
deltathat would leave the region with fewer than one element is refused. lmseqafter a coordinate equation is accepted, asmseqis (tests/corpus/270-lmseq-after-equation-accepted).updateis not supported in this version (E0100); once it is,lmseqafter it will be refused (E0408), asmseqwill be.- A number written in an equation, such as the
3ofi .eq. 3or the14of(j-14)/3, names a node of the part’s final lattice, so anlmseqwritten after the equation changes which node it names.%idxlist(n)names the n-th partition whatever the lattice (x=).
Diagnostics
- E0407: the direction is not
i,jork,leftis outside its range, an argument is not a whole number, or the region would shrink below one element.
Example
The script tests/corpus/115-lmseq-folds-single-region/input.tg, which make test runs:
block
1 3 5 7;1 3;1 6 8 13;
1 3 5 7;1 3;1 3 5 7;
lmseq k 2 4
endpart
lmseq k 2 4 adds 4 elements to the k region that begins at reduced index 2. The k list 1 6 8 13 becomes [1 6 12 17]: the region’s right end and every entry after it grow by 4.