Skip to content

Commit 4fa0b62

Browse files
committed
Changed a few data types so that int casting could be removed.
Signed-off-by: Ethan Rogers <[email protected]>
1 parent fa3f524 commit 4fa0b62

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

vpr/src/power/power.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,10 +1174,10 @@ void power_pb_pins_uninit() {
11741174
}
11751175

11761176
void power_routing_init(const t_det_routing_arch* routing_arch) {
1177-
int max_fanin;
1178-
int max_IPIN_fanin;
1179-
int max_seg_to_IPIN_fanout;
1180-
int max_seg_to_seg_fanout;
1177+
t_edge_size max_fanin;
1178+
t_edge_size max_IPIN_fanin;
1179+
t_edge_size max_seg_to_IPIN_fanout;
1180+
t_edge_size max_seg_to_seg_fanout;
11811181
auto& power_ctx = g_vpr_ctx.mutable_power();
11821182
auto& device_ctx = g_vpr_ctx.device();
11831183
const auto& rr_graph = device_ctx.rr_graph;
@@ -1206,17 +1206,16 @@ void power_routing_init(const t_det_routing_arch* routing_arch) {
12061206
max_seg_to_seg_fanout = 0;
12071207
max_seg_to_IPIN_fanout = 0;
12081208
for (size_t rr_node_idx = 0; rr_node_idx < device_ctx.rr_nodes.size(); rr_node_idx++) {
1209-
int fanout_to_IPIN = 0;
1210-
int fanout_to_seg = 0;
1209+
t_edge_size fanout_to_IPIN = 0;
1210+
t_edge_size fanout_to_seg = 0;
12111211
auto node = device_ctx.rr_nodes[rr_node_idx];
12121212
t_rr_node_power* node_power = &rr_node_power[rr_node_idx];
12131213
const t_edge_size node_fan_in = rr_graph.node_fan_in(RRNodeId(rr_node_idx));
12141214

12151215
switch (rr_graph.node_type(RRNodeId(rr_node_idx))) {
12161216
case IPIN:
1217-
max_IPIN_fanin = std::max(max_IPIN_fanin,
1218-
static_cast<int>(node_fan_in));
1219-
max_fanin = std::max(max_fanin, static_cast<int>(node_fan_in));
1217+
max_IPIN_fanin = std::max(max_IPIN_fanin, node_fan_in);
1218+
max_fanin = std::max(max_fanin, node_fan_in);
12201219

12211220
node_power->in_dens = (float*)vtr::calloc(node_fan_in,
12221221
sizeof(float));
@@ -1235,7 +1234,7 @@ void power_routing_init(const t_det_routing_arch* routing_arch) {
12351234
max_seg_to_IPIN_fanout = std::max(max_seg_to_IPIN_fanout,
12361235
fanout_to_IPIN);
12371236
max_seg_to_seg_fanout = std::max(max_seg_to_seg_fanout, fanout_to_seg);
1238-
max_fanin = std::max(max_fanin, static_cast<int>(node_fan_in));
1237+
max_fanin = std::max(max_fanin, node_fan_in);
12391238

12401239
node_power->in_dens = (float*)vtr::calloc(node_fan_in,
12411240
sizeof(float));

vpr/src/route/rr_graph.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ static void build_rr_graph(const t_graph_type graph_type,
507507
/* get maximum number of pins across all blocks */
508508
int max_pins = types[0].num_pins;
509509
for (const auto& type : types) {
510-
VTR_LOG("%s\n", type.name);
511510

512511
if (is_empty_type(&type)) {
513512
continue;

0 commit comments

Comments
 (0)