Skip to content

Commit 561b5fb

Browse files
Fix formatting issues
1 parent 61ebf99 commit 561b5fb

File tree

3 files changed

+65
-15
lines changed

3 files changed

+65
-15
lines changed

vpr/src/route/rr_graph_generation/rr_graph.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#include "rr_types.h"
4949
#include "rr_node_indices.h"
5050

51-
5251
//#define VERBOSE
5352
//used for getting the exact count of each edge type and printing it to std out.
5453

vpr/src/route/rr_graph_generation/rr_graph_interposer.cpp

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,17 @@ static short node_ystart(const RRGraphView& rr_graph, RRNodeId node);
4141
*
4242
* This is a low level function, you should use cut_channel_node that wraps this up in a nicer API.
4343
*/
44-
static void cut_chan_y_node(RRNodeId node, int x_low, int y_low, int x_high, int y_high, int layer, int ptc_num, int cut_loc_y,
45-
Direction node_direction, RRGraphBuilder& rr_graph_builder, RRSpatialLookup& spatial_lookup);
44+
static void cut_chan_y_node(RRNodeId node,
45+
int x_low,
46+
int y_low,
47+
int x_high,
48+
int y_high,
49+
int layer,
50+
int ptc_num,
51+
int cut_loc_y,
52+
Direction node_direction,
53+
RRGraphBuilder& rr_graph_builder,
54+
RRSpatialLookup& spatial_lookup);
4655

4756
/**
4857
* @brief Update a CHANX node's bounding box in RRGraph and SpatialLookup entries.
@@ -51,8 +60,17 @@ static void cut_chan_y_node(RRNodeId node, int x_low, int y_low, int x_high, int
5160
*
5261
* This is a low level function, you should use cut_channel_node that wraps this up in a nicer API.
5362
*/
54-
static void cut_chan_x_node(RRNodeId node, int x_low, int y_low, int x_high, int y_high, int layer, int ptc_num, int cut_loc_x,
55-
Direction node_direction, RRGraphBuilder& rr_graph_builder, RRSpatialLookup& spatial_lookup);
63+
static void cut_chan_x_node(RRNodeId node,
64+
int x_low,
65+
int y_low,
66+
int x_high,
67+
int y_high,
68+
int layer,
69+
int ptc_num,
70+
int cut_loc_x,
71+
Direction node_direction,
72+
RRGraphBuilder& rr_graph_builder,
73+
RRSpatialLookup& spatial_lookup);
5674

5775
/**
5876
* @brief Update a CHANX or CHANY node's bounding box in RRGraph and SpatialLookup entries if it crosses cut_loc
@@ -62,8 +80,13 @@ static void cut_chan_x_node(RRNodeId node, int x_low, int y_low, int x_high, int
6280
* @param interposer_cut_type Type of the interposer cut line (Horizontal or vertical)
6381
* @param sg_node_indices Sorted list of scatter-gather node IDs. We do not want to cut these nodes as they're allowed to cross an interposer cut line.
6482
*/
65-
static void cut_channel_node(RRNodeId node, int cut_loc, e_interposer_cut_type interposer_cut_type, const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder,
66-
RRSpatialLookup& spatial_lookup, const std::vector<std::pair<RRNodeId, int>>& sg_node_indices);
83+
static void cut_channel_node(RRNodeId node,
84+
int cut_loc,
85+
e_interposer_cut_type interposer_cut_type,
86+
const RRGraphView& rr_graph,
87+
RRGraphBuilder& rr_graph_builder,
88+
RRSpatialLookup& spatial_lookup,
89+
const std::vector<std::pair<RRNodeId, int>>& sg_node_indices);
6790

6891
// Function definitions
6992

@@ -189,8 +212,17 @@ std::vector<RREdgeId> mark_interposer_cut_edges_for_removal(const RRGraphView& r
189212
return edges_to_be_removed;
190213
}
191214

