Skip to content

Commit 9908a51

Browse files
committed
gpl: remove commented code
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
1 parent d42a51a commit 9908a51

2 files changed

Lines changed: 2 additions & 43 deletions

File tree

src/gpl/src/graphicsImpl.cpp

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void GraphicsImpl::debugForNesterovPlace(
8484
main_chart_->setYAxisFormats({"%.2e", "%.2f"});
8585
main_chart_->setYAxisMin({std::nullopt, 0});
8686

87-
// Useful for debugging multiple NesterovBase: Density penalty and PhiCoef
87+
// Useful for debugging : Density penalty and PhiCoef
8888
if (logger_->debugCheck(utl::GPL, "debugPlot", 1)) {
8989
if (!nbVec_.empty()) {
9090
std::vector<std::string> region_names;
@@ -112,21 +112,6 @@ void GraphicsImpl::debugForNesterovPlace(
112112
stepLength_chart_->setXAxisFormat("%d");
113113
stepLength_chart_->setYAxisFormats({"%.2e", "%.2f", "%.2f"});
114114
stepLength_chart_->setYAxisMin({0.0, 0.0, 0.0});
115-
116-
// Version with regions
117-
// density_chart_
118-
// = gui->addChart("GPL Density Penalty", "Iteration",
119-
// series_names);
120-
// density_chart_->setXAxisFormat("%d");
121-
// std::vector<std::string> y_formats(nbVec_.size(), "%.3f");
122-
// density_chart_->setYAxisFormats(y_formats);
123-
// std::vector<std::optional<double>> y_mins(nbVec_.size(), 0.0);
124-
// density_chart_->setYAxisMin(y_mins);
125-
126-
// phi_chart_ = gui->addChart("GPL PhiCoef", "Iteration", series_names);
127-
// phi_chart_->setXAxisFormat("%d");
128-
// phi_chart_->setYAxisFormats(y_formats);
129-
// phi_chart_->setYAxisMin(y_mins);
130115
}
131116
}
132117
initHeatmap();
@@ -563,7 +548,6 @@ void GraphicsImpl::addIter(const int iter, const double overflow)
563548
odb::dbBlock* block = pbc_->db()->getChip()->getBlock();
564549
main_chart_->addPoint(iter, {block->dbuToMicrons(nbc_->getHpwl()), overflow});
565550

566-
// Add density penalties snapshot for each NesterovBase
567551
if (logger_->debugCheck(utl::GPL, "debugPlot", 1)) {
568552
if (density_chart_) {
569553
std::vector<double> values;
@@ -577,27 +561,6 @@ void GraphicsImpl::addIter(const int iter, const double overflow)
577561
density_chart_->addPoint(iter, values);
578562
}
579563

580-
// Version with regions
581-
// if (density_chart_) {
582-
// std::vector<double> penalties;
583-
// penalties.reserve(nbVec_.size());
584-
// for (const auto& nb : nbVec_) {
585-
// double penalty
586-
// = nb ? static_cast<double>(nb->getDensityPenalty()) : 0.0;
587-
// penalties.push_back(penalty);
588-
// }
589-
// density_chart_->addPoint(iter, penalties);
590-
// }
591-
// if (phi_chart_) {
592-
// std::vector<double> coefs;
593-
// coefs.reserve(nbVec_.size());
594-
// for (const auto& nb : nbVec_) {
595-
// double coef = nb ? static_cast<double>(nb->getStoredPhiCoef()) : 0.0;
596-
// coefs.push_back(coef);
597-
// }
598-
// phi_chart_->addPoint(iter, coefs);
599-
// }
600-
601564
if (stepLength_chart_) {
602565
std::vector<double> values;
603566
if (!nbVec_.empty() && nbVec_[0]) {

src/gpl/src/nesterovBase.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,11 +1192,10 @@ class NesterovBase
11921192
float uniformTargetDensity_ = 0;
11931193

11941194
// StepLength parameters (also included in the np debugPrint)
1195+
// alpha
11951196
float stepLength_ = 0;
11961197
float coordiDistance_ = 0;
11971198
float gradDistance_ = 0;
1198-
// numBackTrack (nesterovPlace.cpp)
1199-
// newWireLengthCoef (nesterovPlace.cpp)
12001199

12011200
// Nesterov loop data for each region, using parallel vectors
12021201
// SLP is Step Length Prediction.
@@ -1243,9 +1242,6 @@ class NesterovBase
12431242
float wireLengthGradSum_ = 0;
12441243
float densityGradSum_ = 0;
12451244

1246-
// alpha
1247-
// float stepLength_ = 0;
1248-
12491245
// opt_phi_cof
12501246
float densityPenalty_ = 0;
12511247

0 commit comments

Comments
 (0)