Skip to content

Commit 0950877

Browse files
add a closing ) to the text printed by node_coordinate_to_string()
1 parent 052461d commit 0950877

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

libs/librrgraph/src/base/rr_graph_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class RRGraphView {
351351

352352
start_x = " (" + std::to_string(node_xhigh(node)) + ","; //start coordinates have large value
353353
start_y = std::to_string(node_yhigh(node)) + ",";
354-
start_layer_str = std::to_string(node_layer_num);
354+
start_layer_str = std::to_string(node_layer_num) + ")";
355355
end_x = " (" + std::to_string(node_xlow(node)) + ","; //end coordinates have smaller value
356356
end_y = std::to_string(node_ylow(node)) + ",";
357357
end_layer_str = std::to_string(node_layer_num) + ")";
@@ -360,7 +360,7 @@ class RRGraphView {
360360
else { // signal travels in increasing direction, stays at same point, or can travel both directions
361361
start_x = " (" + std::to_string(node_xlow(node)) + ","; //start coordinates have smaller value
362362
start_y = std::to_string(node_ylow(node)) + ",";
363-
start_layer_str = std::to_string(node_layer_num);
363+
start_layer_str = std::to_string(node_layer_num) + ")";
364364
end_x = " (" + std::to_string(node_xhigh(node)) + ","; //end coordinates have larger value
365365
end_y = std::to_string(node_yhigh(node)) + ",";
366366
end_layer_str = std::to_string(node_layer_num) + ")"; //layer number

libs/librrgraph/src/base/rr_spatial_lookup.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#include "vtr_assert.h"
22
#include "rr_spatial_lookup.h"
33

4-
RRSpatialLookup::RRSpatialLookup() {
5-
}
6-
74
RRNodeId RRSpatialLookup::find_node(int layer,
85
int x,
96
int y,
@@ -130,14 +127,14 @@ std::vector<RRNodeId> RRSpatialLookup::find_nodes(int layer,
130127

131128
/* Reserve space to avoid memory fragmentation */
132129
size_t num_nodes = 0;
133-
for (const auto& node : rr_node_indices_[type][layer][x][y][side]) {
130+
for (RRNodeId node : rr_node_indices_[type][layer][x][y][side]) {
134131
if (node.is_valid()) {
135132
num_nodes++;
136133
}
137134
}
138135

139136
nodes.reserve(num_nodes);
140-
for (const auto& node : rr_node_indices_[type][layer][x][y][side]) {
137+
for (RRNodeId node : rr_node_indices_[type][layer][x][y][side]) {
141138
if (node.is_valid()) {
142139
nodes.emplace_back(node);
143140
}
@@ -328,7 +325,7 @@ void RRSpatialLookup::reorder(const vtr::vector<RRNodeId, RRNodeId>& dest_order)
328325
for (size_t x = 0; x < grid.dim_size(1); x++) {
329326
for (size_t y = 0; y < grid.dim_size(2); y++) {
330327
for (size_t s = 0; s < grid.dim_size(3); s++) {
331-
for (auto &node: grid[l][x][y][s]) {
328+
for (RRNodeId &node: grid[l][x][y][s]) {
332329
if (node.is_valid()) {
333330
node = dest_order[node];
334331
}

libs/librrgraph/src/base/rr_spatial_lookup.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_SPATIAL_LOOKUP_H
2-
#define RR_SPATIAL_LOOKUP_H
1+
#pragma once
32

43
/**
54
* @file
@@ -25,7 +24,7 @@ class RRSpatialLookup {
2524
/* -- Constructors -- */
2625
public:
2726
/* Explicitly define the only way to create an object */
28-
explicit RRSpatialLookup();
27+
explicit RRSpatialLookup() = default;
2928

3029
/* Disable copy constructors and copy assignment operator
3130
* This is to avoid accidental copy because it could be an expensive operation considering that the
@@ -293,5 +292,3 @@ class RRSpatialLookup {
293292
/* Fast look-up: TODO: Should rework the data type. Currently it is based on a 3-dimensional array mater where some dimensions must always be accessed with a specific index. Such limitation should be overcome */
294293
t_rr_node_indices rr_node_indices_;
295294
};
296-
297-
#endif

vpr/src/route/rr_graph2.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,7 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
15471547
} else {
15481548
nodes_from_lookup = rr_graph.node_lookup().find_grid_nodes_at_all_sides(l, x, y, rr_type);
15491549
}
1550+
15501551
for (RRNodeId inode : nodes_from_lookup) {
15511552
rr_node_counts[inode]++;
15521553

0 commit comments

Comments
 (0)