Skip to content

Commit 719d85c

Browse files
committed
gpl: move member function definition to cpp file
Signed-off-by: Augusto Berndt <[email protected]>
1 parent e09e3e3 commit 719d85c

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/gpl/src/nesterovBase.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,23 @@ void NesterovBaseCommon::updateWireLengthForceWA(float wlCoeffX, float wlCoeffY)
12891289
}
12901290
}
12911291

1292+
GCell& NesterovBaseCommon::getGCell(size_t index)
1293+
{
1294+
if (index >= gCellStor_.size()) {
1295+
log_->error(utl::GPL,
1296+
316,
1297+
"getGCell: index {} out of bounds (gCellStor_.size() = {}).",
1298+
index,
1299+
gCellStor_.size());
1300+
}
1301+
return gCellStor_[index];
1302+
}
1303+
1304+
size_t NesterovBaseCommon::getGCellIndex(const GCell* gCell) const
1305+
{
1306+
return std::distance(gCellStor_.data(), gCell);
1307+
}
1308+
12921309
// get x,y WA Gradient values with given GCell
12931310
FloatPoint NesterovBaseCommon::getWireLengthGradientWA(const GCell* gCell,
12941311
float wlCoeffX,

src/gpl/src/nesterovBase.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -855,22 +855,8 @@ class NesterovBaseCommon
855855
void updateMinRcCellSize();
856856
void revertGCellSizeToMinRc();
857857

858-
GCell& getGCell(size_t index)
859-
{
860-
if (index >= gCellStor_.size()) {
861-
log_->error(utl::GPL,
862-
316,
863-
"getGCell: index {} out of bounds (gCellStor_.size() = {}).",
864-
index,
865-
gCellStor_.size());
866-
}
867-
return gCellStor_[index];
868-
}
869-
870-
size_t getGCellIndex(const GCell* gCell) const
871-
{
872-
return std::distance(gCellStor_.data(), gCell);
873-
}
858+
GCell& getGCell(size_t index);
859+
size_t getGCellIndex(const GCell* gCell) const;
874860

875861
void printGCells();
876862
void printGPins();

0 commit comments

Comments
 (0)