The generate command creates a number of chains

The work generator generates a pair (start, end) where start and end are usually identical. end is then fed into the device. In the case without an intermediate, after chainlength operations the pair (start, new_end) is fed into the work consumer. In the case with an intermediate, after the chain has completed a number of steps smaller than chainlength it is fed into the intermediate, and the intermediate checks the chain end condition. If it matches, the intermediate gives the chain to the work consumer and otherwise keeps it in the current working set.

The use of an intermediate is almost always more efficient for variable length chains, because completed chains are not checked for the chain end condition and are still copied to the device for processing. They are not modified though, but the slot that they occupy is wasted.

It has the following options:

--chainlength n
the chain length
--chains n
the number of chains
--intermediate name:options
the plugin that handles chains in progress

Note that the chain length of variable length chains is determined by the condition and round function. In that case chainlength sets the maximum chain length after which to give up trying to reach a point where the condition is true.