Skip to content

Commit 1474b8f

Browse files
committed
make format
1 parent 78d6b1e commit 1474b8f

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

vpr/src/route/segment_stats.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
4040
}
4141

4242
std::map<e_parallel_axis, std::vector<int>> directed_occ_by_length = {
43-
{X_AXIS, std::vector<int>(max_segment_length+1, 0)},
44-
{Y_AXIS, std::vector<int>(max_segment_length+1, 0)}
45-
};
43+
{X_AXIS, std::vector<int>(max_segment_length + 1, 0)},
44+
{Y_AXIS, std::vector<int>(max_segment_length + 1, 0)}};
4645

4746
std::map<e_parallel_axis, std::vector<int>> directed_cap_by_length = {
48-
{X_AXIS, std::vector<int>(max_segment_length+1, 0)},
49-
{Y_AXIS, std::vector<int>(max_segment_length+1, 0)}
50-
};
47+
{X_AXIS, std::vector<int>(max_segment_length + 1, 0)},
48+
{Y_AXIS, std::vector<int>(max_segment_length + 1, 0)}};
5149

5250
for (const RRNodeId& rr_id : device_ctx.rr_graph.nodes()) {
5351
size_t inode = (size_t)rr_id;
@@ -62,7 +60,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
6260
length = LONGLINE;
6361
const short& inode_capacity = rr_graph.node_capacity(rr_id);
6462
int occ = route_ctx.rr_node_route_inf[inode].occ();
65-
VTR_ASSERT(node_type == CHANX|| node_type == CHANY);
63+
VTR_ASSERT(node_type == CHANX || node_type == CHANY);
6664
auto ax = (node_type == CHANX) ? X_AXIS : Y_AXIS;
6765
VTR_ASSERT(occ <= 1 && inode_capacity <= 1);
6866
directed_occ_by_length[ax][length] += occ;
@@ -74,8 +72,8 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
7472
VTR_LOG("Total Number of Wiring Segments by Direction: direction length number\n");
7573
VTR_LOG(" --------- ------ -------\n");
7674
for (int length = 0; length <= max_segment_length; length++) {
77-
for(auto ax : {X_AXIS, Y_AXIS}) {
78-
std::string ax_name = (ax==X_AXIS) ? "X" : "Y";
75+
for (auto ax : {X_AXIS, Y_AXIS}) {
76+
std::string ax_name = (ax == X_AXIS) ? "X" : "Y";
7977
if (directed_cap_by_length[ax][length] != 0) {
8078
std::string length_str = (length == LONGLINE) ? "longline" : std::to_string(length);
8179
VTR_LOG(" %s%s %s%s %6d\n",
@@ -86,11 +84,10 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
8684
directed_cap_by_length[ax][length]);
8785
}
8886
}
89-
9087
}
9188

92-
for(auto ax : {X_AXIS, Y_AXIS}) {
93-
std::string ax_name = (ax==X_AXIS) ? "X" : "Y";
89+
for (auto ax : {X_AXIS, Y_AXIS}) {
90+
std::string ax_name = (ax == X_AXIS) ? "X" : "Y";
9491
VTR_LOG("\n");
9592
VTR_LOG("%s - Directed Wiring Segment usage by length: length utilization\n", ax_name.c_str());
9693
VTR_LOG(" ------ -----------\n");
@@ -117,7 +114,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
117114
int seg_name_size = static_cast<int>(seg_name.size());
118115
int occ = 0;
119116
int cap = 0;
120-
for(auto ax : {X_AXIS, Y_AXIS}) {
117+
for (auto ax : {X_AXIS, Y_AXIS}) {
121118
occ += directed_occ_by_length[ax][seg_length];
122119
cap = directed_cap_by_length[ax][seg_length];
123120
}

0 commit comments

Comments
 (0)