Skip to content

Commit 9bc390e

Browse files
committed
gpl: move NBC member function definitions related to routability to CPP file instead of header
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
1 parent b9781fc commit 9bc390e

2 files changed

Lines changed: 41 additions & 35 deletions

File tree

src/gpl/src/nesterovBase.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,43 @@ int64_t NesterovBaseCommon::getHpwl()
14611461
return hpwl;
14621462
}
14631463

1464+
void NesterovBaseCommon::resetMinRcCellSize()
1465+
{
1466+
minRcCellSize_.clear();
1467+
minRcCellSize_.shrink_to_fit();
1468+
}
1469+
1470+
void NesterovBaseCommon::resizeMinRcCellSize()
1471+
{
1472+
minRcCellSize_.resize(nbc_gcells_.size(), std::make_pair(0, 0));
1473+
}
1474+
1475+
void NesterovBaseCommon::updateMinRcCellSize()
1476+
{
1477+
for (auto& gCell : nbc_gcells_) {
1478+
if (!gCell->isStdInstance()) {
1479+
continue;
1480+
}
1481+
1482+
minRcCellSize_[&gCell - nbc_gcells_.data()]
1483+
= std::make_pair(gCell->dx(), gCell->dy());
1484+
}
1485+
}
1486+
1487+
void NesterovBaseCommon::revertGCellSizeToMinRc()
1488+
{
1489+
// revert back the gcell sizes
1490+
for (auto& gCell : nbc_gcells_) {
1491+
if (!gCell->isStdInstance()) {
1492+
continue;
1493+
}
1494+
1495+
int idx = &gCell - nbc_gcells_.data();
1496+
1497+
gCell->setSize(minRcCellSize_[idx].first, minRcCellSize_[idx].second);
1498+
}
1499+
}
1500+
14641501
GCell* NesterovBaseCommon::getGCellByIndex(size_t i)
14651502
{
14661503
if (i >= gCellStor_.size()) {

src/gpl/src/nesterovBase.h

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -838,41 +838,10 @@ class NesterovBaseCommon
838838
void moveGCell(odb::dbInst* db_inst);
839839
void fixPointers();
840840

841-
void resetMinRcCellSize()
842-
{
843-
minRcCellSize_.clear();
844-
minRcCellSize_.shrink_to_fit();
845-
}
846-
847-
void resizeMinRcCellSize()
848-
{
849-
minRcCellSize_.resize(nbc_gcells_.size(), std::make_pair(0, 0));
850-
}
851-
void updateMinRcCellSize()
852-
{
853-
for (auto& gCell : nbc_gcells_) {
854-
if (!gCell->isStdInstance()) {
855-
continue;
856-
}
857-
858-
minRcCellSize_[&gCell - nbc_gcells_.data()]
859-
= std::make_pair(gCell->dx(), gCell->dy());
860-
}
861-
}
862-
863-
void revertGCellSizeToMinRc()
864-
{
865-
// revert back the gcell sizes
866-
for (auto& gCell : nbc_gcells_) {
867-
if (!gCell->isStdInstance()) {
868-
continue;
869-
}
870-
871-
int idx = &gCell - nbc_gcells_.data();
872-
873-
gCell->setSize(minRcCellSize_[idx].first, minRcCellSize_[idx].second);
874-
}
875-
}
841+
void resetMinRcCellSize();
842+
void resizeMinRcCellSize();
843+
void updateMinRcCellSize();
844+
void revertGCellSizeToMinRc();
876845

877846
GCell& getGCell(size_t index) { return gCellStor_[index]; }
878847

0 commit comments

Comments
 (0)