Loop
Synopsis
This operator loops over the subprocess as often as it is specified in the parameter
number of iterations. Theiteration macroreturns the value of the current number of iteration.
Description
The operators in the subprocess are executed as many times as defined in the parameternumber of iterations. By default, the input of each iteration will always be the original input data. This can be changed with thereuse resultsparameter, which changes the output of each iteration to be the input of the next iteration. For obvious reasons, this will limit the loop to run in a single thread and not make use of more CPU cores.
Input
input
This port receives anIOObjectwhich is passed on to the inner process for each iteration. If thereuse resultsparameter is selected, all subsequent iterations after the first one will use the results of theoutputports of the previous iteration.
Output
output
This port collects every result that is provided by the inner process. Ifreuse resultsis selected, only the result of the last iteration will be returned. Otherwise, a collection of all results of each iteration will be returned. The order of the ports is the same inside and outside the operator.
Parameters
Number of iterations
Thenumber of iterationsspecifies how often the subprocess will be executed.
Iteration macro
The name of the iteration macro which can be accessed in the subprocess.
Reuse results
Set whether to reuse the results of each iteration as the input of the next iteration. If set to true, the output of each iteration is used as input for the next iteration. For obvious reasons, this will limit the loop to run in a single thread and not make use of more CPU cores. If set to false, the input of each iteration will be the original input of the loop.
Enable parallel execution
This parameter enables the parallel execution of the subprocess. Please disable the parallel execution if you run into memory problems.