Skip to content

Commit d453bce

Browse files
pass t_chan_width by reference
1 parent bae2aa0 commit d453bce

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

vpr/src/route/rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ static void build_rr_graph(e_graph_type graph_type,
12501250

12511251
// Add routing resources to rr_graph lookup table
12521252
alloc_and_load_rr_node_indices(device_ctx.rr_graph_builder,
1253-
&nodes_per_chan,
1253+
nodes_per_chan,
12541254
grid,
12551255
&num_rr_nodes,
12561256
chan_details_x,

vpr/src/route/rr_graph2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ static void add_classes_spatial_lookup(RRGraphBuilder& rr_graph_builder,
14411441

14421442
/* As the rr_indices builders modify a local copy of indices, use the local copy in the builder */
14431443
void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder,
1444-
const t_chan_width* nodes_per_chan,
1444+
const t_chan_width& nodes_per_chan,
14451445
const DeviceGrid& grid,
14461446
int* index,
14471447
const t_chan_details& chan_details_x,
@@ -1464,9 +1464,9 @@ void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder,
14641464
load_block_rr_indices(rr_graph_builder, grid, index, is_flat);
14651465

14661466
/* Load the data for x and y channels */
1467-
load_chan_rr_indices(nodes_per_chan->x_max, grid, grid.width(), grid.height(),
1467+
load_chan_rr_indices(nodes_per_chan.x_max, grid, grid.width(), grid.height(),
14681468
e_rr_type::CHANX, chan_details_x, rr_graph_builder, index);
1469-
load_chan_rr_indices(nodes_per_chan->y_max, grid, grid.height(), grid.width(),
1469+
load_chan_rr_indices(nodes_per_chan.y_max, grid, grid.height(), grid.width(),
14701470
e_rr_type::CHANY, chan_details_y, rr_graph_builder, index);
14711471
}
14721472

vpr/src/route/rr_graph2.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef RR_GRAPH2_H
2-
#define RR_GRAPH2_H
1+
#pragma once
2+
33
#include <vector>
44

55
#include "build_switchblocks.h"
@@ -15,7 +15,7 @@
1515
/******************* Subroutines exported by rr_graph2.c *********************/
1616

1717
void alloc_and_load_rr_node_indices(RRGraphBuilder& rr_graph_builder,
18-
const t_chan_width* nodes_per_chan,
18+
const t_chan_width& nodes_per_chan,
1919
const DeviceGrid& grid,
2020
int* index,
2121
const t_chan_details& chan_details_x,
@@ -252,4 +252,3 @@ void dump_track_to_pin_map(t_track_to_pin_lookup& track_to_pin_map,
252252
FILE* fp);
253253

254254
inline int get_chan_width(enum e_side side, const t_chan_width& nodes_per_channel);
255-
#endif

0 commit comments

Comments
 (0)