@@ -2097,11 +2097,13 @@ void HierRTLMP::placeMacros(Cluster* cluster)
20972097
20982098 const int number_of_sequence_pair_macros
20992099 = static_cast <int >(hard_macros.size ());
2100+ const int minimum_perturbations_per_step = num_perturb_per_step_ / 10 ;
2101+ const bool large_macro_cluster
2102+ = number_of_sequence_pair_macros > minimum_perturbations_per_step;
21002103
2101- int num_perturb_per_step
2102- = (number_of_sequence_pair_macros > num_perturb_per_step_ / 10 )
2103- ? number_of_sequence_pair_macros
2104- : num_perturb_per_step_ / 10 ;
2104+ int perturbations_per_step = large_macro_cluster
2105+ ? number_of_sequence_pair_macros
2106+ : minimum_perturbations_per_step;
21052107
21062108 SequencePair initial_seq_pair;
21072109 if (cluster->isArrayOfInterconnectedMacros ()) {
@@ -2114,8 +2116,8 @@ void HierRTLMP::placeMacros(Cluster* cluster)
21142116 exchange_swap_prob = 1 .0f ;
21152117
21162118 // Large arrays need more steps to properly converge.
2117- if (number_of_sequence_pair_macros > num_perturb_per_step ) {
2118- num_perturb_per_step *= 2 ;
2119+ if (large_macro_cluster ) {
2120+ perturbations_per_step *= 2 ;
21192121 }
21202122 }
21212123
@@ -2151,7 +2153,7 @@ void HierRTLMP::placeMacros(Cluster* cluster)
21512153 exchange_swap_prob,
21522154 init_prob_,
21532155 max_num_step_,
2154- num_perturb_per_step ,
2156+ perturbations_per_step ,
21552157 random_seed_ + run_id,
21562158 graphics_.get (),
21572159 logger_,
0 commit comments