Skip to content

Commit 98f3044

Browse files
rename *chann* to *chan* in NetCostHandler
1 parent f710560 commit 98f3044

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ NetCostHandler::NetCostHandler(const t_placer_opts& placer_opts,
105105
if (cube_bb_) {
106106
ts_bb_edge_new_.resize(num_nets, t_bb());
107107
ts_bb_coord_new_.resize(num_nets, t_bb());
108-
ts_avg_chann_util_new_.resize(num_nets, {0., 0.});
108+
ts_avg_chan_util_new_.resize(num_nets, {0., 0.});
109109

110110
bb_coords_.resize(num_nets, t_bb());
111-
avg_chann_util_.resize(num_nets, {0., 0.});
111+
avg_chan_util_.resize(num_nets, {0., 0.});
112112

113113
bb_num_on_edges_.resize(num_nets, t_bb());
114114
comp_bb_cong_cost_functor_ = std::bind(&NetCostHandler::comp_cube_bb_cong_cost_, this, std::placeholders::_1);
@@ -563,7 +563,7 @@ void NetCostHandler::get_non_updatable_cube_bb_(ClusterNetId net_id, bool use_ts
563563
}
564564

565565
if (congestion_modeling_started_) {
566-
auto& [x_chan_util, y_chan_util] = use_ts ? ts_avg_chann_util_new_[net_id] : avg_chann_util_[net_id];
566+
auto& [x_chan_util, y_chan_util] = use_ts ? ts_avg_chan_util_new_[net_id] : avg_chan_util_[net_id];
567567
const int total_channels = (bb_coord_new.xmax - bb_coord_new.xmin + 1) * (bb_coord_new.ymax - bb_coord_new.ymin + 1);
568568
x_chan_util = acc_chan_util_.x.get_sum(bb_coord_new.xmin, bb_coord_new.ymin, bb_coord_new.xmax, bb_coord_new.ymax) / total_channels;
569569
y_chan_util = acc_chan_util_.y.get_sum(bb_coord_new.xmin, bb_coord_new.ymin, bb_coord_new.xmax, bb_coord_new.ymax) / total_channels;
@@ -876,7 +876,7 @@ void NetCostHandler::update_bb_(ClusterNetId net_id,
876876
}
877877

878878
if (congestion_modeling_started_) {
879-
auto& [x_chan_util, y_chan_util] = ts_avg_chann_util_new_[net_id];
879+
auto& [x_chan_util, y_chan_util] = ts_avg_chan_util_new_[net_id];
880880
const int total_channels = (bb_coord_new.xmax - bb_coord_new.xmin + 1) * (bb_coord_new.ymax - bb_coord_new.ymin + 1);
881881
x_chan_util = acc_chan_util_.x.get_sum(bb_coord_new.xmin, bb_coord_new.ymin, bb_coord_new.xmax, bb_coord_new.ymax) / total_channels;
882882
y_chan_util = acc_chan_util_.y.get_sum(bb_coord_new.xmin, bb_coord_new.ymin, bb_coord_new.xmax, bb_coord_new.ymax) / total_channels;
@@ -1317,7 +1317,7 @@ void NetCostHandler::get_bb_from_scratch_(ClusterNetId net_id, bool use_ts) {
13171317
num_on_edges.layer_max = layer_max_edge;
13181318

13191319
if (congestion_modeling_started_) {
1320-
auto& [x_chan_util, y_chan_util] = use_ts ? ts_avg_chann_util_new_[net_id] : avg_chann_util_[net_id];
1320+
auto& [x_chan_util, y_chan_util] = use_ts ? ts_avg_chan_util_new_[net_id] : avg_chan_util_[net_id];
13211321
const int total_channels = (coords.xmax - coords.xmin + 1) * (coords.ymax - coords.ymin + 1);
13221322
x_chan_util = acc_chan_util_.x.get_sum(coords.xmin, coords.ymin, coords.xmax, coords.ymax) / total_channels;
13231323
y_chan_util = acc_chan_util_.y.get_sum(coords.xmin, coords.ymin, coords.xmax, coords.ymax) / total_channels;
@@ -1418,7 +1418,7 @@ double NetCostHandler::get_net_cube_bb_cost_(ClusterNetId net_id, bool use_ts) {
14181418

14191419
double NetCostHandler::get_net_cube_cong_cost_(ClusterNetId net_id, bool use_ts) {
14201420
VTR_ASSERT_SAFE(congestion_modeling_started_);
1421-
const auto [x_chan_util, y_chan_util] = use_ts ? ts_avg_chann_util_new_[net_id] : avg_chann_util_[net_id];
1421+
const auto [x_chan_util, y_chan_util] = use_ts ? ts_avg_chan_util_new_[net_id] : avg_chan_util_[net_id];
14221422

14231423
const float threshold = placer_opts_.congestion_chan_util_threshold;
14241424

@@ -1862,7 +1862,7 @@ const ChannelData<vtr::NdMatrix<double, 3>>& NetCostHandler::get_chan_util() con
18621862
void NetCostHandler::set_ts_bb_coord_(const ClusterNetId net_id) {
18631863
if (cube_bb_) {
18641864
bb_coords_[net_id] = ts_bb_coord_new_[net_id];
1865-
avg_chann_util_[net_id] = ts_avg_chann_util_new_[net_id];
1865+
avg_chan_util_[net_id] = ts_avg_chan_util_new_[net_id];
18661866
} else {
18671867
layer_bb_coords_[net_id] = layer_ts_bb_coord_new_[net_id];
18681868
}

vpr/src/place/net_cost_handler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class NetCostHandler {
214214
/* [0...num_affected_nets] -> net_id of the affected nets */
215215
std::vector<ClusterNetId> ts_nets_to_update_;
216216

217-
vtr::vector<ClusterNetId, std::pair<float, float>> ts_avg_chann_util_new_;
217+
vtr::vector<ClusterNetId, std::pair<float, float>> ts_avg_chan_util_new_;
218218

219219
/// Store the number of blocks on each of a net's bounding box (to allow efficient updates)
220220
/// [0..cluster_ctx.clb_nlist.nets().size()-1]
@@ -224,7 +224,7 @@ class NetCostHandler {
224224
/// [0..cluster_ctx.clb_nlist.nets().size()-1]
225225
vtr::vector<ClusterNetId, t_bb> bb_coords_;
226226

227-
vtr::vector<ClusterNetId, std::pair<float, float>> avg_chann_util_;
227+
vtr::vector<ClusterNetId, std::pair<float, float>> avg_chan_util_;
228228

229229
/// Store the number of blocks on each of a net's bounding box (to allow efficient updates)
230230
/// [0..cluster_ctx.clb_nlist.nets().size()-1]

0 commit comments

Comments
 (0)