lmseq

lmseq changes the number of elements in one region of one direction of the open part.

Syntax

lmseq direction left delta
  • direction: i, j or k.
  • left: the reduced index on the left side of the region. It runs from 1 to 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 delta that would leave the region with fewer than one element is refused.
  • lmseq after a coordinate equation is accepted, as mseq is (tests/corpus/270-lmseq-after-equation-accepted). update is not supported in this version (E0100); once it is, lmseq after it will be refused (E0408), as mseq will be.
  • A number written in an equation, such as the 3 of i .eq. 3 or the 14 of (j-14)/3, names a node of the part’s final lattice, so an lmseq written 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, j or k, left is 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.

See also

  • mseq: changes every region of a direction.
  • insprt: adds a partition.
  • Parts: element counts in detail.

James 0.8.0.

This site uses Just the Docs, a documentation theme for Jekyll.