Skip to content

Commit c4a902a

Browse files
committed
Don't pollute namespace w/ using odb::AthPool; in header files.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
1 parent 8a6aba5 commit c4a902a

File tree

10 files changed

+80
-75
lines changed

10 files changed

+80
-75
lines changed

src/rcx/include/rcx/extMeasureRC.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "odb/array1.h"
1010
#include "odb/db.h"
11+
#include "odb/util.h"
1112
#include "rcx/extRCap.h"
1213

1314
namespace rcx {
@@ -313,7 +314,7 @@ class extMeasureRC : public extMeasure
313314
float& previous_percent_extracted);
314315
//----------------------------------------------------------------------- v2
315316
//----- CLEANUP
316-
AthPool<extSegment>* _seqmentPool;
317+
odb::AthPool<extSegment>* _seqmentPool;
317318
void releaseAll(SegmentTables& segments);
318319

319320
void allocateTables(uint colCnt);

src/rcx/include/rcx/extRCap.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class extMeasure;
4242
class extMeasureRC;
4343
struct SEQ;
4444

45-
using odb::AthPool;
4645
using odb::uint;
4746
using utl::Logger;
4847

@@ -173,27 +172,27 @@ class extDistRCTable
173172
bool compute,
174173
bool bin);
175174
uint readRules(Ath__parser* parser,
176-
AthPool<extDistRC>* rcPool,
175+
odb::AthPool<extDistRC>* rcPool,
177176
bool compute,
178177
bool bin,
179178
bool ignore,
180179
double dbFactor = 1.0);
181180
uint readRules_res2(Ath__parser* parser,
182-
AthPool<extDistRC>* rcPool,
181+
odb::AthPool<extDistRC>* rcPool,
183182
bool compute,
184183
bool bin,
185184
bool ignore,
186185
double dbFactor = 1.0);
187-
uint interpolate(uint distUnit, int maxDist, AthPool<extDistRC>* rcPool);
186+
uint interpolate(uint distUnit, int maxDist, odb::AthPool<extDistRC>* rcPool);
188187
uint mapInterpolate(extDistRC* rc1,
189188
extDistRC* rc2,
190189
uint distUnit,
191190
int maxDist,
192-
AthPool<extDistRC>* rcPool);
191+
odb::AthPool<extDistRC>* rcPool);
193192
uint mapExtrapolate(uint loDist,
194193
extDistRC* rc2,
195194
uint distUnit,
196-
AthPool<extDistRC>* rcPool);
195+
odb::AthPool<extDistRC>* rcPool);
197196

198197
private:
199198
void makeCapTableOver();
@@ -239,7 +238,7 @@ class extDistWidthRCTable
239238
uint layerCnt,
240239
uint metCnt,
241240
odb::Ath__array1D<double>* widthTable,
242-
AthPool<extDistRC>* rcPool,
241+
odb::AthPool<extDistRC>* rcPool,
243242
bool OUREVERSEORDER,
244243
double dbFactor = 1.0);
245244
extDistWidthRCTable(bool over,
@@ -249,15 +248,15 @@ class extDistWidthRCTable
249248
odb::Ath__array1D<double>* widthTable,
250249
int diagWidthCnt,
251250
int diagDistCnt,
252-
AthPool<extDistRC>* rcPool,
251+
odb::AthPool<extDistRC>* rcPool,
253252
bool OUREVERSEORDER,
254253
double dbFactor = 1.0);
255254
extDistWidthRCTable(bool over,
256255
uint met,
257256
uint layerCnt,
258257
uint metCnt,
259258
uint maxWidthCnt,
260-
AthPool<extDistRC>* rcPool,
259+
odb::AthPool<extDistRC>* rcPool,
261260
bool OUREVERSEORDER);
262261
void addRCw(uint n, uint w, extDistRC* rc);
263262
void createWidthMap();
@@ -364,7 +363,7 @@ class extDistWidthRCTable
364363
uint _diagWidthCnt;
365364
uint _diagDistCnt;
366365

367-
AthPool<extDistRC>* _rcPoolPtr = nullptr;
366+
odb::AthPool<extDistRC>* _rcPoolPtr = nullptr;
368367
extDistRC* _rc31 = nullptr;
369368
};
370369

@@ -396,7 +395,7 @@ class extMetRCTable
396395
uint SetDefaultTechViaRes(dbTech* tech, bool dbg);
397396
// ----------------------------------------------------------------------------------------
398397
extMetRCTable(uint layerCnt,
399-
AthPool<extDistRC>* rcPool,
398+
odb::AthPool<extDistRC>* rcPool,
400399
Logger* logger_,
401400
bool OUREVERSEORDER);
402401
~extMetRCTable();
@@ -449,7 +448,7 @@ class extMetRCTable
449448
extDistRC* getCapUnder(uint met, uint metOver);
450449
extDistRC* getOverFringeRC(extMeasure* m, int index_dist = -1);
451450
extDistRC* getOverFringeRC_last(int met, int width);
452-
AthPool<extDistRC>* getRCPool();
451+
odb::AthPool<extDistRC>* getRCPool();
453452

