Skip to content

Commit 1cf6ec1

Browse files
make format
1 parent 924b4e5 commit 1cf6ec1

File tree

7 files changed

+20
-31
lines changed

7 files changed

+20
-31
lines changed

libs/libarchfpga/src/parse_switchblocks.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ static t_wireconn_inf parse_wireconn(pugi::xml_node node,
150150
VTR_ASSERT(num_children > 0);
151151
return parse_wireconn_multinode(node, loc_data, switches);
152152
}
153-
154153
}
155154

156155
static t_wireconn_inf parse_wireconn_inline(pugi::xml_node node,

libs/librrgraph/src/base/check_rr_graph.cpp

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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,
528528
static 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
}

libs/librrgraph/src/base/rr_graph_obj.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ RRIndexedDataId RRGraph::node_cost_index(const RRNodeId& node) const {
152152
return RRIndexedDataId(node_cost_indices_[node]);
153153
}
154154

155-
Direction RRGraph::node_direction(const RRNodeId& node) const {
155+
Direction RRGraph::node_direction(RRNodeId node) const {
156156
VTR_ASSERT_SAFE(valid_node_id(node));
157157
VTR_ASSERT_MSG(node_type(node) == e_rr_type::CHANX || node_type(node) == e_rr_type::CHANY, "Direction valid only for CHANX/CHANY RR nodes");
158158
return node_directions_[node];

libs/librrgraph/src/base/rr_graph_obj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class RRGraph {
414414
* see node coordinate for details
415415
* only matters the routing track nodes (CHANX and CHANY)
416416
*/
417-
Direction node_direction(const RRNodeId& node) const;
417+
Direction node_direction(RRNodeId node) const;
418418

419419
/* Get the side where the node physically locates on a logic block.
420420
* Mainly applicable to IPIN and OPIN nodes, which locates on the perimeter of logic block

libs/libvtrutil/src/vtr_string_view.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ class string_view {
4343
return *this;
4444
}
4545

46-
47-
4846
///@brief indexing [] operator (immutable)
4947
constexpr char operator[](size_t pos) const {
5048
return data_[pos];

vpr/src/route/rr_graph_generation/build_switchblocks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ static void compute_wire_connections(int x_coord,
821821
}
822822

823823
const t_wire_type_sizes& wire_type_sizes_from = (from_chan_type == e_rr_type::CHANY) ? wire_type_sizes_y : wire_type_sizes_x;
824-
const t_wire_type_sizes& wire_type_sizes_to = (to_chan_type == e_rr_type::CHANY) ? wire_type_sizes_y : wire_type_sizes_x;
824+
const t_wire_type_sizes& wire_type_sizes_to = (to_chan_type == e_rr_type::CHANY) ? wire_type_sizes_y : wire_type_sizes_x;
825825

826826
// Iterate over all the wire connections specified for this switch block
827827
for (int iconn = 0; iconn < (int)sb.wireconns.size(); iconn++) {

vpr/src/route/rr_graph_generation/rr_graph2.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,6 @@ vtr::NdMatrix<int, 2> get_number_track_to_track_inter_die_conn(t_sb_connection_m
11091109
}
11101110
}
11111111
}
1112-
11131112
}
11141113
}
11151114
extra_nodes_per_switchblocks[x][y] += ((num_of_3d_conn + custom_3d_sb_fanin_fanout - 1) / custom_3d_sb_fanin_fanout);

0 commit comments

Comments
 (0)