Skip to content

Commit b39cfe8

Browse files
unlock place_loc_vars before accessing it
1 parent 67fe9c3 commit b39cfe8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vpr/src/place/place.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,11 +2436,16 @@ static void calculate_reward_and_process_outcome(
24362436

24372437
static void copy_locs_to_global_state(const PlaceLocVars& place_loc_vars) {
24382438
auto& place_ctx = g_vpr_ctx.mutable_placement();
2439-
auto& global_place_loc_vars = place_ctx.mutable_place_loc_vars();
24402439

2440+
// the placement location variables should be unlocked before being accessed
24412441
place_ctx.unlock_loc_vars();
24422442

2443+
// copy the local location variables into the global state
2444+
auto& global_place_loc_vars = place_ctx.mutable_place_loc_vars();
24432445
global_place_loc_vars = place_loc_vars;
24442446

2447+
#ifndef NO_GRAPHICS
2448+
// update the graphics' reference to placement location variables
24452449
set_graphics_place_loc_vars_ref(global_place_loc_vars);
2450+
#endif
24462451
}

0 commit comments

Comments
 (0)