454453
public:
455454
uint _layerCnt;
@@ -464,7 +463,7 @@ class extMetRCTable
464463
extDistWidthRCTable*** _capOverUnder_open;
465464
extDistWidthRCTable** _capDiagUnder;
466465

467-
AthPool<extDistRC>* _rcPoolPtr;
466+
odb::AthPool<extDistRC>* _rcPoolPtr;
468467
double _rate;
469468
Logger* logger_;
470469

@@ -937,7 +936,7 @@ class extRCModel
937936
extRCTable* _capOver;
938937
extRCTable* _capDiagUnder;
939938
extRCTable* _capUnder;
940-
AthPool<extDistRC>* _rcPoolPtr;
939+
odb::AthPool<extDistRC>* _rcPoolPtr;
941940
extProcess* _process;
942941
char* _ruleFileName;
943942
char* _wireFileName;
@@ -1497,7 +1496,7 @@ class extMeasure
14971496

14981497
odb::Ath__array1D<ext2dBox*>
14991498
_2dBoxTable[2][20]; // assume 20 layers; 0=main net; 1=context
1500-
AthPool<ext2dBox>* _2dBoxPool;
1499+
odb::AthPool<ext2dBox>* _2dBoxPool;
15011500
odb::Ath__array1D<int>** _ccMergedContextArray;
15021501

15031502
int _ll[2];
@@ -1551,9 +1550,9 @@ class extMeasure
15511550
int _netTgtId;
15521551
FILE* _debugFP;
15531552

1554-
AthPool<SEQ>* _seqPool;
1553+
odb::AthPool<SEQ>* _seqPool;
15551554

1556-
AthPool<extLenOU>* _lenOUPool;
1555+
odb::AthPool<extLenOU>* _lenOUPool;
15571556
odb::Ath__array1D<extLenOU*>* _lenOUtable;
15581557

15591558
bool _diagFlow;
@@ -1822,7 +1821,7 @@ class extMain
18221821

18231822
uint getResCapTable_lefRC_v2();
18241823
void infoBeforeCouplingExt();
1825-
void setExtControl_v2(AthPool<SEQ>* seqPool);
1824+
void setExtControl_v2(odb::AthPool<SEQ>* seqPool);
18261825

18271826
// --------------------- dkf 092024 ------------------------
18281827
extRCModel* getCurrentModel() { return _currentModel; }
@@ -2763,7 +2762,7 @@ class extMain
27632762

27642763
gs* _geomSeq = nullptr;
27652764

2766-
AthPool<SEQ>* _seqPool = nullptr;
2765+
odb::AthPool<SEQ>* _seqPool = nullptr;
27672766

27682767
odb::Ath__array1D<SEQ*>*** _dgContextArray = nullptr;
27692768
uint _dgContextDepth;

