@@ -165,7 +165,7 @@ void check_rr_graph(const RRGraphView& rr_graph,
165165 inode, rr_node_typename[rr_type], to_node, rr_node_typename[to_rr_type], num_edges_to_node);
166166 }
167167
168- // Between two wire segments
168+ // Between two wire segments
169169 VTR_ASSERT_MSG (to_rr_type == e_rr_type::CHANX || to_rr_type == e_rr_type::CHANY || to_rr_type == e_rr_type::IPIN, " Expect channel type or input pin type" );
170170 VTR_ASSERT_MSG (rr_type == e_rr_type::CHANX || rr_type == e_rr_type::CHANY || rr_type == e_rr_type::OPIN, " Expect channel type or output pin type" );
171171
@@ -190,7 +190,7 @@ void check_rr_graph(const RRGraphView& rr_graph,
190190 */
191191 if ((to_rr_type == e_rr_type::CHANX || to_rr_type == e_rr_type::CHANY)
192192 && (rr_type == e_rr_type::CHANX || rr_type == e_rr_type::CHANY)) {
193- auto switch_type = rr_graph.rr_switch_inf (RRSwitchId (kv.first )).type ();
193+ SwitchType switch_type = rr_graph.rr_switch_inf (RRSwitchId (kv.first )).type ();
194194
195195 VPR_ERROR (VPR_ERROR_ROUTE, " in check_rr_graph: node %d has %d redundant connections to node %d of switch type %d (%s)" ,
196196 inode, kv.second , to_node, kv.first , SWITCH_TYPE_STRINGS[size_t (switch_type)]);
@@ -202,14 +202,14 @@ void check_rr_graph(const RRGraphView& rr_graph,
202202 check_unbuffered_edges (rr_graph, inode);
203203
204204 // Check that all config/non-config edges are appropriately organized
205- for (auto edge : rr_graph.configurable_edges (RRNodeId (inode))) {
205+ for (t_edge_size edge : rr_graph.configurable_edges (RRNodeId (inode))) {
206206 if (!rr_graph.edge_is_configurable (RRNodeId (inode), edge)) {
207207 VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " in check_rr_graph: node %d edge %d is non-configurable, but in configurable edges" ,
208208 inode, edge);
209209 }
210210 }
211211
212- for (auto edge : rr_graph.non_configurable_edges (RRNodeId (inode))) {
212+ for (t_edge_size edge : rr_graph.non_configurable_edges (RRNodeId (inode))) {
213213 if (rr_graph.edge_is_configurable (RRNodeId (inode), edge)) {
214214 VPR_FATAL_ERROR (VPR_ERROR_ROUTE, " in check_rr_graph: node %d edge %d is configurable, but in non-configurable edges" ,
215215 inode, edge);
@@ -528,40 +528,33 @@ void check_rr_node(const RRGraphView& rr_graph,
528528static void check_unbuffered_edges (const RRGraphView& rr_graph, int from_node) {
529529 /* This routine checks that all pass transistors in the routing truly are *
530530 * bidirectional. It may be a slow check, so don't use it all the time. */
531-
532- int from_edge, to_node, to_edge, from_num_edges, to_num_edges;
533- e_rr_type from_rr_type, to_rr_type;
534- short from_switch_type;
535- bool trans_matched;
536-
537- from_rr_type = rr_graph.node_type (RRNodeId (from_node));
531+ e_rr_type from_rr_type = rr_graph.node_type (RRNodeId (from_node));
538532 if (from_rr_type != e_rr_type::CHANX && from_rr_type != e_rr_type::CHANY)
539533 return ;
540534
541- from_num_edges = rr_graph.num_edges (RRNodeId (from_node));
535+ int from_num_edges = rr_graph.num_edges (RRNodeId (from_node));
542536
543- for (from_edge = 0 ; from_edge < from_num_edges; from_edge++) {
544- to_node = size_t ( rr_graph.edge_sink_node (RRNodeId (from_node), from_edge) );
545- to_rr_type = rr_graph.node_type (RRNodeId ( to_node) );
537+ for (int from_edge = 0 ; from_edge < from_num_edges; from_edge++) {
538+ RRNodeId to_node = rr_graph.edge_sink_node (RRNodeId (from_node), from_edge);
539+ e_rr_type to_rr_type = rr_graph.node_type (to_node);
546540
547541 if (to_rr_type != e_rr_type::CHANX && to_rr_type != e_rr_type::CHANY)
548542 continue ;
549543
550- from_switch_type = rr_graph.edge_switch (RRNodeId (from_node), from_edge);
544+ short from_switch_type = rr_graph.edge_switch (RRNodeId (from_node), from_edge);
551545
552546 if (rr_graph.rr_switch_inf (RRSwitchId (from_switch_type)).buffered ())
553547 continue ;
554548
555- /* We know that we have a pass transistor from from_node to to_node. Now *
556- * check that there is a corresponding edge from to_node back to *
557- * from_node. */
549+ // We know that we have a pass transistor from from_node to to_node. Now
550+ // check that there is a corresponding edge from to_node back to from_node.
558551
559- to_num_edges = rr_graph.num_edges (RRNodeId ( to_node) );
560- trans_matched = false ;
552+ int to_num_edges = rr_graph.num_edges (to_node);
553+ bool trans_matched = false ;
561554
562- for (to_edge = 0 ; to_edge < to_num_edges; to_edge++) {
563- if (size_t (rr_graph.edge_sink_node (RRNodeId ( to_node) , to_edge)) == size_t (from_node)
564- && rr_graph.edge_switch (RRNodeId ( to_node) , to_edge) == from_switch_type) {
555+ for (int to_edge = 0 ; to_edge < to_num_edges; to_edge++) {
556+ if (size_t (rr_graph.edge_sink_node (to_node, to_edge)) == size_t (from_node)
557+ && rr_graph.edge_switch (to_node, to_edge) == from_switch_type) {
565558 trans_matched = true ;
566559 break ;
567560 }
0 commit comments