Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
manual:chapter5:listproc [2019/10/17 15:17] jojo1973 [Group 2: Commands that must use DOLIST to parallel process] Fixed examples |
manual:chapter5:listproc [2019/11/03 06:36] jojo1973 [Group 9: Quirky commands] |
||
---|---|---|---|
Line 54: | Line 54: | ||
==== Group 4: Commands that set modes / states ==== | ==== Group 4: Commands that set modes / states ==== | ||
Commands that store values in system-specific locations so as to control certain modes and machine states can generally be used to parallel process data. The problem is that each successive parameter in the list cancels the setting established by the previous parameter. For example, < | Commands that store values in system-specific locations so as to control certain modes and machine states can generally be used to parallel process data. The problem is that each successive parameter in the list cancels the setting established by the previous parameter. For example, < | ||
- | { 16 32 48 } | + | 1: |
+ | …………………………………………………………………………………… | ||
SETPREC</ | SETPREC</ | ||
- | 48 | + | 1: |
+ | …………………………………………………………………………………… | ||
SETPREC | SETPREC | ||
</ | </ | ||
Line 63: | Line 65: | ||
These commands are the easiest to use with parallel processing. Simply provide the command with a list of arguments instead of the expected single argument. Some examples: | These commands are the easiest to use with parallel processing. Simply provide the command with a list of arguments instead of the expected single argument. Some examples: | ||
- | * < | + | * < |
+ | 1: { 1 -2 3 -4 } | ||
+ | …………………………………………………………………………………… | ||
ABS | ABS | ||
</ | </ | ||
* < | * < | ||
- | DEG | + | 1: |
- | { 0 30 60 90 } | + | …………………………………………………………………………………… |
SIN | SIN | ||
- | </ | + | </ |
* < | * < | ||
- | { 1 A ' | + | 1: { 1 'A' |
+ | …………………………………………………………………………………… | ||
INV | INV | ||
</ | </ | ||
Line 84: | Line 89: | ||
In the first form, parallel elements are combined by the command: < | In the first form, parallel elements are combined by the command: < | ||
- | { 1 2 3 } | + | 2: { 1 2 3 } |
- | { 4 5 6 } | + | 1: { 4 5 6 } |
+ | …………………………………………………………………………………… | ||
% | % | ||
</ | </ | ||
In the second form, the level 1 object is combined with each element in the level 2 list in succession: < | In the second form, the level 1 object is combined with each element in the level 2 list in succession: < | ||
- | { 1 2 3 } | + | 2: { 1 2 3 } |
- | 30 | + | 1: |
+ | …………………………………………………………………………………… | ||
%CH | %CH | ||
</ | </ | ||
In the third form, the level 2 object is combined with each element of the level 1 list in succession: < | In the third form, the level 2 object is combined with each element of the level 1 list in succession: < | ||
- | 50 | + | 2: |
- | { 1 2 3 } | + | 1: { 1 2 3 } |
+ | …………………………………………………………………………………… | ||
%T | %T | ||
</ | </ | ||
Line 106: | Line 114: | ||
==== Group 8: Multiple-result commands ==== | ==== Group 8: Multiple-result commands ==== | ||
Any command that allows parallel processing, but produces multiple results from its input data, will return its results as a single list. For example,< | Any command that allows parallel processing, but produces multiple results from its input data, will return its results as a single list. For example,< | ||
- | { 1 2 3 } | + | 2: { 1 2 3 } |
- | { 4 5 6 } | + | 1: { 4 5 6 } |
+ | …………………………………………………………………………………… | ||
R→C | R→C | ||
+ | </ | ||
+ | 1: { (1, 4) (2, 5) (3, 6) } | ||
+ | …………………………………………………………………………………… | ||
C→R | C→R | ||
</ | </ | ||
Line 124: | Line 136: | ||
» | » | ||
</ | </ | ||
+ | |||
Taking '' | Taking '' | ||
- | 2 | + | 2: { 1 4 2 5 3 6 } |
+ | 1: 2 | ||
+ | …………………………………………………………………………………… | ||
UNMIX | UNMIX | ||
</ | </ | ||
Line 133: | Line 148: | ||
* '' | * '' | ||
- | { 1 3 } | + | 1: { 1 3 } |
+ | …………………………………………………………………………………… | ||
DELALARM | DELALARM | ||
</ | </ | ||
- | { 3 1 } | + | 1: { 3 1 } |
+ | …………………………………………………………………………………… | ||
DELALARM | DELALARM | ||
</ | </ | ||
* '' | * '' | ||
- | * '' | + | * '' |
==== Using DOLIST for parallel processing ==== | ==== Using DOLIST for parallel processing ==== |