src/rcx/include/rcx/grids.h

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
namespace rcx {
2020

21-
using odb::AthPool;
22-
2321
enum OverlapAdjust
2422
{
2523
Z_noAdjust,
@@ -102,9 +100,9 @@ class Wire
102100

103101
// Extraction
104102
int wireOverlap(Wire* w, int* len1, int* len2, int* len3);
105-
Wire* getPoolWire(AthPool<Wire>* wirePool);
106-
Wire* makeWire(AthPool<Wire>* wirePool, int xy1, uint len);
107-
Wire* makeCoupleWire(AthPool<Wire>* wirePool,
103+
Wire* getPoolWire(odb::AthPool<Wire>* wirePool);
104+
Wire* makeWire(odb::AthPool<Wire>* wirePool, int xy1, uint len);
105+
Wire* makeCoupleWire(odb::AthPool<Wire>* wirePool,
108106
int targetHighTracks,
109107
Wire* w2,
110108
int xy1,
@@ -167,7 +165,7 @@ class Track
167165
uint markerLen,
168166
uint markerCnt,
169167
int base);
170-
void freeWires(AthPool<Wire>* pool);
168+
void freeWires(odb::AthPool<Wire>* pool);
171169
bool place(Wire* w, int markIndex1, int markIndex2);
172170
bool place(Wire* w, int markIndex1);
173171
uint setExtrusionMarker(int markerCnt, int start, uint markerLen);
@@ -254,7 +252,7 @@ class Track
254252
uint firstContextTrack,
255253
odb::Ath__array1D<int>* context);
256254

257-
void dealloc(AthPool<Wire>* pool);
255+
void dealloc(odb::AthPool<Wire>* pool);
258256
Wire* getMarker(int index) const { return _marker[index]; }
259257
void setMarker(int index, Wire* wire) { _marker[index] = wire; }
260258

@@ -303,8 +301,8 @@ class Grid
303301
uint placeWire_v2(SearchBox* bb);
304302

305303
Grid(GridTable* gt,
306-
AthPool<Track>* trackPool,
307-
AthPool<Wire>* wirePool,
304+
odb::AthPool<Track>* trackPool,
305+
odb::AthPool<Wire>* wirePool,
308306
uint level,
309307
uint markerCnt);
310308
~Grid();
@@ -409,7 +407,7 @@ class Grid
409407
uint& wireCnt,
410408
odb::Ath__array1D<Wire*>* bandWire,
411409
int* limitArray);
412-
AthPool<Wire>* getWirePoolPtr();
410+
odb::AthPool<Wire>* getWirePoolPtr();
413411
uint placeWire(Wire* w);
414412
uint defaultWireType();
415413
void setDefaultWireType(uint v);
@@ -465,8 +463,8 @@ class Grid
465463
uint _searchLowMarker;
466464
uint _searchHiMarker;
467465

468-
AthPool<Track>* _trackPoolPtr;
469-
AthPool<Wire>* _wirePoolPtr;
466+
odb::AthPool<Track>* _trackPoolPtr;
467+
odb::AthPool<Wire>* _wirePoolPtr;
470468

471469
uint _wireType;
472470

@@ -508,7 +506,7 @@ class GridTable
508506
int* dgContextLowTrack,
509507
int* dgContextHiTrack,
510508
int** dgContextTrackBase,
511-
AthPool<SEQ>* seqPool);
509+
odb::AthPool<SEQ>* seqPool);
512510

513511
// -------------------------------------------------------------
514512
GridTable(odb::Rect* bb,
@@ -592,7 +590,7 @@ class GridTable
592590
uint getCcFlag() { return _ccFlag; };
593591
uint contextDepth() { return _ccContextDepth; };
594592
odb::Ath__array1D<int>** contextArray() { return _ccContextArray; };
595-
AthPool<SEQ>* seqPool() { return _seqPool; };
593+
odb::AthPool<SEQ>* seqPool() { return _seqPool; };
596594
odb::Ath__array1D<SEQ*>*** dgContextArray() { return _dgContextArray; };
597595
int** dgContextTrackBase() { return _dgContextTrackBase; };
598596
uint* dgContextBaseTrack() { return _dgContextBaseTrack; };
@@ -631,7 +629,7 @@ class GridTable
631629
int* dgContextLowTrack,
632630
int* dgContextHiTrack,
633631
int** dgContextTrackBase,
634-
AthPool<SEQ>* seqPool);
632+
odb::AthPool<SEQ>* seqPool);
635633

636634
bool usingDbSdb() { return _useDbSdb; }
637635
void reverseTargetTrack();
@@ -683,8 +681,8 @@ class GridTable
683681
uint _colCnt;
684682
uint _rowSize;
685683
uint _colSize;
686-
AthPool<Track>* _trackPool;
687-
AthPool<Wire>* _wirePool;
684+
odb::AthPool<Track>* _trackPool;
685+
odb::AthPool<Wire>* _wirePool;
688686
uint _overlapAdjust{Z_noAdjust};
689687
uint _powerMultiTrackWire{0};
690688
uint _signalMultiTrackWire{0};
@@ -707,7 +705,7 @@ class GridTable
707705

708706
odb::Ath__array1D<int>** _ccContextArray{nullptr};
709707

710-
AthPool<SEQ>* _seqPool;
708+
odb::AthPool<SEQ>* _seqPool;
711709
odb::Ath__array1D<SEQ*>*** _dgContextArray; // array
712710

713711
uint* _dgContextDepth; // not array

src/rcx/src/extBenchDB.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "odb/db.h"
1515
#include "odb/dbSet.h"
1616
#include "odb/dbTypes.h"
17+
#include "odb/util.h"
1718
#include "parse.h"
1819
#include "rcx/extRCap.h"
1920
#include "rcx/extSpef.h"
@@ -45,7 +46,7 @@ extMetRCTable* extRCModel::initCapTables(uint layerCnt, uint widthCnt)
4546
_modelTable[0]->allocateInitialTables(widthCnt, true, true, true);
4647
return _modelTable[0];
4748
}
48-
AthPool<extDistRC>* extMetRCTable::getRCPool()
49+
odb::AthPool<extDistRC>* extMetRCTable::getRCPool()
4950
{
5051
return _rcPoolPtr;
5152
}
@@ -64,7 +65,7 @@ uint extMain::GenExtRules(const char* rulesFileName)
6465

6566
extMetRCTable* rcModel = extRulesModel->initCapTables(layerCnt, widthCnt);
6667

