Iterator
SplitRanks
compute the starting ranks and iterations suitable for parallelizing an iterator
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
SplitRanks(n, opts)
n
-
nonnegint; number to split
opts
(optional) equation(s) of the form option = value; specify options for the SplitRanks command
numtasks = posint
Number of tasks. The default is the value of kernelopts(numcpus).
The SplitRanks command computes the starting ranks and number of iterations needed to split an iterator into separate tasks.
It returns a list of two-element sublists. Each sublist consist of a rank and number of iterations. The number of sublists equals the value of the numtasks option. The number of iterations differ by at most one.
The n parameter is the total number of iterations.
See the example section of RevolvingDoorCombination for a use of this procedure to parallelize a search.
with⁡Iterator:
Split 102 tasks.
SplitRanks⁡102,numtasks=4
1,26,27,26,53,25,78,25
The Iterator[SplitRanks] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
Download Help Document