Skip to content

Commit 8e5b263

Browse files
fix for PR comments
Signed-off-by: Ravi Varadarajan <[email protected]>
1 parent 880921f commit 8e5b263

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/mpl2/src/SimulatedAnnealingCore.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,12 +561,10 @@ void SimulatedAnnealingCore<T>::fastSA()
561561
template <class T>
562562
void SimulatedAnnealingCore<T>::writeCostFile(std::string file_name) const
563563
{
564-
std::ofstream file;
565-
file.open(file_name);
564+
std::ofstream file(file_name);
566565
for (auto i = 0; i < cost_list_.size(); i++) {
567566
file << T_list_[i] << " " << cost_list_[i] << std::endl;
568567
}
569-
file.close();
570568
}
571569

572570
template class SimulatedAnnealingCore<SoftMacro>;

src/mpl2/src/hier_rtlmp.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,6 @@ void HierRTLMP::setReportDirectory(const char* report_directory)
211211
// Top Level Interface function
212212
void HierRTLMP::hierRTLMacroPlacer()
213213
{
214-
//
215-
// Determine the size thresholds of parent clusters based on leaf cluster
216-
// thresholds and the coarsening factor
217-
//
218-
// unsigned coarsening_factor = std::pow(coarsening_ratio_, max_num_level_ -
219-
// 1); max_num_macro_base_ = max_num_macro_base_ * coarsening_factor;
220-
// min_num_macro_base_ = min_num_macro_base_ * coarsening_factor;
221-
// max_num_inst_base_ = max_num_inst_base_ * coarsening_factor;
222-
// min_num_inst_base_ = min_num_inst_base_ * coarsening_factor;
223-
224214
//
225215
// Get the database information
226216
//
@@ -481,9 +471,9 @@ Metric* HierRTLMP::computeMetric(odb::dbModule* module)
481471

482472
for (odb::dbInst* inst : module->getInsts()) {
483473
const sta::LibertyCell* liberty_cell = network_->libertyCell(inst);
484-
odb::dbMaster* master = inst->getMaster();
485474
if (liberty_cell == nullptr)
486475
continue;
476+
odb::dbMaster* master = inst->getMaster();
487477
// check if the instance is a pad or a cover macro
488478
if (master->isPad() || master->isCover()) {
489479
continue;

0 commit comments

Comments
 (0)