@@ -26,7 +26,6 @@ static bool f_placer_breakpoint_reached = false;
2626 * @param to_layer_num The layer that the block is moving to
2727 * @param is_range_fixed Whether the search range is fixed (e.g., in case of placement constraints)
2828 * @param search_range The search range to adjust
29- *
3029 */
3130static void adjust_search_range (t_logical_block_type_ptr block_type,
3231 const int compressed_column_num,
@@ -405,7 +404,7 @@ e_block_move_result identify_macro_self_swap_affected_macros(std::vector<int>& m
405404 int imacro_to = place_macros.get_imacro_from_iblk (blk_to);
406405
407406 if (imacro_to != -1 ) {
408- auto itr = std::find (macros. begin (), macros. end () , imacro_to);
407+ auto itr = std::ranges:: find (macros, imacro_to);
409408 if (itr == macros.end ()) {
410409 macros.push_back (imacro_to);
411410 outcome = identify_macro_self_swap_affected_macros (macros, imacro_to, swap_offset, blk_loc_registry, place_macros, move_abortion_logger);
@@ -432,7 +431,7 @@ e_block_move_result record_macro_self_swaps(t_pl_blocks_to_be_moved& blocks_affe
432431 }
433432
434433 // Remove any duplicate macros
435- affected_macros.resize (std::distance (affected_macros.begin (), std::unique (affected_macros.begin (), affected_macros. end () )));
434+ affected_macros.resize (std::distance (affected_macros.begin (), std::ranges:: unique (affected_macros) .begin ()));
436435
437436 std::vector<ClusterBlockId> displaced_blocks;
438437
@@ -448,14 +447,14 @@ e_block_move_result record_macro_self_swaps(t_pl_blocks_to_be_moved& blocks_affe
448447 auto is_non_macro_block = [&](ClusterBlockId blk) {
449448 int imacro_blk = place_macros.get_imacro_from_iblk (blk);
450449
451- if (std::find (affected_macros. begin (), affected_macros. end () , imacro_blk) != affected_macros.end ()) {
450+ if (std::ranges:: find (affected_macros, imacro_blk) != affected_macros.end ()) {
452451 return false ;
453452 }
454453 return true ;
455454 };
456455
457456 std::vector<ClusterBlockId> non_macro_displaced_blocks;
458- std::copy_if (displaced_blocks. begin (), displaced_blocks. end () , std::back_inserter (non_macro_displaced_blocks), is_non_macro_block);
457+ std::ranges:: copy_if (displaced_blocks, std::back_inserter (non_macro_displaced_blocks), is_non_macro_block);
459458
460459 // Based on the currently queued block moves, find the empty 'holes' left behind
461460 auto empty_locs = blocks_affected.determine_locations_emptied_by_move ();
@@ -863,7 +862,6 @@ bool find_to_loc_centroid(t_logical_block_type_ptr blk_type,
863862 }
864863
865864 // Determine the valid compressed grid location ranges
866- int delta_cx;
867865 t_bb search_range;
868866
869867 // If we are early in the anneal and the range limit still big enough --> search around the center location that the move proposed
@@ -878,7 +876,7 @@ bool find_to_loc_centroid(t_logical_block_type_ptr blk_type,
878876 compressed_loc_on_layer,
879877 std::min<float >(range_limiters.original_rlim , range_limiters.dm_rlim ));
880878 }
881- delta_cx = search_range.xmax - search_range.xmin ;
879+ int delta_cx = search_range.xmax - search_range.xmin ;
882880
883881 bool block_constrained = is_cluster_constrained (b_from);
884882
@@ -1141,7 +1139,6 @@ t_bb get_compressed_grid_bounded_search_range(const t_compressed_block_grid& com
11411139 const t_physical_tile_loc& from_compressed_loc,
11421140 const t_physical_tile_loc& target_compressed_loc,
11431141 float rlim) {
1144- t_bb search_range;
11451142
11461143 int min_cx, max_cx, min_cy, max_cy;
11471144
@@ -1174,7 +1171,7 @@ t_bb get_compressed_grid_bounded_search_range(const t_compressed_block_grid& com
11741171 max_cy = std::min<int >(compressed_block_grid.get_num_rows (layer_num) - 1 , cy_from + rlim_y_max_range);
11751172 }
11761173
1177- search_range = t_bb (min_cx, max_cx, min_cy, max_cy, layer_num, layer_num);
1174+ t_bb search_range = t_bb (min_cx, max_cx, min_cy, max_cy, layer_num, layer_num);
11781175
11791176 return search_range;
11801177}
0 commit comments