diff options
author | Martin Braun <martin.braun@ettus.com> | 2022-04-06 21:34:20 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-04-07 10:51:26 -0700 |
commit | 204c37faee0b55ec2f0e21899ebabbcdeb1f4440 (patch) | |
tree | bcb860dc141c19efa5a8c0b9c1dc109d935a9974 /host/lib/rfnoc/graph.cpp | |
parent | b3a9c7849fa249653643d01c5d5f127feb92152b (diff) | |
download | uhd-204c37faee0b55ec2f0e21899ebabbcdeb1f4440.tar.gz uhd-204c37faee0b55ec2f0e21899ebabbcdeb1f4440.tar.bz2 uhd-204c37faee0b55ec2f0e21899ebabbcdeb1f4440.zip |
rfnoc: graph: Allow property forwarding on back-edges
The internal helper function graph_t::_forward_edge_props() receives
another argument, which decides if properties are forwarded on forward-
or back-edges. Previously, only forward-edges were possible.
Diffstat (limited to 'host/lib/rfnoc/graph.cpp')
-rw-r--r-- | host/lib/rfnoc/graph.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/host/lib/rfnoc/graph.cpp b/host/lib/rfnoc/graph.cpp index faea82550..3584a1c2a 100644 --- a/host/lib/rfnoc/graph.cpp +++ b/host/lib/rfnoc/graph.cpp @@ -364,7 +364,7 @@ void graph_t::resolve_all_properties( // Forward all edge props in all directions from current node. We make // sure to skip properties if the edge is flagged as // !property_propagation_active - _forward_edge_props(*node_it); + _forward_edge_props(*node_it, true); // Now mark all properties on this node as clean node_accessor.clean_props(current_node); @@ -604,7 +604,8 @@ void graph_t::_remove_node(node_ref_t node) } -void graph_t::_forward_edge_props(graph_t::rfnoc_graph_t::vertex_descriptor origin) +void graph_t::_forward_edge_props( + graph_t::rfnoc_graph_t::vertex_descriptor origin, const bool forward) { node_accessor_t node_accessor{}; node_ref_t origin_node = boost::get(vertex_property_t(), _graph, origin); @@ -615,12 +616,13 @@ void graph_t::_forward_edge_props(graph_t::rfnoc_graph_t::vertex_descriptor orig }); UHD_LOG_TRACE(LOG_ID, "Forwarding up to " << edge_props.size() << " edge properties from node " - << origin_node->get_unique_id()); + << origin_node->get_unique_id() << " along " + << (forward ? "forward" : "back") << " edges."); for (auto prop : edge_props) { auto neighbour_node_info = _find_neighbour(origin, prop->get_src_info()); if (neighbour_node_info.first != nullptr - && neighbour_node_info.second.property_propagation_active) { + && neighbour_node_info.second.property_propagation_active == forward) { const size_t neighbour_port = prop->get_src_info().type == res_source_info::INPUT_EDGE ? neighbour_node_info.second.src_port |