Skip to content

Commit 8bf5d2d

Browse files
add comments and address compilation warnings
1 parent ef8007f commit 8bf5d2d

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ void NetCostHandler::get_non_updatable_per_layer_bb_(ClusterNetId net_id, bool u
583583
vtr::NdMatrixProxy<int, 1> num_sink_layer = use_ts ? ts_layer_sink_pin_count_[size_t(net_id)] : move_ctx.num_sink_pin_layer[size_t(net_id)];
584584

585585
const int num_layers = device_ctx.grid.get_num_layers();
586-
VTR_ASSERT_DEBUG(bb_coord_new.size() == num_layers);
586+
VTR_ASSERT_DEBUG(bb_coord_new.size() == (size_t)num_layers);
587587

588588
ClusterBlockId bnum = cluster_ctx.clb_nlist.net_driver_block(net_id);
589589
t_pl_loc block_loc = block_locs[bnum].loc;
@@ -1388,8 +1388,8 @@ void NetCostHandler::get_layer_bb_from_scratch_(ClusterNetId net_id,
13881388
auto& block_locs = placer_state_.block_locs();
13891389

13901390
const int num_layers = device_ctx.grid.get_num_layers();
1391-
VTR_ASSERT_DEBUG(coords.size() == num_layers);
1392-
VTR_ASSERT_DEBUG(num_on_edges.size() == num_layers);
1391+
VTR_ASSERT_DEBUG(coords.size() == (size_t)num_layers);
1392+
VTR_ASSERT_DEBUG(num_on_edges.size() == (size_t)num_layers);
13931393

13941394
ClusterBlockId bnum = cluster_ctx.clb_nlist.net_driver_block(net_id);
13951395
t_pl_loc block_loc = block_locs[bnum].loc;

vpr/src/place/net_cost_handler.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ class NetCostHandler {
137137
std::function<double(e_cost_methods method)> comp_bb_cost_functor_;
138138
///@brief Points to the proper method for updating the bounding box of a net.
139139
std::function<void(ClusterNetId net_id, t_physical_tile_loc pin_old_loc, t_physical_tile_loc pin_new_loc, bool is_driver)> update_bb_functor_;
140-
140+
///@brief Points to the proper method for getting the bounding box cost of a net
141141
std::function<double(ClusterNetId)> get_net_bb_cost_functor_;
142-
142+
///@brief Points to the proper method for getting the non-updatable bounding box of a net
143143
std::function<void(const ClusterNetId net)> get_non_updatable_bb_functor_;
144144

145145
/**
@@ -268,10 +268,18 @@ class NetCostHandler {
268268
double& delta_timing_cost,
269269
bool is_src_moving);
270270

271-
272-
271+
/**
272+
* @brief Updates the bounding box coordinates of a net in the placer state
273+
* with coordinates stored in the `ts` bounding box coordinates container.
274+
* @param net_id ID of the net whose bounding box coordinates it to be updated.
275+
*/
273276
void set_ts_bb_coord_(const ClusterNetId net_id);
274277

278+
/**
279+
* @brief Updates the number of pins on each boundary of the bounding box for a net
280+
* in the placer state with the number of pins stores in the 'ts' num_on_edges containers.
281+
* @param net_id ID of the net whose number of pins on each BB edge is to be updated.
282+
*/
275283
void set_ts_edge_(const ClusterNetId net_id);
276284

277285
/**

0 commit comments

Comments
 (0)