67-
AthPool<extDistRC>* rcPool = rcModel->getRCPool();
68+
odb::AthPool<extDistRC>* rcPool = rcModel->getRCPool();
6869
extMeasure m(nullptr);
6970
m._diagModel = 1;
7071
uint openWireNumber = 1;

src/rcx/src/extCC.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "gseq.h"
88
#include "odb/array1.h"
9+
#include "odb/util.h"
910
#include "rcx/grids.h"
1011

1112
using odb::Ath__array1D;
@@ -97,7 +98,7 @@ uint Track::findOverlap(Wire* origWire,
9798
{
9899
rcx::CoupleOptions coupleOptions{};
99100

100-
AthPool<Wire>* wirePool = _grid->getWirePoolPtr();
101+
odb::AthPool<Wire>* wirePool = _grid->getWirePoolPtr();
101102

102103
uint NoPowerTarget = _grid->getGridTable()->noPowerTarget();
103104
bool srcMarked = origWire->getNet()->isMarked();
@@ -339,7 +340,7 @@ uint Track::couplingCaps(Grid* ccGrid,
339340
int noPowerSource = _grid->getGridTable()->noPowerSource();
340341
uint TargetHighMarkedNet = _grid->getGridTable()->targetHighMarkedNet();
341342
bool allNet = _grid->getGridTable()->allNet();
342-
AthPool<Wire>* wirePool = _grid->getWirePoolPtr();
343+
odb::AthPool<Wire>* wirePool = _grid->getWirePoolPtr();
343344
uint wireCnt = 0;
344345
Wire* origWire = nullptr;
345346
uint delt;
@@ -570,7 +571,7 @@ void Track::buildDgContext(Ath__array1D<SEQ*>* dgContext,
570571
uint xidx = 0;
571572
uint yidx = 1;
572573
uint lidx, bidx;
573-
AthPool<SEQ>* seqPool = _grid->getGridTable()->seqPool();
574+
odb::AthPool<SEQ>* seqPool = _grid->getGridTable()->seqPool();
574575
SEQ* seq;
575576
int rsegid;
576577
for (jj = 0; jj < ctxsize; jj++) {

src/rcx/src/extFlow_v2.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "odb/dbSet.h"
1515
#include "odb/dbShape.h"
1616
#include "odb/geom.h"
17+
#include "odb/util.h"
1718
#include "parse.h"
1819
#include "rcx/dbUtil.h"
1920
#include "rcx/extMeasureRC.h"
@@ -197,7 +198,7 @@ uint extMain::couplingFlow_v2(Rect& extRect, uint ccDist, extMeasure* m1)
197198
// TODO mrc->_progressTracker =
198199
// std::make_unique<ExtProgressTracker>(totWireCnt);
199200

200-
mrc->_seqmentPool = new AthPool<extSegment>(1024);
201+
mrc->_seqmentPool = new odb::AthPool<extSegment>(1024);
201202

202203
uint totalWiresExtracted = 0;
203204
float previous_percent_extracted = 0.0;
@@ -300,7 +301,7 @@ uint extMain::couplingFlow_v2_opt(Rect& extRect, uint ccDist, extMeasure* m1)
300301
tables.maxWidth,
301302
1000);
302303

303-
mrc->_seqmentPool = new AthPool<extSegment>(1024);
304+
mrc->_seqmentPool = new odb::AthPool<extSegment>(1024);
304305

305306
uint totalWiresExtracted = 0;
306307
float previous_percent_extracted = 0.0;
@@ -383,7 +384,7 @@ uint extMain::couplingFlow_v2_opt(Rect& extRect, uint ccDist, extMeasure* m1)
383384
return 0;
384385
}
385386

386-
void extMain::setExtControl_v2(AthPool<SEQ>* seqPool)
387+
void extMain::setExtControl_v2(odb::AthPool<SEQ>* seqPool)
387388
{
388389
OverlapAdjust overlapAdj = Z_noAdjust;
389390
_useDbSdb = true;

src/rcx/src/extModelGen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <vector>
1515

1616
#include "odb/dbSet.h"
17+
#include "odb/util.h"
1718
#include "parse.h"
1819

1920
namespace rcx {
@@ -500,7 +501,7 @@ uint extModelGen::ReadRCDB(odb::dbBlock* block,
500501
uint layerCnt = getLayerCnt();
501502
extMetRCTable* rcModel = initCapTables(layerCnt, widthCnt);
502503

503-
AthPool<extDistRC>* rcPool = rcModel->getRCPool();
504+
odb::AthPool<extDistRC>* rcPool = rcModel->getRCPool();
504505
extMeasure m(nullptr);
505506
m._diagModel = 1;
506507
uint openWireNumber = 1;

0 commit comments

Comments
 (0)