Skip to content

Commit fbc9452

Browse files
committed
[vpr][place] apply Vaughn's comments on place.cpp
1 parent 165931c commit fbc9452

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ void free_chan_w_factors_for_place_cost () {
22162216
chany_place_cost_fac.clear();
22172217
}
22182218

2219-
void init_net_cost_structs(size_t num_nets) {
2219+
void init_place_move_structs(size_t num_nets) {
22202220
net_cost.resize(num_nets, -1.);
22212221
proposed_net_cost.resize(num_nets, -1.);
22222222
/* Used to store costs for moves not yet made and to indicate when a net's *
@@ -2225,7 +2225,7 @@ void init_net_cost_structs(size_t num_nets) {
22252225
bb_updated_before.resize(num_nets, NetUpdateState::NOT_UPDATED_YET);
22262226
}
22272227

2228-
void free_net_cost_structs() {
2228+
void free_place_move_structs() {
22292229
vtr::release_memory(net_cost);
22302230
vtr::release_memory(proposed_net_cost);
22312231
vtr::release_memory(bb_updated_before);

vpr/src/place/net_cost_handler.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
/**
88
* @brief The method used to calculate palcement cost
9+
* @details For comp_cost. NORMAL means use the method that generates updateable bounding boxes for speed.
10+
* CHECK means compute all bounding boxes from scratch using a very simple routine to allow checks
11+
* of the other costs.
912
* NORMAL: Compute cost efficiently using incremental techniques.
1013
* CHECK: Brute-force cost computation; useful to validate the more complex incremental cost update code.
1114
*/
@@ -125,12 +128,12 @@ void free_chan_w_factors_for_place_cost ();
125128
* @brief Resize net_cost, proposed_net_cost, and bb_updated_before data structures to accommodate all nets.
126129
* @param num_nets Number of nets in the netlist (clustered currently) that the placement engine uses.
127130
*/
128-
void init_net_cost_structs(size_t num_nets);
131+
void init_place_move_structs(size_t num_nets);
129132

130133
/**
131134
* @brief Free net_cost, proposed_net_cost, and bb_updated_before data structures.
132135
*/
133-
void free_net_cost_structs();
136+
void free_place_move_structs();
134137

135138
/**
136139
* @brief Resize temporary storage data structures needed to determine which nets are affected by a move and data needed per net

vpr/src/place/place.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ static constexpr double ERROR_TOL = .01;
9898
* variables round-offs check. */
9999
static constexpr int MAX_MOVES_BEFORE_RECOMPUTE = 500000;
100100

101-
/* For comp_cost. NORMAL means use the method that generates updateable *
102-
* bounding boxes for speed. CHECK means compute all bounding boxes from *
103-
* scratch using a very simple routine to allow checks of the other *
104-
* costs.
105-
*/
106-
107101
constexpr float INVALID_DELAY = std::numeric_limits<float>::quiet_NaN();
108102
constexpr float INVALID_COST = std::numeric_limits<double>::quiet_NaN();
109103

@@ -1905,7 +1899,7 @@ static void alloc_and_load_placement_structs(float place_cost_exp,
19051899
}
19061900
}
19071901

1908-
init_net_cost_structs(num_nets);
1902+
init_place_move_structs(num_nets);
19091903

19101904
if (cube_bb) {
19111905
place_move_ctx.bb_coords.resize(num_nets, t_bb());
@@ -1951,7 +1945,7 @@ static void free_placement_structs(const t_placer_opts& placer_opts, const t_noc
19511945

19521946
free_placement_macros_structs();
19531947

1954-
free_net_cost_structs();
1948+
free_place_move_structs();
19551949

19561950
vtr::release_memory(place_move_ctx.bb_coords);
19571951
vtr::release_memory(place_move_ctx.bb_num_on_edges);

0 commit comments

Comments
 (0)