gather

SpecialNodes gather

input ports:
Name Type Description Optional

selector

int

control input from scatter

no

in1

?0

first data input (selector == 0)

yes

in2

?0

second data input (selector == 1)

yes

…​

inN

?0

final data input (selector == N-1)

yes

output ports:
Name Type Description Optional

output

?0

output of selected data item

no

gather accepts an integer selected value in the range 0 to N -1, and N data inputs. It reads and outputs the data input that is named by the selector value. gather is intended for use in a balanced pair with a scatter operation. See the example SpecialNodes/scattergather. The purpose of scatter / gather is to provide for concurrent evaluation of a number of instances of the same subcircuit. It is typically wired in this kind of configuration (taken from the SpecialNodes/scattergather example):

SpecialNodes gather2

Four instances of MyCircuit are sent inputs, round-robin, from scatter, and the results are collated using gather. When run on 4 threads, this circuit will have about 4 times the bandwidth of a single instance of MyCircuit. For more about concurrency and performance, see Dataflow in Coreograph.

see Dataflow in Coreograph