Skip to content

Commit 6d14f83

Browse files
Removed globals from rr_graph_uxsdcxx_serializer.h
1 parent 46ac27e commit 6d14f83

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

vpr/src/route/rr_graph_uxsdcxx_serializer.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <algorithm>
66

77
#include "rr_graph.h"
8-
#include "globals.h"
98
#include "rr_graph_uxsdcxx_interface.h"
109
#include "rr_node.h"
1110
#include "vpr_error.h"
@@ -153,10 +152,8 @@ class EdgeWalker {
153152
current_edge_ = 0;
154153
current_idx_ = 0;
155154

156-
auto& device_ctx = g_vpr_ctx.device();
157-
const auto& rr_graph = device_ctx.rr_graph;
158155
for (const auto& node : *nodes) {
159-
num_edges_ += rr_graph.num_edges(node.id());
156+
num_edges_ += nodes_-> num_edges(node.id());
160157
}
161158
}
162159

@@ -184,9 +181,7 @@ class EdgeWalker {
184181
current_edge_ += 1;
185182
}
186183

187-
auto& device_ctx = g_vpr_ctx.device();
188-
const auto& rr_graph = device_ctx.rr_graph;
189-
if (current_edge_ >= rr_graph.num_edges(RRNodeId(current_src_inode_))) {
184+
if (current_edge_ >= nodes_-> num_edges(RRNodeId(current_src_inode_))) {
190185
// Done with current_src_inode_, advance to the end of the
191186
// node list, or the next node with at least 1 edge.
192187
current_edge_ = 0;
@@ -199,7 +194,7 @@ class EdgeWalker {
199194
VTR_ASSERT(current_idx_ + 1 == num_edges_);
200195
return current_idx_++;
201196
}
202-
} while (rr_graph.num_edges(RRNodeId(current_src_inode_)) < 1);
197+
} while (nodes_-> num_edges(RRNodeId(current_src_inode_)) < 1);
203198
}
204199

205200
VTR_ASSERT(current_src_inode_ < nodes_->size());

0 commit comments

Comments
 (0)