aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/node_ctrl_base.hpp30
-rw-r--r--host/include/uhd/rfnoc/node_ctrl_base.ipp4
2 files changed, 31 insertions, 3 deletions
diff --git a/host/include/uhd/rfnoc/node_ctrl_base.hpp b/host/include/uhd/rfnoc/node_ctrl_base.hpp
index 0fed28bed..db552ff4c 100644
--- a/host/include/uhd/rfnoc/node_ctrl_base.hpp
+++ b/host/include/uhd/rfnoc/node_ctrl_base.hpp
@@ -166,11 +166,31 @@ public:
get_property, null_value, exclude_nodes);
}
+ UHD_INLINE size_t get_num_input_ports(void)
+ {
+ return _num_input_ports;
+ }
+
+ UHD_INLINE void set_num_input_ports(size_t num_ports)
+ {
+ _num_input_ports = num_ports;
+ }
+
+ UHD_INLINE size_t get_num_output_ports(void)
+ {
+ return _num_output_ports;
+ }
+
+ UHD_INLINE void set_num_output_ports(size_t num_ports)
+ {
+ _num_output_ports = num_ports;
+ }
+
protected:
/***********************************************************************
* Structors
**********************************************************************/
- node_ctrl_base(void) {}
+ node_ctrl_base(void) : _num_input_ports(0), _num_output_ports(0) {}
virtual ~node_ctrl_base()
{
disconnect();
@@ -263,6 +283,14 @@ private:
*/
std::map<size_t, size_t> _downstream_ports;
+ /*! Stores the number of input ports.
+ */
+ size_t _num_input_ports;
+
+ /*! Stores the number of output ports.
+ */
+ size_t _num_output_ports;
+
}; /* class node_ctrl_base */
}} /* namespace uhd::rfnoc */
diff --git a/host/include/uhd/rfnoc/node_ctrl_base.ipp b/host/include/uhd/rfnoc/node_ctrl_base.ipp
index cb56e2d90..43a3cb162 100644
--- a/host/include/uhd/rfnoc/node_ctrl_base.ipp
+++ b/host/include/uhd/rfnoc/node_ctrl_base.ipp
@@ -85,8 +85,8 @@ namespace uhd {
// map each input port directly to the same output
// port. This limits the graph traversal to prevent
// finding nodes that are not part of this chain.
- if (one_next_node->list_upstream_nodes().size() ==
- one_next_node->list_downstream_nodes().size())
+ if (one_next_node->get_num_input_ports() ==
+ one_next_node->get_num_output_ports())
{
next_port = (downstream ?
node->get_downstream_port(connected_port) :