@@ -319,12 +319,11 @@ static void generate_post_place_timing_reports(const t_placer_opts& placer_opts,
319
319
bool is_flat);
320
320
321
321
// calculate the agent's reward and the total process outcome
322
- static void calculate_reward_and_process_outcome (
323
- const t_placer_opts& placer_opts,
324
- const MoveOutcomeStats& move_outcome_stats,
325
- const double & delta_c,
326
- float timing_bb_factor,
327
- MoveGenerator& move_generator);
322
+ static void calculate_reward_and_process_outcome (const t_placer_opts& placer_opts,
323
+ const MoveOutcomeStats& move_outcome_stats,
324
+ double delta_c,
325
+ float timing_bb_factor,
326
+ MoveGenerator& move_generator);
328
327
329
328
static void print_place_status_header (bool noc_enabled);
330
329
@@ -2023,7 +2022,7 @@ static int check_placement_costs(const t_placer_costs& costs,
2023
2022
double bb_cost_check;
2024
2023
double timing_cost_check;
2025
2024
2026
- const auto & cube_bb = g_vpr_ctx.placement ().cube_bb ;
2025
+ const bool cube_bb = g_vpr_ctx.placement ().cube_bb ;
2027
2026
2028
2027
if (cube_bb) {
2029
2028
bb_cost_check = comp_bb_cost (CHECK);
@@ -2398,28 +2397,25 @@ static void print_placement_move_types_stats(const MoveTypeStat& move_type_stat)
2398
2397
VTR_LOG (" \n " );
2399
2398
}
2400
2399
2401
- static void calculate_reward_and_process_outcome (
2402
- const t_placer_opts& placer_opts,
2403
- const MoveOutcomeStats& move_outcome_stats,
2404
- const double & delta_c,
2405
- float timing_bb_factor,
2406
- MoveGenerator& move_generator) {
2407
- std::string reward_fun_string = placer_opts.place_reward_fun ;
2400
+ static void calculate_reward_and_process_outcome (const t_placer_opts& placer_opts,
2401
+ const MoveOutcomeStats& move_outcome_stats,
2402
+ double delta_c,
2403
+ float timing_bb_factor,
2404
+ MoveGenerator& move_generator) {
2408
2405
static std::optional<e_reward_function> reward_fun;
2409
2406
if (!reward_fun.has_value ()) {
2410
- reward_fun = string_to_reward (reward_fun_string );
2407
+ reward_fun = string_to_reward (placer_opts. place_reward_fun );
2411
2408
}
2412
2409
2413
- if (reward_fun == BASIC) {
2410
+ if (reward_fun == e_reward_function:: BASIC) {
2414
2411
move_generator.process_outcome (-1 * delta_c, reward_fun.value ());
2415
- } else if (reward_fun == NON_PENALIZING_BASIC
2416
- || reward_fun == RUNTIME_AWARE) {
2412
+ } else if (reward_fun == e_reward_function::NON_PENALIZING_BASIC || reward_fun == e_reward_function::RUNTIME_AWARE) {
2417
2413
if (delta_c < 0 ) {
2418
2414
move_generator.process_outcome (-1 * delta_c, reward_fun.value ());
2419
2415
} else {
2420
2416
move_generator.process_outcome (0 , reward_fun.value ());
2421
2417
}
2422
- } else if (reward_fun == WL_BIASED_RUNTIME_AWARE) {
2418
+ } else if (reward_fun == e_reward_function:: WL_BIASED_RUNTIME_AWARE) {
2423
2419
if (delta_c < 0 ) {
2424
2420
float reward = -1
2425
2421
* (move_outcome_stats.delta_cost_norm
0 commit comments