@@ -339,12 +339,12 @@ float PlacementAnnealer::estimate_starting_temperature() {
339339 e_move_result swap_result = try_swap (move_generator_1_, placer_opts_.place_algorithm ,
340340 REWARD_BB_TIMING_RELATIVE_WEIGHT, manual_move_enabled);
341341
342- if (swap_result == ACCEPTED) {
342+ if (swap_result == e_move_result:: ACCEPTED) {
343343 num_accepted++;
344344 av += costs_.cost ;
345345 sum_of_squares += costs_.cost * costs_.cost ;
346346 swap_stats_.num_swap_accepted ++;
347- } else if (swap_result == ABORTED) {
347+ } else if (swap_result == e_move_result:: ABORTED) {
348348 swap_stats_.num_swap_aborted ++;
349349 } else {
350350 swap_stats_.num_swap_rejected ++;
@@ -455,7 +455,7 @@ e_move_result PlacementAnnealer::try_swap(MoveGenerator& move_generator,
455455 " illegal move" );
456456 }
457457
458- move_outcome = ABORTED;
458+ move_outcome = e_move_result:: ABORTED;
459459
460460 } else {
461461 VTR_ASSERT (create_move_outcome == e_create_move::VALID);
@@ -553,7 +553,7 @@ e_move_result PlacementAnnealer::try_swap(MoveGenerator& move_generator,
553553 }
554554#endif // NO_GRAPHICS
555555
556- if (move_outcome == ACCEPTED) {
556+ if (move_outcome == e_move_result:: ACCEPTED) {
557557 costs_.cost += delta_c;
558558 costs_.bb_cost += bb_delta_c;
559559
@@ -601,7 +601,7 @@ e_move_result PlacementAnnealer::try_swap(MoveGenerator& move_generator,
601601#endif // NO_GRAPHICS
602602
603603 } else {
604- VTR_ASSERT_SAFE (move_outcome == REJECTED);
604+ VTR_ASSERT_SAFE (move_outcome == e_move_result:: REJECTED);
605605
606606 // Reset the net cost function flags first.
607607 net_cost_handler_.reset_move_nets ();
@@ -652,7 +652,7 @@ e_move_result PlacementAnnealer::try_swap(MoveGenerator& move_generator,
652652 move_outcome_stats.delta_timing_cost_abs = timing_delta_c;
653653
654654 if constexpr (VTR_ENABLE_DEBUG_LOGGING_CONST_EXPR) {
655- LOG_MOVE_STATS_OUTCOME (delta_c, bb_delta_c, timing_delta_c, (move_outcome ? " ACCEPTED" : " REJECTED" ), " " );
655+ LOG_MOVE_STATS_OUTCOME (delta_c, bb_delta_c, timing_delta_c, (move_outcome == e_move_result::ACCEPTED ? " ACCEPTED" : " REJECTED" ), " " );
656656 }
657657 }
658658 move_outcome_stats.outcome = move_outcome;
@@ -721,11 +721,11 @@ void PlacementAnnealer::placement_inner_loop(MoveGenerator& move_generator,
721721 e_move_result swap_result = try_swap (move_generator, placer_opts_.place_algorithm ,
722722 timing_bb_factor, manual_move_enabled);
723723
724- if (swap_result == ACCEPTED) {
724+ if (swap_result == e_move_result:: ACCEPTED) {
725725 // Move was accepted. Update statistics that are useful for the annealing schedule.
726726 placer_stats_.single_swap_update (costs_);
727727 swap_stats_.num_swap_accepted ++;
728- } else if (swap_result == ABORTED) {
728+ } else if (swap_result == e_move_result:: ABORTED) {
729729 swap_stats_.num_swap_aborted ++;
730730 } else { // swap_result == REJECTED
731731 swap_stats_.num_swap_rejected ++;
@@ -879,20 +879,20 @@ e_move_result PlacementAnnealer::assess_swap_(double delta_c, double t) {
879879 VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t Temperature is: %e delta_c is %e\n " , t, delta_c);
880880 if (delta_c <= 0 ) {
881881 VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t\t Move is accepted(delta_c < 0)\n " );
882- return ACCEPTED;
882+ return e_move_result:: ACCEPTED;
883883 }
884884
885885 if (t == 0 .) {
886886 VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t\t Move is rejected(t == 0)\n " );
887- return REJECTED;
887+ return e_move_result:: REJECTED;
888888 }
889889
890890 float fnum = rng_.frand ();
891891 float prob_fac = std::exp (-delta_c / t);
892892 if (prob_fac > fnum) {
893893 VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t\t Move is accepted(hill climbing)\n " );
894- return ACCEPTED;
894+ return e_move_result:: ACCEPTED;
895895 }
896896 VTR_LOGV_DEBUG (g_vpr_ctx.placement ().f_placer_debug , " \t\t Move is rejected(hill climbing)\n " );
897- return REJECTED;
897+ return e_move_result:: REJECTED;
898898}
0 commit comments