hash_map for ggc 2.96, 3.0, 3.1 ....

This commit is contained in:
Christophe Alexandre 2003-10-09 11:05:34 +00:00
parent 17b14db768
commit e8f98f0183
20 changed files with 93 additions and 34 deletions

View File

@ -1,5 +1,5 @@
#include "PCommon.h" #include "PCommon.h"
#include <iostream.h> #include <iostream>
#include <math.h> #include <math.h>
#include <string> #include <string>
#include <assert.h> #include <assert.h>

View File

@ -1,12 +1,13 @@
#include "PPlacement.h"
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include <ctype.h> #include <ctype.h>
using namespace std;
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "mlo.h" #include "mlo.h"
using namespace std;
#include "PPlacement.h"
static void static void
Usage() Usage()

View File

@ -1,8 +1,11 @@
#include "PBin.h"
#include <stdio.h> #include <stdio.h>
#include <iomanip> #include <iomanip>
using namespace std;
#include "PToPlaceIns.h" #include "PToPlaceIns.h"
#include "PBin.h"
PBin::PBin() PBin::PBin()
: PContainer(), _toPlaceInss(), _nHits(0) : PContainer(), _toPlaceInss(), _nHits(0)
{ {

View File

@ -1,8 +1,10 @@
#include "PCon.h"
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "PConstants.h" #include "PConstants.h"
#include "PCon.h"
PCon::PCon(const locon* con): PCon::PCon(const locon* con):
PElem(), _con(con), _pos() PElem(), _con(con), _pos()
{} {}

View File

@ -1,7 +1,8 @@
#include "PDetPlacement.h"
#include "PBin.h" #include "PBin.h"
#include "PPlacement.h" #include "PPlacement.h"
#include "PDetPlacement.h"
PDetPlacement::PDetPlacement(Problem& problem): PDetPlacement::PDetPlacement(Problem& problem):
BBoxFlag(0), BBoxFlag(0),
_costFlag(0), _costFlag(0),

View File

@ -1,8 +1,11 @@
#include "PDetSubRow.h" #include <algorithm>
using namespace std;
#include "PSubRow.h" #include "PSubRow.h"
#include "PBin.h" #include "PBin.h"
#include "PDetPlacement.h" #include "PDetPlacement.h"
#include <algorithm>
#include "PDetSubRow.h"
PDetSubRow::~PDetSubRow() PDetSubRow::~PDetSubRow()
{ {

View File

@ -1,11 +1,15 @@
#include "PDetToPlaceIns.h" #include <algorithm>
using namespace std;
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "PConstants.h" #include "PConstants.h"
#include "PToPlaceIns.h" #include "PToPlaceIns.h"
#include "PDetSubRow.h" #include "PDetSubRow.h"
#include "PONet.h" #include "PONet.h"
#include <algorithm>
#include "PDetToPlaceIns.h"
PDetToPlaceIns::PDetToPlaceIns(PToPlaceIns* toplaceins): PDetToPlaceIns::PDetToPlaceIns(PToPlaceIns* toplaceins):
PIns(toplaceins->GetInstance()), PIns(toplaceins->GetInstance()),

View File

@ -1,6 +1,7 @@
#include "PElem.h"
#include "PNet.h" #include "PNet.h"
#include "PElem.h"
void void
PElem::DescribeOn(ostream& os) const PElem::DescribeOn(ostream& os) const
{ {

View File

@ -1,6 +1,7 @@
#include "PFixedIns.h"
#include "PConstants.h" #include "PConstants.h"
#include "PFixedIns.h"
PFixedIns::PFixedIns(const loins *instance, const phins* pins, int dx, int dy): PFixedIns::PFixedIns(const loins *instance, const phins* pins, int dx, int dy):
PIns(instance), PIns(instance),
_pins(pins), _pins(pins),

View File

@ -1,8 +1,10 @@
#include "PIns.h"
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "PConstants.h" #include "PConstants.h"
#include "PIns.h"
PIns::PIns(const loins *instance): PIns::PIns(const loins *instance):
PElem(), _instance(instance) PElem(), _instance(instance)
{ {

View File

@ -1,7 +1,10 @@
#include "PMove.h"
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#include <PBin.h> using namespace std;
#include "PBin.h"
#include "PMove.h"
#ifndef Abs #ifndef Abs
#define Abs(x) ((x) < 0.0 ? -(x) : (x)) #define Abs(x) ((x) < 0.0 ? -(x) : (x))

View File

@ -1,6 +1,7 @@
#include "PNet.h"
#include "PElem.h" #include "PElem.h"
#include "PNet.h"
PNet::PNet(const losig* sig): PNet::PNet(const losig* sig):
_sig(sig), _elems() _sig(sig), _elems()
{} {}

View File

@ -1,6 +1,7 @@
#include "PONet.h"
#include "PDetToPlaceIns.h" #include "PDetToPlaceIns.h"
#include "PONet.h"
PONet::PONet(const losig* sig): PONet::PONet(const losig* sig):
PNet(sig), PNet(sig),
_bBoxMark(0), _currCostMark(0), _bBoxMark(0), _currCostMark(0),

View File

@ -1,18 +1,20 @@
#include "PPlacement.h"
#include <unistd.h> #include <unistd.h>
#include <set> #include <set>
#include <algorithm> #include <algorithm>
#include <string> #include <string>
using namespace std;
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "mpu.h" #include "mpu.h"
#include "mlo.h" #include "mlo.h"
#include "mlu.h" #include "mlu.h"
#include "iocheader.h"
#include "PMove.h" #include "PMove.h"
#include "PConstants.h" #include "PConstants.h"
#include "PCommon.h" #include "PCommon.h"
#include "iocheader.h" #include "PPlacement.h"
using namespace std;
struct CompPInsByWidth { struct CompPInsByWidth {
bool operator()(PIns* Ins1, PIns* Ins2) { bool operator()(PIns* Ins1, PIns* Ins2) {

View File

@ -1,21 +1,34 @@
#ifndef __PPLACEMENT_H #ifndef __PPLACEMENT_H
#define __PPLACEMENT_H #define __PPLACEMENT_H
#ifdef __GNUC__
#if __GNUC__ < 3
#include <hash_map.h>
#else
#include <ext/hash_map>
#if __GNUC_MINOR__ == 0
#else
using namespace __gnu_cxx; // GCC 3.1 and later
#endif
#endif
#endif
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include <map> #include <map>
#include <hash_map.h> using namespace std;
#include "mut.h"
#include "mlo.h"
#include "PToPlaceIns.h" #include "PToPlaceIns.h"
#include "PFixedIns.h" #include "PFixedIns.h"
#include "PCon.h" #include "PCon.h"
#include "PONet.h" #include "PONet.h"
#include "PBBox.h" #include "PBBox.h"
#include "PDetSubRow.h" #include "PDetSubRow.h"
#include "mut.h"
#include "mlo.h"
#include "iocheader.h" #include "iocheader.h"
using namespace std;
struct eqstr struct eqstr
{ {

View File

@ -1,17 +1,32 @@
#include "PPlacement.h" #ifdef __GNUC__
#if __GNUC__ < 3
#include <hash_map.h>
#else
#include <ext/hash_map>
#if __GNUC_MINOR__ == 0
#else
using namespace __gnu_cxx; // GCC 3.1 and later
#endif
#endif
#endif
#include <math.h> #include <math.h>
#include <unistd.h> #include <unistd.h>
#include <algorithm> #include <algorithm>
#include <hash_map.h> using namespace std;
#include "PMove.h"
#include "PConstants.h"
#include "PDetPlacement.h"
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "mpu.h" #include "mpu.h"
#include "mlo.h" #include "mlo.h"
#include "mlu.h" #include "mlu.h"
#include "PMove.h"
#include "PConstants.h"
#include "PDetPlacement.h"
#include "PPlacement.h"
double double
PPlacement::DetPlaceDebugNetCost() PPlacement::DetPlaceDebugNetCost()
{ {

View File

@ -1,11 +1,13 @@
#include "PPlacement.h"
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <unistd.h> #include <unistd.h>
#include "PMove.h" using namespace std;
#include "PMove.h"
#include "PConstants.h" #include "PConstants.h"
#include "PPlacement.h"
static double static double
DoubleRand(void) DoubleRand(void)
{ {

View File

@ -1,8 +1,9 @@
#include "PRow.h"
#include "PPlacement.h" #include "PPlacement.h"
#include "PConstants.h" #include "PConstants.h"
#include "PBBox.h" #include "PBBox.h"
#include "PRow.h"
PRow::PRow(unsigned nbofsubrows) PRow::PRow(unsigned nbofsubrows)
: PContainer(), _subRows(nbofsubrows) : PContainer(), _subRows(nbofsubrows)
{ {

View File

@ -1,8 +1,9 @@
#include "PSubRow.h"
#include "PBin.h" #include "PBin.h"
#include "PToPlaceIns.h" #include "PToPlaceIns.h"
#include "PConstants.h" #include "PConstants.h"
#include "PSubRow.h"
PSubRow::PSubRow() PSubRow::PSubRow()
: PContainer(), _bins(), : PContainer(), _bins(),
_binsXMax() _binsXMax()

View File

@ -1,8 +1,10 @@
#include "PToPlaceIns.h"
#include "mut.h" #include "mut.h"
#include "mph.h" #include "mph.h"
#include "PConstants.h" #include "PConstants.h"
#include "PToPlaceIns.h"
PToPlaceIns::PToPlaceIns(const loins *instance): PToPlaceIns::PToPlaceIns(const loins *instance):
PIns(instance), PIns(instance),
_bin(0) _bin(0)