192-
static void cut_chan_y_node(RRNodeId node, int x_low, int y_low, int x_high, int y_high, int layer, int ptc_num, int cut_loc_y,
193-
Direction node_direction, RRGraphBuilder& rr_graph_builder, RRSpatialLookup& spatial_lookup) {
215+
static void cut_chan_y_node(RRNodeId node,
216+
int x_low,
217+
int y_low,
218+
int x_high,
219+
int y_high,
220+
int layer,
221+
int ptc_num,
222+
int cut_loc_y,
223+
Direction node_direction,
224+
RRGraphBuilder& rr_graph_builder,
225+
RRSpatialLookup& spatial_lookup) {
194226
if (node_direction == Direction::INC) {
195227
// Anything above cut_loc_y shouldn't exist
196228
rr_graph_builder.set_node_coordinates(node, x_low, y_low, x_high, cut_loc_y);
@@ -212,8 +244,17 @@ static void cut_chan_y_node(RRNodeId node, int x_low, int y_low, int x_high, int
212244
}
213245
}
214246

215-
static void cut_chan_x_node(RRNodeId node, int x_low, int y_low, int x_high, int y_high, int layer, int ptc_num, int cut_loc_x,
216-
Direction node_direction, RRGraphBuilder& rr_graph_builder, RRSpatialLookup& spatial_lookup) {
247+
static void cut_chan_x_node(RRNodeId node,
248+
int x_low,
249+
int y_low,
250+
int x_high,
251+
int y_high,
252+
int layer,
253+
int ptc_num,
254+
int cut_loc_x,
255+
Direction node_direction,
256+
RRGraphBuilder& rr_graph_builder,
257+
RRSpatialLookup& spatial_lookup) {
217258
if (node_direction == Direction::INC) {
218259
// Anything to the right of cut_loc_x shouldn't exist
219260
rr_graph_builder.set_node_coordinates(node, x_low, y_low, cut_loc_x, y_high);
@@ -235,8 +276,13 @@ static void cut_chan_x_node(RRNodeId node, int x_low, int y_low, int x_high, int
235276
}
236277
}
237278

238-
static void cut_channel_node(RRNodeId node, int cut_loc, e_interposer_cut_type interposer_cut_type, const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder,
239-
RRSpatialLookup& spatial_lookup, const std::vector<std::pair<RRNodeId, int>>& sg_node_indices) {
279+
static void cut_channel_node(RRNodeId node,
280+
int cut_loc,
281+
e_interposer_cut_type interposer_cut_type,
282+
const RRGraphView& rr_graph,
283+
RRGraphBuilder& rr_graph_builder,
284+
RRSpatialLookup& spatial_lookup,
285+
const std::vector<std::pair<RRNodeId, int>>& sg_node_indices) {
240286
constexpr auto node_indice_compare = [](RRNodeId l, RRNodeId r) noexcept { return size_t(l) < size_t(r); };
241287
bool is_sg_node = std::ranges::binary_search(std::views::keys(sg_node_indices), node, node_indice_compare);
242288
if (is_sg_node) {
@@ -273,7 +319,9 @@ static void cut_channel_node(RRNodeId node, int cut_loc, e_interposer_cut_type i
273319
}
274320
}
275321

276-
void update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(const RRGraphView& rr_graph, const DeviceGrid& grid, RRGraphBuilder& rr_graph_builder,
322+
void update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(const RRGraphView& rr_graph,
323+
const DeviceGrid& grid,
324+
RRGraphBuilder& rr_graph_builder,
277325
const std::vector<std::pair<RRNodeId, int>>& sg_node_indices) {
278326

279327
VTR_ASSERT(std::is_sorted(sg_node_indices.begin(), sg_node_indices.end()));

vpr/src/route/rr_graph_generation/rr_graph_interposer.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ std::vector<RREdgeId> mark_interposer_cut_edges_for_removal(const RRGraphView& r
2828
* @param rr_graph_builder RRGraphBuilder, to modify the RRGraph.
2929
* @param sg_node_indices list of scatter-gather node IDs. We do not want to cut these nodes as they're allowed to cross an interposer cut line.
3030
*/
31-
void update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(const RRGraphView& rr_graph, const DeviceGrid& grid, RRGraphBuilder& rr_graph_builder, const std::vector<std::pair<RRNodeId, int>>& sg_node_indices);
31+
void update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(const RRGraphView& rr_graph,
32+
const DeviceGrid& grid,
33+
RRGraphBuilder& rr_graph_builder,
34+
const std::vector<std::pair<RRNodeId, int>>& sg_node_indices);

0 commit comments

Comments
 (0)