aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2022-04-06 21:34:20 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2022-04-07 10:51:26 -0700
commit204c37faee0b55ec2f0e21899ebabbcdeb1f4440 (patch)
treebcb860dc141c19efa5a8c0b9c1dc109d935a9974 /host
parentb3a9c7849fa249653643d01c5d5f127feb92152b (diff)
downloaduhd-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')
-rw-r--r--host/lib/include/uhdlib/rfnoc/graph.hpp3
-rw-r--r--host/lib/rfnoc/graph.cpp10
2 files changed, 8 insertions, 5 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/graph.hpp b/host/lib/include/uhdlib/rfnoc/graph.hpp
index 73f983d41..9667f4817 100644
--- a/host/lib/include/uhdlib/rfnoc/graph.hpp
+++ b/host/lib/include/uhdlib/rfnoc/graph.hpp
@@ -263,8 +263,9 @@ private:
/*! Forward all edge properties from this node (\p origin) to the
* neighbouring ones
*
+ * \param forward true for forward edges, false for back-edges
*/
- void _forward_edge_props(rfnoc_graph_t::vertex_descriptor origin);
+ void _forward_edge_props(rfnoc_graph_t::vertex_descriptor origin, const bool forward);
/*! Check that the edge properties on both sides of the edge are equal
*
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