Skip to content

Commit d0ddc9f

Browse files
committed
[vpr][place] fix compile error
1 parent 3d61bf1 commit d0ddc9f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vpr/src/place/initial_placement.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,11 @@ static bool find_centroid_neighbor(t_pl_loc& centroid_loc,
417417
centroid_loc,
418418
num_layers);
419419

420-
size_t max_dim = 0;
420+
int max_dim = 0;
421421
for (int layer = 0; layer < num_layers; layer++) {
422-
max_dim = std::max(max_dim, std::max(compressed_block_grid.get_num_rows(layer), compressed_block_grid.get_num_columns(layer)));
422+
int num_rows = static_cast<int>(compressed_block_grid.get_num_rows(layer));
423+
int num_cols = static_cast<int>(compressed_block_grid.get_num_columns(layer));
424+
max_dim = std::max(max_dim, std::max(num_rows, num_cols));
423425
}
424426

425427
bool legal = false;
@@ -564,6 +566,7 @@ static std::vector<ClusterBlockId> find_centroid_loc(const t_pl_macro& pl_macro,
564566
layer_count[block_locs[block].loc.layer]++;
565567
acc_weight++;
566568
}
569+
}
567570
}
568571
}
569572

0 commit comments

Comments
 (0)