From e8f98f01831405cb7376932127c86a744a457ebc Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Thu, 9 Oct 2003 11:05:34 +0000 Subject: [PATCH] hash_map for ggc 2.96, 3.0, 3.1 .... --- alliance/src/ocp/src/common/PCommon.cpp | 2 +- alliance/src/ocp/src/placer/Ocp.cpp | 5 ++-- alliance/src/ocp/src/placer/PBin.cpp | 5 +++- alliance/src/ocp/src/placer/PCon.cpp | 4 ++- alliance/src/ocp/src/placer/PDetPlacement.cpp | 3 ++- alliance/src/ocp/src/placer/PDetSubRow.cpp | 7 ++++-- .../src/ocp/src/placer/PDetToPlaceIns.cpp | 8 ++++-- alliance/src/ocp/src/placer/PElem.cpp | 3 ++- alliance/src/ocp/src/placer/PFixedIns.cpp | 3 ++- alliance/src/ocp/src/placer/PIns.cpp | 4 ++- alliance/src/ocp/src/placer/PMove.cpp | 7 ++++-- alliance/src/ocp/src/placer/PNet.cpp | 3 ++- alliance/src/ocp/src/placer/PONet.cpp | 3 ++- alliance/src/ocp/src/placer/PPlacement.cpp | 8 +++--- alliance/src/ocp/src/placer/PPlacement.h | 21 +++++++++++++--- .../src/ocp/src/placer/PPlacementFinal.cpp | 25 +++++++++++++++---- .../src/ocp/src/placer/PPlacementGlobal.cpp | 6 +++-- alliance/src/ocp/src/placer/PRow.cpp | 3 ++- alliance/src/ocp/src/placer/PSubRow.cpp | 3 ++- alliance/src/ocp/src/placer/PToPlaceIns.cpp | 4 ++- 20 files changed, 93 insertions(+), 34 deletions(-) diff --git a/alliance/src/ocp/src/common/PCommon.cpp b/alliance/src/ocp/src/common/PCommon.cpp index e3ef9e1e..1f6a52ac 100644 --- a/alliance/src/ocp/src/common/PCommon.cpp +++ b/alliance/src/ocp/src/common/PCommon.cpp @@ -1,5 +1,5 @@ #include "PCommon.h" -#include +#include #include #include #include diff --git a/alliance/src/ocp/src/placer/Ocp.cpp b/alliance/src/ocp/src/placer/Ocp.cpp index 03002aed..7f5c7743 100644 --- a/alliance/src/ocp/src/placer/Ocp.cpp +++ b/alliance/src/ocp/src/placer/Ocp.cpp @@ -1,12 +1,13 @@ -#include "PPlacement.h" #include #include #include +using namespace std; #include "mut.h" #include "mph.h" #include "mlo.h" -using namespace std; + +#include "PPlacement.h" static void Usage() diff --git a/alliance/src/ocp/src/placer/PBin.cpp b/alliance/src/ocp/src/placer/PBin.cpp index 222e5ee5..3b9390d9 100644 --- a/alliance/src/ocp/src/placer/PBin.cpp +++ b/alliance/src/ocp/src/placer/PBin.cpp @@ -1,8 +1,11 @@ -#include "PBin.h" #include #include +using namespace std; + #include "PToPlaceIns.h" +#include "PBin.h" + PBin::PBin() : PContainer(), _toPlaceInss(), _nHits(0) { diff --git a/alliance/src/ocp/src/placer/PCon.cpp b/alliance/src/ocp/src/placer/PCon.cpp index f961c05c..53664aa8 100644 --- a/alliance/src/ocp/src/placer/PCon.cpp +++ b/alliance/src/ocp/src/placer/PCon.cpp @@ -1,8 +1,10 @@ -#include "PCon.h" #include "mut.h" #include "mph.h" + #include "PConstants.h" +#include "PCon.h" + PCon::PCon(const locon* con): PElem(), _con(con), _pos() {} diff --git a/alliance/src/ocp/src/placer/PDetPlacement.cpp b/alliance/src/ocp/src/placer/PDetPlacement.cpp index 049e8a55..69527ce0 100644 --- a/alliance/src/ocp/src/placer/PDetPlacement.cpp +++ b/alliance/src/ocp/src/placer/PDetPlacement.cpp @@ -1,7 +1,8 @@ -#include "PDetPlacement.h" #include "PBin.h" #include "PPlacement.h" +#include "PDetPlacement.h" + PDetPlacement::PDetPlacement(Problem& problem): BBoxFlag(0), _costFlag(0), diff --git a/alliance/src/ocp/src/placer/PDetSubRow.cpp b/alliance/src/ocp/src/placer/PDetSubRow.cpp index f6fba282..da22cf78 100644 --- a/alliance/src/ocp/src/placer/PDetSubRow.cpp +++ b/alliance/src/ocp/src/placer/PDetSubRow.cpp @@ -1,8 +1,11 @@ -#include "PDetSubRow.h" +#include +using namespace std; + #include "PSubRow.h" #include "PBin.h" #include "PDetPlacement.h" -#include + +#include "PDetSubRow.h" PDetSubRow::~PDetSubRow() { diff --git a/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp b/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp index d8192011..8c57e52d 100644 --- a/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp +++ b/alliance/src/ocp/src/placer/PDetToPlaceIns.cpp @@ -1,11 +1,15 @@ -#include "PDetToPlaceIns.h" +#include +using namespace std; + #include "mut.h" #include "mph.h" + #include "PConstants.h" #include "PToPlaceIns.h" #include "PDetSubRow.h" #include "PONet.h" -#include + +#include "PDetToPlaceIns.h" PDetToPlaceIns::PDetToPlaceIns(PToPlaceIns* toplaceins): PIns(toplaceins->GetInstance()), diff --git a/alliance/src/ocp/src/placer/PElem.cpp b/alliance/src/ocp/src/placer/PElem.cpp index 890d0a10..b0052d58 100644 --- a/alliance/src/ocp/src/placer/PElem.cpp +++ b/alliance/src/ocp/src/placer/PElem.cpp @@ -1,6 +1,7 @@ -#include "PElem.h" #include "PNet.h" +#include "PElem.h" + void PElem::DescribeOn(ostream& os) const { diff --git a/alliance/src/ocp/src/placer/PFixedIns.cpp b/alliance/src/ocp/src/placer/PFixedIns.cpp index ba407260..fe1b4c7e 100644 --- a/alliance/src/ocp/src/placer/PFixedIns.cpp +++ b/alliance/src/ocp/src/placer/PFixedIns.cpp @@ -1,6 +1,7 @@ -#include "PFixedIns.h" #include "PConstants.h" +#include "PFixedIns.h" + PFixedIns::PFixedIns(const loins *instance, const phins* pins, int dx, int dy): PIns(instance), _pins(pins), diff --git a/alliance/src/ocp/src/placer/PIns.cpp b/alliance/src/ocp/src/placer/PIns.cpp index 578258df..ec6e5108 100644 --- a/alliance/src/ocp/src/placer/PIns.cpp +++ b/alliance/src/ocp/src/placer/PIns.cpp @@ -1,8 +1,10 @@ -#include "PIns.h" #include "mut.h" #include "mph.h" + #include "PConstants.h" +#include "PIns.h" + PIns::PIns(const loins *instance): PElem(), _instance(instance) { diff --git a/alliance/src/ocp/src/placer/PMove.cpp b/alliance/src/ocp/src/placer/PMove.cpp index 94c20f80..27fa5a01 100644 --- a/alliance/src/ocp/src/placer/PMove.cpp +++ b/alliance/src/ocp/src/placer/PMove.cpp @@ -1,7 +1,10 @@ -#include "PMove.h" #include #include -#include +using namespace std; + +#include "PBin.h" + +#include "PMove.h" #ifndef Abs #define Abs(x) ((x) < 0.0 ? -(x) : (x)) diff --git a/alliance/src/ocp/src/placer/PNet.cpp b/alliance/src/ocp/src/placer/PNet.cpp index bbdf7d55..a0d95103 100644 --- a/alliance/src/ocp/src/placer/PNet.cpp +++ b/alliance/src/ocp/src/placer/PNet.cpp @@ -1,6 +1,7 @@ -#include "PNet.h" #include "PElem.h" +#include "PNet.h" + PNet::PNet(const losig* sig): _sig(sig), _elems() {} diff --git a/alliance/src/ocp/src/placer/PONet.cpp b/alliance/src/ocp/src/placer/PONet.cpp index ae656945..41aa421a 100644 --- a/alliance/src/ocp/src/placer/PONet.cpp +++ b/alliance/src/ocp/src/placer/PONet.cpp @@ -1,6 +1,7 @@ -#include "PONet.h" #include "PDetToPlaceIns.h" +#include "PONet.h" + PONet::PONet(const losig* sig): PNet(sig), _bBoxMark(0), _currCostMark(0), diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index b7bec19f..e15434f1 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -1,18 +1,20 @@ -#include "PPlacement.h" #include #include #include #include +using namespace std; + #include "mut.h" #include "mph.h" #include "mpu.h" #include "mlo.h" #include "mlu.h" + +#include "iocheader.h" #include "PMove.h" #include "PConstants.h" #include "PCommon.h" -#include "iocheader.h" -using namespace std; +#include "PPlacement.h" struct CompPInsByWidth { bool operator()(PIns* Ins1, PIns* Ins2) { diff --git a/alliance/src/ocp/src/placer/PPlacement.h b/alliance/src/ocp/src/placer/PPlacement.h index ff0c7324..0297ebdc 100644 --- a/alliance/src/ocp/src/placer/PPlacement.h +++ b/alliance/src/ocp/src/placer/PPlacement.h @@ -1,21 +1,34 @@ #ifndef __PPLACEMENT_H #define __PPLACEMENT_H +#ifdef __GNUC__ +#if __GNUC__ < 3 +#include +#else +#include +#if __GNUC_MINOR__ == 0 +#else +using namespace __gnu_cxx; // GCC 3.1 and later +#endif +#endif +#endif + #include #include #include #include -#include +using namespace std; + +#include "mut.h" +#include "mlo.h" + #include "PToPlaceIns.h" #include "PFixedIns.h" #include "PCon.h" #include "PONet.h" #include "PBBox.h" #include "PDetSubRow.h" -#include "mut.h" -#include "mlo.h" #include "iocheader.h" -using namespace std; struct eqstr { diff --git a/alliance/src/ocp/src/placer/PPlacementFinal.cpp b/alliance/src/ocp/src/placer/PPlacementFinal.cpp index 565a13c1..72dc42ee 100644 --- a/alliance/src/ocp/src/placer/PPlacementFinal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementFinal.cpp @@ -1,17 +1,32 @@ -#include "PPlacement.h" +#ifdef __GNUC__ +#if __GNUC__ < 3 +#include +#else +#include +#if __GNUC_MINOR__ == 0 +#else +using namespace __gnu_cxx; // GCC 3.1 and later +#endif +#endif +#endif + #include #include #include -#include -#include "PMove.h" -#include "PConstants.h" -#include "PDetPlacement.h" +using namespace std; + #include "mut.h" #include "mph.h" #include "mpu.h" #include "mlo.h" #include "mlu.h" +#include "PMove.h" +#include "PConstants.h" +#include "PDetPlacement.h" + +#include "PPlacement.h" + double PPlacement::DetPlaceDebugNetCost() { diff --git a/alliance/src/ocp/src/placer/PPlacementGlobal.cpp b/alliance/src/ocp/src/placer/PPlacementGlobal.cpp index 1a3dd6b7..0b53b4c6 100644 --- a/alliance/src/ocp/src/placer/PPlacementGlobal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementGlobal.cpp @@ -1,11 +1,13 @@ -#include "PPlacement.h" #include #include #include -#include "PMove.h" +using namespace std; +#include "PMove.h" #include "PConstants.h" +#include "PPlacement.h" + static double DoubleRand(void) { diff --git a/alliance/src/ocp/src/placer/PRow.cpp b/alliance/src/ocp/src/placer/PRow.cpp index 8510d9e0..a88cf6e6 100644 --- a/alliance/src/ocp/src/placer/PRow.cpp +++ b/alliance/src/ocp/src/placer/PRow.cpp @@ -1,8 +1,9 @@ -#include "PRow.h" #include "PPlacement.h" #include "PConstants.h" #include "PBBox.h" +#include "PRow.h" + PRow::PRow(unsigned nbofsubrows) : PContainer(), _subRows(nbofsubrows) { diff --git a/alliance/src/ocp/src/placer/PSubRow.cpp b/alliance/src/ocp/src/placer/PSubRow.cpp index 2311cda3..51987b30 100644 --- a/alliance/src/ocp/src/placer/PSubRow.cpp +++ b/alliance/src/ocp/src/placer/PSubRow.cpp @@ -1,8 +1,9 @@ -#include "PSubRow.h" #include "PBin.h" #include "PToPlaceIns.h" #include "PConstants.h" +#include "PSubRow.h" + PSubRow::PSubRow() : PContainer(), _bins(), _binsXMax() diff --git a/alliance/src/ocp/src/placer/PToPlaceIns.cpp b/alliance/src/ocp/src/placer/PToPlaceIns.cpp index 6cbd39b5..14f033e3 100644 --- a/alliance/src/ocp/src/placer/PToPlaceIns.cpp +++ b/alliance/src/ocp/src/placer/PToPlaceIns.cpp @@ -1,8 +1,10 @@ -#include "PToPlaceIns.h" #include "mut.h" #include "mph.h" + #include "PConstants.h" +#include "PToPlaceIns.h" + PToPlaceIns::PToPlaceIns(const loins *instance): PIns(instance), _bin(0)