You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment we have different API for the different modes of "combining multiple nodes" with different behaviour and API:
process_one(_simd)
process_bulk
buffer
settings & tags handling
merged_node
yes
no
eliminated*
not yet
connect static
yes
yes
yes*
yes
connect dyn
yes
yes
yes*
yes
* as mege node stores the original blocks and these contain their ports which then contain their buffers, the buffers are at the moment just unused, if i read the code correctly.
** at the moment the ports and buffers are set up when the node is constructed and the connections between the port buffers are set up when the graph is initialized by the scheduler. This means that dynamic nodes always have to pass the data though a buffer, which is not optimal and could be eliminated in a lot of cases
The different APIs look like this:
// merged_nodeauto merged = merge<"scaled", "addend1">(scale<int, 2>(), adder<int>());
// dynamically connect_static portsauto &src = flow_graph.make_node<Source<float>>({ { "n_samples_max", n_samples } });
auto &block1 = flow_graph.make_node<TestBlock<float>>();
flow_graph.connect<"out">(src).to<"in">(block1));
// connect dynamic ports (from prototype implementation, not yet implemented in core)auto &adder = flow_graph.add_node(std::make_unique<multi_adder<double>>(n));
for (i = 0; i < n; i++) {
auto &source = flow_graph.make_node<fixed_source<double>>();
flow_graph.dynamic_connect(source, 0, adder, j);
}
The text was updated successfully, but these errors were encountered:
wirew0rm
changed the title
[] unify API of compile time block merging vs dynamic block connection
documentation: unify API of compile time block merging vs dynamic block connection
Jul 14, 2023
At the moment we have different API for the different modes of "combining multiple nodes" with different behaviour and API:
* as mege node stores the original blocks and these contain their ports which then contain their buffers, the buffers are at the moment just unused, if i read the code correctly.
** at the moment the ports and buffers are set up when the node is constructed and the connections between the port buffers are set up when the graph is initialized by the scheduler. This means that dynamic nodes always have to pass the data though a buffer, which is not optimal and could be eliminated in a lot of cases
The different APIs look like this:
The text was updated successfully, but these errors were encountered: