Compliance with c++11 and clang 3.8.1 (Debian 9.2).

This commit is contained in:
Jean-Paul Chaput 2017-12-02 14:25:03 +01:00
parent 51d5313801
commit 89dfc2179c
46 changed files with 851 additions and 900 deletions

View File

@ -147,7 +147,7 @@ namespace Anabatic {
AutoSegments_OnRoutingPad::Locator::Locator ( RoutingPad* rp, const AutoContactTerminal* contact ) AutoSegments_OnRoutingPad::Locator::Locator ( RoutingPad* rp, const AutoContactTerminal* contact )
: AutoSegmentHL() : AutoSegmentHL()
, _elements ({NULL,NULL,NULL,NULL}) , _elements ({{NULL,NULL,NULL,NULL}})
, _index (0) , _index (0)
{ {
if (rp) { if (rp) {

View File

@ -587,8 +587,6 @@ namespace Anabatic {
{ {
const GCell* current = this; const GCell* current = this;
if (not this) cerr << Error("*this* is NULL!") << endl;
while ( current ) { while ( current ) {
if (not current->isFlat() and current->getBoundingBox().contains(x,y)) break; if (not current->isFlat() and current->getBoundingBox().contains(x,y)) break;

View File

@ -2437,6 +2437,7 @@ namespace {
} }
#if THIS_IS_DISABLED
bool isVertical ( RoutingPad* rp ) bool isVertical ( RoutingPad* rp )
{ {
return ( (rp->getSourcePosition().getX() == rp->getTargetPosition().getX()) return ( (rp->getSourcePosition().getX() == rp->getTargetPosition().getX())
@ -2451,6 +2452,7 @@ namespace {
&& (rp->getSourcePosition().getX() != rp->getTargetPosition().getX()) && (rp->getSourcePosition().getX() != rp->getTargetPosition().getX())
); );
} }
#endif
RoutingPad* returnSW ( GCell* gcell, RoutingPad* rp1, RoutingPad* rp2 ) RoutingPad* returnSW ( GCell* gcell, RoutingPad* rp1, RoutingPad* rp2 )

View File

@ -8,7 +8,7 @@ namespace coloquinte{
namespace gp{ namespace gp{
namespace{ namespace{
index_t const null_ind = std::numeric_limits<index_t>::max(); //index_t const null_ind = std::numeric_limits<index_t>::max();
inline void opt_orient(netlist const & circuit, placement_t & pl, std::function<int_t (point<int_t>)> i_coor, std::function<bool & (point<bool> &)> b_coor,mask_t FLIPPABLE){ inline void opt_orient(netlist const & circuit, placement_t & pl, std::function<int_t (point<int_t>)> i_coor, std::function<bool & (point<bool> &)> b_coor,mask_t FLIPPABLE){
std::stack<index_t> opt_cells; std::stack<index_t> opt_cells;

View File

@ -350,7 +350,8 @@ void region_distribution::region::distribute_new_cells(region & region_a, region
b_capacity_limit=cells.size(); // Last cell (but first in the vector) that region_b can take entirely (or cells.size()) b_capacity_limit=cells.size(); // Last cell (but first in the vector) that region_b can take entirely (or cells.size())
capacity_t remaining_capacity_a = region_a.capacity_, remaining_capacity_b = region_b.capacity_; capacity_t remaining_capacity_a = region_a.capacity_, remaining_capacity_b = region_b.capacity_;
for(;preference_limit < cells.size() && cells[preference_limit].marginal_cost_ <= 0.0; ++preference_limit); for(;preference_limit < cells.size() && cells[preference_limit].marginal_cost_ <= 0.0; ++preference_limit)
;
{ // Block { // Block
capacity_t remaining_cap_a = region_a.capacity_; capacity_t remaining_cap_a = region_a.capacity_;

View File

@ -404,7 +404,7 @@ std::vector<std::pair<index_t, index_t> > get_MST_topology(std::vector<point<int
} }
if(pins.size() == 3){ if(pins.size() == 3){
auto D = [](point<int_t> a, point<int_t> b){ return (int_t)(std::abs((float)(a.x - b.x)) + std::abs((float)(a.y - b.y))); }; auto D = [](point<int_t> a, point<int_t> b){ return (int_t)(std::abs((float)(a.x - b.x)) + std::abs((float)(a.y - b.y))); };
auto dists = std::array<int_t, 3>({D(pins[1], pins[2]), D(pins[1], pins[2]), D(pins[0], pins[1])}); auto dists = std::array<int_t, 3>({{D(pins[1], pins[2]), D(pins[1], pins[2]), D(pins[0], pins[1])}});
index_t mx = std::max_element(dists.begin(), dists.end()) - dists.begin(); index_t mx = std::max_element(dists.begin(), dists.end()) - dists.begin();
for(index_t i=0; i<3; ++i){ for(index_t i=0; i<3; ++i){
if(i != mx) if(i != mx)

View File

@ -47,8 +47,8 @@ namespace {
using namespace std; using namespace std;
inline bool isAbcAutomaticName ( string name ) //inline bool isAbcAutomaticName ( string name )
{ return (name.substr(0,5) == "$abc$"); } //{ return (name.substr(0,5) == "$abc$"); }
// ------------------------------------------------------------------- // -------------------------------------------------------------------

View File

@ -47,6 +47,7 @@ using namespace std;
namespace { namespace {
#if THIS_IS_DISABLED
struct PinSort { struct PinSort {
bool operator()(const Pin* pin1, const Pin* pin2) const bool operator()(const Pin* pin1, const Pin* pin2) const
{ {
@ -253,6 +254,7 @@ void DumpInstances(ofstream &ccell, Cell* cell) {
end_for; end_for;
} }
} }
#endif
} }
@ -260,6 +262,7 @@ namespace CRL {
void bookshelfDriver( const string cellPath, Cell *cell, unsigned int &saveState) void bookshelfDriver( const string cellPath, Cell *cell, unsigned int &saveState)
{ {
#if THIS_IS_DISABLED
::std::ofstream auxFile ( cellPath.c_str() ); ::std::ofstream auxFile ( cellPath.c_str() );
// .aux file generation : // .aux file generation :
@ -270,25 +273,26 @@ void bookshelfDriver( const string cellPath, Cell *cell, unsigned int &saveStat
<< str_name << ".nets " << str_name << ".nets "
<< str_name << ".pl" << endl; << str_name << ".pl" << endl;
//DumpMasters ( ccell, cell ); DumpMasters ( ccell, cell );
//ccell << "UCLA nodes 1.0" << endl; ccell << "UCLA nodes 1.0" << endl;
//DumpDate(ccell); DumpDate(ccell);
//ccell << "," << scaleX << endl; ccell << "," << scaleX << endl;
//const Box& abutmentBox = cell->getAbutmentBox(); const Box& abutmentBox = cell->getAbutmentBox();
//ccell << "A " ccell << "A "
// << abutmentBox.getXMin() << abutmentBox.getXMin()
// << "," << abutmentBox.getYMin() << "," << abutmentBox.getYMin()
// << "," << abutmentBox.getXMax() << "," << abutmentBox.getXMax()
// << "," << abutmentBox.getYMax() << "," << abutmentBox.getYMax()
// << endl; << endl;
//DumpPins(ccell, cell); DumpPins(ccell, cell);
//DumpInstances(ccell, cell); DumpInstances(ccell, cell);
//DumpSegments(ccell, cell); DumpSegments(ccell, cell);
//DumpContacts(ccell, cell); DumpContacts(ccell, cell);
//ccell << "EOF" << endl; ccell << "EOF" << endl;
auxFile.close (); auxFile.close ();
#endif
} }
} }

View File

@ -769,7 +769,7 @@ namespace {
unsigned int libraryFlags = 0; unsigned int libraryFlags = 0;
string libraryPath = "./" + file.substr ( 0, file.size()-4 ) + "lib"; string libraryPath = "./" + file.substr ( 0, file.size()-4 ) + "lib";
AllianceLibrary* library = _framework->createLibrary ( libraryPath, libraryFlags ); AllianceLibrary* library = _framework->createLibrary ( libraryPath, libraryFlags );
auto_ptr<LefParser> parser ( new LefParser(file,library) ); unique_ptr<LefParser> parser ( new LefParser(file,library) );
FILE* lefStream = fopen ( file.c_str(), "r" ); FILE* lefStream = fopen ( file.c_str(), "r" );
if ( lefStream == NULL ) if ( lefStream == NULL )
@ -1063,7 +1063,7 @@ namespace {
size_t islash = file.rfind ( '/' ); size_t islash = file.rfind ( '/' );
string designName = file.substr ( ((islash == string::npos) ? 0 : islash), file.size()-4 ); string designName = file.substr ( ((islash == string::npos) ? 0 : islash), file.size()-4 );
AllianceLibrary* library = _framework->getAllianceLibrary ( designName+"lib", libraryFlags ); AllianceLibrary* library = _framework->getAllianceLibrary ( designName+"lib", libraryFlags );
auto_ptr<DefParser> parser ( new DefParser(file,library) ); unique_ptr<DefParser> parser ( new DefParser(file,library) );
FILE* defStream = fopen ( file.c_str(), "r" ); FILE* defStream = fopen ( file.c_str(), "r" );
if ( defStream == NULL ) if ( defStream == NULL )

View File

@ -145,7 +145,7 @@ namespace CRL {
using std::string; using std::string;
using std::map; using std::map;
using std::auto_ptr; using std::unique_ptr;
using Hurricane::Library; using Hurricane::Library;
using Hurricane::Transformation; using Hurricane::Transformation;
using Hurricane::UpdateSession; using Hurricane::UpdateSession;
@ -157,7 +157,7 @@ namespace CRL {
UpdateSession::open (); UpdateSession::open ();
auto_ptr<Bookshelf::Circuit> circuit ( Bookshelf::Circuit::parse(benchmark) ); unique_ptr<Bookshelf::Circuit> circuit ( Bookshelf::Circuit::parse(benchmark) );
Cell* cell = af->createCell ( benchmark ); Cell* cell = af->createCell ( benchmark );

View File

@ -142,7 +142,7 @@ namespace CRL {
using std::string; using std::string;
using std::map; using std::map;
using std::auto_ptr; using std::unique_ptr;
using Hurricane::Library; using Hurricane::Library;
using Hurricane::Transformation; using Hurricane::Transformation;
using Hurricane::UpdateSession; using Hurricane::UpdateSession;
@ -156,7 +156,7 @@ namespace CRL {
UpdateSession::open (); UpdateSession::open ();
auto_ptr<Bookshelf::Circuit> circuit ( Bookshelf::Circuit::parse( benchmark unique_ptr<Bookshelf::Circuit> circuit ( Bookshelf::Circuit::parse( benchmark
, Bookshelf::Circuit::AllSlots , Bookshelf::Circuit::AllSlots
, Bookshelf::Parser::NoFlags , Bookshelf::Parser::NoFlags
) ); ) );

View File

@ -51,20 +51,6 @@ namespace {
using namespace CRL; using namespace CRL;
string toLower ( const string& s )
{
string lowered;
for ( size_t i=0 ; i<s.size() ; ++i ) {
if ( (s[i] < 'A') or (s[i] > 'Z') )
lowered.push_back( s[i] );
else
lowered.push_back( s[i] + (int)'a'-(int)'A' );
}
return lowered;
}
string toDefName ( string name ) string toDefName ( string name )
{ {
if (name.empty()) return name; if (name.empty()) return name;
@ -718,7 +704,7 @@ namespace {
if ( defStream == NULL ) if ( defStream == NULL )
throw Error("DefDriver::drive(): Cannot open <%s>.",path.c_str()); throw Error("DefDriver::drive(): Cannot open <%s>.",path.c_str());
auto_ptr<DefDriver> driver ( new DefDriver(cell,designName,defStream,flags) ); unique_ptr<DefDriver> driver ( new DefDriver(cell,designName,defStream,flags) );
driver->write (); driver->write ();
} }
catch ( ... ) { catch ( ... ) {

View File

@ -558,7 +558,7 @@ namespace {
size_t islash = file.rfind ( '/' ); size_t islash = file.rfind ( '/' );
string designName = file.substr ( ((islash == string::npos) ? 0 : islash), file.size()-4 ); string designName = file.substr ( ((islash == string::npos) ? 0 : islash), file.size()-4 );
AllianceLibrary* library = _framework->getAllianceLibrary ( (unsigned int)0 ); AllianceLibrary* library = _framework->getAllianceLibrary ( (unsigned int)0 );
auto_ptr<DefParser> parser ( new DefParser(file,library,flags) ); unique_ptr<DefParser> parser ( new DefParser(file,library,flags) );
FILE* defStream = fopen ( file.c_str(), "r" ); FILE* defStream = fopen ( file.c_str(), "r" );
if ( defStream == NULL ) if ( defStream == NULL )

View File

@ -50,20 +50,6 @@ namespace {
using namespace CRL; using namespace CRL;
string toLower ( const string& s )
{
string lowered;
for ( size_t i=0 ; i<s.size() ; ++i ) {
if ( (s[i] < 'A') or (s[i] > 'Z') )
lowered.push_back( s[i] );
else
lowered.push_back( s[i] + (int)'a'-(int)'A' );
}
return lowered;
}
#define CHECK_STATUS(status) if ((status) != 0) return checkStatus(status); #define CHECK_STATUS(status) if ((status) != 0) return checkStatus(status);
#define RETURN_CHECK_STATUS(status) return checkStatus(status); #define RETURN_CHECK_STATUS(status) return checkStatus(status);
@ -688,7 +674,7 @@ namespace {
if ( lefStream == NULL ) if ( lefStream == NULL )
throw Error("LefDriver::drive(): Cannot open <%s>.",path.c_str()); throw Error("LefDriver::drive(): Cannot open <%s>.",path.c_str());
auto_ptr<LefDriver> driver ( new LefDriver(cells,libraryName,flags,lefStream) ); unique_ptr<LefDriver> driver ( new LefDriver(cells,libraryName,flags,lefStream) );
driver->write (); driver->write ();
} }
catch ( ... ) { catch ( ... ) {

View File

@ -52,6 +52,7 @@ namespace {
using namespace CRL; using namespace CRL;
#if THIS_IS_DISABLED
void addSupplyNets ( Cell* cell ) void addSupplyNets ( Cell* cell )
{ {
Net* vss = Net::create( cell, "vss" ); Net* vss = Net::create( cell, "vss" );
@ -64,6 +65,7 @@ namespace {
vdd->setGlobal ( true ); vdd->setGlobal ( true );
vdd->setType ( Net::Type::POWER ); vdd->setType ( Net::Type::POWER );
} }
#endif
class LefParser { class LefParser {

View File

@ -1137,7 +1137,7 @@ namespace CRL {
oacAPIMinorRevNumber, oacAPIMinorRevNumber,
oacDataModelRevNumber); oacDataModelRevNumber);
auto_ptr<OADriver> oaDriver(OADriver::create(technoPath, designPath)); unique_ptr<OADriver> oaDriver(OADriver::create(technoPath, designPath));
oaTech* tech = NULL; oaTech* tech = NULL;
tech = oaDriver->getOATech(); tech = oaDriver->getOATech();

View File

@ -193,7 +193,7 @@ int main ( int argc, char *argv[] )
} }
if ( not textMode ) { if ( not textMode ) {
auto_ptr<QApplication> qa ( new HApplication(argc,argv) ); unique_ptr<QApplication> qa ( new HApplication(argc,argv) );
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \ #if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \ (QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
not defined (__APPLE__) and not defined (__CYGWIN__) not defined (__APPLE__) and not defined (__CYGWIN__)

View File

@ -59,17 +59,17 @@ namespace {
using coloquinte::float_t; using coloquinte::float_t;
using coloquinte::point; using coloquinte::point;
// Options for both placers // Options for both placers
unsigned const SteinerModel = 0x0001; unsigned const SteinerModel = 0x0001;
// Options for the global placer // Options for the global placer
unsigned const ForceUniformDensity = 0x0010; unsigned const ForceUniformDensity = 0x0010;
unsigned const UpdateLB = 0x0020; unsigned const UpdateLB = 0x0020;
unsigned const UpdateUB = 0x0040; unsigned const UpdateUB = 0x0040;
// Options for the detailed placer // Options for the detailed placer
unsigned const UpdateDetailed = 0x0100; unsigned const UpdateDetailed = 0x0100;
unsigned const NonConvexOpt = 0x0200; //unsigned const NonConvexOpt = 0x0200;
string extractInstanceName ( const RoutingPad* rp ) string extractInstanceName ( const RoutingPad* rp )
@ -89,6 +89,7 @@ namespace {
} }
#if THIS_IS_DISABLED
string extractPinName ( const RoutingPad* rp ) string extractPinName ( const RoutingPad* rp )
{ {
ostringstream name; ostringstream name;
@ -121,6 +122,7 @@ namespace {
return name.str(); return name.str();
} }
#endif
Point extractRpOffset ( const RoutingPad* rp ) Point extractRpOffset ( const RoutingPad* rp )

View File

@ -4946,7 +4946,6 @@ string Cell_SubCells::Locator::_getString() const
// ************************************************** // **************************************************
{ {
string s = "<" + _TName("Cell::SubCells::Locator"); string s = "<" + _TName("Cell::SubCells::Locator");
s += " " + _getString();
s += " " + getString(_instanceLocator); s += " " + getString(_instanceLocator);
s += ">"; s += ">";
return s; return s;

View File

@ -198,8 +198,6 @@ class HyperNet_LeafPlugOccurrences : public Collection<Occurrence> {
public: typedef Hurricane::Locator<Occurrence> Inherit; public: typedef Hurricane::Locator<Occurrence> Inherit;
private: bool _doExtraction;
private: bool _allowInterruption;
private: OccurrenceLocator _netOccurrenceLocator; private: OccurrenceLocator _netOccurrenceLocator;
private: Occurrence _plugOccurrence; private: Occurrence _plugOccurrence;

View File

@ -749,7 +749,8 @@ namespace Hurricane {
if (historyAction) { if (historyAction) {
list< shared_ptr<CellWidget::State> >::iterator istate = _cellHistory.begin(); list< shared_ptr<CellWidget::State> >::iterator istate = _cellHistory.begin();
size_t index = historyAction->data().toUInt(); size_t index = historyAction->data().toUInt();
for ( ; index>0 ; index--, ++istate ); for ( ; index>0 ; index--, ++istate )
;
emit stateChanged ( *istate ); emit stateChanged ( *istate );
} }
} }

View File

@ -39,7 +39,7 @@
namespace Hurricane { namespace Hurricane {
using std::auto_ptr; using std::unique_ptr;
void ExceptionWidget::run ( Error& e ) void ExceptionWidget::run ( Error& e )

View File

@ -24,29 +24,7 @@
#include <sstream> #include <sstream>
namespace {
using std::istringstream;
// void parseInt ( const char* s, int& value )
// { istringstream is ( s ); is >> value; }
// void parseFloat ( const char* s, float& value )
// { istringstream is ( s ); is >> value; }
void parseRgbColor ( const char* color, int& red, int& green, int& blue )
{
char colon1, colon2;
istringstream is ( color );
is >> red >> colon1 >> green >> colon2 >> blue;
}
} // Anonymous namespace.
namespace Hurricane { namespace Hurricane {
@ -55,6 +33,7 @@ namespace Hurricane {
using std::endl; using std::endl;
using std::hex; using std::hex;
using std::ostringstream; using std::ostringstream;
using std::istringstream;
using Isobar::ProxyProperty; using Isobar::ProxyProperty;
using Isobar::ProxyError; using Isobar::ProxyError;
using Isobar::ConstructorError; using Isobar::ConstructorError;
@ -77,6 +56,23 @@ extern "C" {
// +=================================================================+ // +=================================================================+
// static void parseInt ( const char* s, int& value )
// { istringstream is ( s ); is >> value; }
// static void parseFloat ( const char* s, float& value )
// { istringstream is ( s ); is >> value; }
static void parseRgbColor ( const char* color, int& red, int& green, int& blue )
{
char colon1, colon2;
istringstream is ( color );
is >> red >> colon1 >> green >> colon2 >> blue;
}
static PyObject* PyDisplayStyle_new ( PyTypeObject* type, PyObject* args, PyObject* kwds ) static PyObject* PyDisplayStyle_new ( PyTypeObject* type, PyObject* args, PyObject* kwds )
{ {
cdebug_log(20,0) << "PyDisplayStyle_new()" << endl; cdebug_log(20,0) << "PyDisplayStyle_new()" << endl;

View File

@ -21,30 +21,7 @@
#include <sstream> #include <sstream>
namespace {
using std::istringstream;
// void parseInt ( const char* s, int& value )
// { istringstream is ( s ); is >> value; }
// void parseFloat ( const char* s, float& value )
// { istringstream is ( s ); is >> value; }
void parseRgbColor ( const char* color, int& red, int& green, int& blue )
{
char colon1, colon2;
istringstream is ( color );
is >> red >> colon1 >> green >> colon2 >> blue;
}
} // Anonymous namespace.
namespace Hurricane { namespace Hurricane {
@ -53,6 +30,7 @@ namespace Hurricane {
using std::endl; using std::endl;
using std::hex; using std::hex;
using std::ostringstream; using std::ostringstream;
using std::istringstream;
using Isobar::ProxyProperty; using Isobar::ProxyProperty;
using Isobar::ProxyError; using Isobar::ProxyError;
using Isobar::ConstructorError; using Isobar::ConstructorError;
@ -75,6 +53,23 @@ extern "C" {
// +=================================================================+ // +=================================================================+
// static void parseInt ( const char* s, int& value )
// { istringstream is ( s ); is >> value; }
// static void parseFloat ( const char* s, float& value )
// { istringstream is ( s ); is >> value; }
static void parseRgbColor ( const char* color, int& red, int& green, int& blue )
{
char colon1, colon2;
istringstream is ( color );
is >> red >> colon1 >> green >> colon2 >> blue;
}
PyObject* PyDrawingGroup_find ( PyDrawingGroup* self, PyObject* args ) PyObject* PyDrawingGroup_find ( PyDrawingGroup* self, PyObject* args )
{ {
cdebug_log(20,0) << "PyDrawingGroup_find()" << endl; cdebug_log(20,0) << "PyDrawingGroup_find()" << endl;

View File

@ -106,7 +106,7 @@ namespace Katana {
void DataSymmetric::addSymmetrical ( AutoSegment* symmetrical ) void DataSymmetric::addSymmetrical ( AutoSegment* symmetrical )
{ {
if (_paireds.size() > _symIndex) _paireds[_symIndex++][1] = symmetrical; if (_paireds.size() > _symIndex) _paireds[_symIndex++][1] = symmetrical;
else _paireds.push_back( { NULL, symmetrical } ); else _paireds.push_back( {{ NULL, symmetrical }} );
} }

View File

@ -60,6 +60,7 @@ namespace {
using Katana::TrackSegment; using Katana::TrackSegment;
#if THIS_IS_DISABLED
void setSymmetricSelf ( Cell* cell, string name ) void setSymmetricSelf ( Cell* cell, string name )
{ {
Net* net = cell->getNet( name ); Net* net = cell->getNet( name );
@ -105,6 +106,7 @@ namespace {
slaveState ->setSymNet ( masterNet ); slaveState ->setSymNet ( masterNet );
masterState->setSymNet ( slaveNet ); masterState->setSymNet ( slaveNet );
} }
#endif
} // Anonymous namespace. } // Anonymous namespace.

View File

@ -195,6 +195,7 @@ namespace {
} }
#if THIS_IS_DISABLED
void moveUpCaged ( TrackElement* segment ) void moveUpCaged ( TrackElement* segment )
{ {
DebugSession::open( segment->getNet(), 150, 160 ); DebugSession::open( segment->getNet(), 150, 160 );
@ -219,6 +220,7 @@ namespace {
cdebug_tabw(159,-1); cdebug_tabw(159,-1);
DebugSession::close(); DebugSession::close();
} }
#endif
void protectCagedTerminals ( Track* track ) void protectCagedTerminals ( Track* track )

View File

@ -332,7 +332,7 @@ namespace Katana {
Record* Session::_getRecord () const Record* Session::_getRecord () const
{ {
Record* record = Session::_getRecord (); Record* record = Super::_getRecord ();
record->add( getSlot( "_sortEvents" , &_sortEvents ) ); record->add( getSlot( "_sortEvents" , &_sortEvents ) );
return record; return record;

View File

@ -87,7 +87,7 @@ namespace Katana {
inline DbU::Unit DataSymmetric::getSymAxis () const { return _state->getSymAxis(); } inline DbU::Unit DataSymmetric::getSymAxis () const { return _state->getSymAxis(); }
inline void DataSymmetric::setSymAxis ( DbU::Unit axis ) { _state->setSymAxis(axis); } inline void DataSymmetric::setSymAxis ( DbU::Unit axis ) { _state->setSymAxis(axis); }
inline Net* DataSymmetric::getSymNet () const { return _symNet; } inline Net* DataSymmetric::getSymNet () const { return _symNet; }
inline void DataSymmetric::addReference ( AutoSegment* segment ) { _paireds.push_back( {segment,NULL} ); } inline void DataSymmetric::addReference ( AutoSegment* segment ) { _paireds.push_back( {{segment,NULL}} ); }
inline void DataSymmetric::setValid ( bool state ) { _valid = state; } inline void DataSymmetric::setValid ( bool state ) { _valid = state; }
inline DbU::Unit DataSymmetric::getSymmetrical ( DbU::Unit pos ) const inline DbU::Unit DataSymmetric::getSymmetrical ( DbU::Unit pos ) const

View File

@ -38,6 +38,7 @@ namespace Katana {
using std::set; using std::set;
using std::vector; using std::vector;
using std::binary_function; using std::binary_function;
using std::labs;
using Hurricane::DbU; using Hurricane::DbU;
using Hurricane::Interval; using Hurricane::Interval;
using Hurricane::Net; using Hurricane::Net;
@ -218,7 +219,7 @@ namespace Katana {
//inline const vector<TrackElement*>& RoutingEvent::getPerpandiculars () const { return _perpandiculars; } //inline const vector<TrackElement*>& RoutingEvent::getPerpandiculars () const { return _perpandiculars; }
inline DbU::Unit RoutingEvent::getAxisHistory () const { return _axisHistory; } inline DbU::Unit RoutingEvent::getAxisHistory () const { return _axisHistory; }
inline DbU::Unit RoutingEvent::getAxisHint () const { return _axisHint; } inline DbU::Unit RoutingEvent::getAxisHint () const { return _axisHint; }
inline DbU::Unit RoutingEvent::getAxisWeight ( DbU::Unit axis ) const { return abs(axis - getAxisHint()); } inline DbU::Unit RoutingEvent::getAxisWeight ( DbU::Unit axis ) const { return labs(axis - getAxisHint()); }
inline const Interval& RoutingEvent::getConstraints () const { return _constraints; } inline const Interval& RoutingEvent::getConstraints () const { return _constraints; }
inline const Interval& RoutingEvent::getOptimal () const { return _optimal; } inline const Interval& RoutingEvent::getOptimal () const { return _optimal; }
inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); } inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); }

View File

@ -86,8 +86,8 @@ namespace Kite {
//cdebug_log(9000,0) << "Deter| DataNegociate::update() - " << _trackSegment << endl; //cdebug_log(9000,0) << "Deter| DataNegociate::update() - " << _trackSegment << endl;
cdebug_log(159,1) << "DataNegociate::update() - " << _trackSegment << endl; cdebug_log(159,1) << "DataNegociate::update() - " << _trackSegment << endl;
size_t reduceCandidates = 0; //size_t reduceCandidates = 0;
DbU::Unit pitch = _trackSegment->getPitch(); //DbU::Unit pitch = _trackSegment->getPitch();
vector<AutoSegment*> collapseds; vector<AutoSegment*> collapseds;
vector<AutoSegment*> perpandiculars; vector<AutoSegment*> perpandiculars;
map<DbU::Unit,int> attractorSpins; map<DbU::Unit,int> attractorSpins;

View File

@ -194,6 +194,7 @@ namespace {
} }
#if THIS_IS_DISABLED
void moveUpCaged ( TrackElement* segment ) void moveUpCaged ( TrackElement* segment )
{ {
DebugSession::open( segment->getNet(), 150, 160 ); DebugSession::open( segment->getNet(), 150, 160 );
@ -218,6 +219,7 @@ namespace {
cdebug_tabw(159,-1); cdebug_tabw(159,-1);
DebugSession::close(); DebugSession::close();
} }
#endif
void protectCagedTerminals ( Track* track ) void protectCagedTerminals ( Track* track )

View File

@ -346,7 +346,7 @@ namespace Kite {
Record* Session::_getRecord () const Record* Session::_getRecord () const
{ {
Record* record = Session::_getRecord (); Record* record = Super::_getRecord ();
record->add( getSlot( "_sortEvents" , &_sortEvents ) ); record->add( getSlot( "_sortEvents" , &_sortEvents ) );
return record; return record;

View File

@ -38,6 +38,7 @@ namespace Kite {
using std::set; using std::set;
using std::vector; using std::vector;
using std::binary_function; using std::binary_function;
using std::labs;
using Hurricane::DbU; using Hurricane::DbU;
using Hurricane::Interval; using Hurricane::Interval;
using Hurricane::Net; using Hurricane::Net;
@ -217,7 +218,7 @@ namespace Kite {
//inline const vector<TrackElement*>& RoutingEvent::getPerpandiculars () const { return _perpandiculars; } //inline const vector<TrackElement*>& RoutingEvent::getPerpandiculars () const { return _perpandiculars; }
inline DbU::Unit RoutingEvent::getAxisHistory () const { return _axisHistory; } inline DbU::Unit RoutingEvent::getAxisHistory () const { return _axisHistory; }
inline DbU::Unit RoutingEvent::getAxisHint () const { return _axisHint; } inline DbU::Unit RoutingEvent::getAxisHint () const { return _axisHint; }
inline long RoutingEvent::getAxisWeight ( DbU::Unit axis ) const { return abs(axis - getAxisHint()); } inline long RoutingEvent::getAxisWeight ( DbU::Unit axis ) const { return labs(axis - getAxisHint()); }
inline const Interval& RoutingEvent::getConstraints () const { return _constraints; } inline const Interval& RoutingEvent::getConstraints () const { return _constraints; }
inline const Interval& RoutingEvent::getOptimal () const { return _optimal; } inline const Interval& RoutingEvent::getOptimal () const { return _optimal; }
inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); } inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); }

View File

@ -58,6 +58,9 @@ namespace Kite {
class Session : public Katabatic::Session { class Session : public Katabatic::Session {
public:
typedef Katabatic::Session Super;
public: public:
static Session* open ( KiteEngine* ); static Session* open ( KiteEngine* );
static Session* get ( const char* message=NULL ); static Session* get ( const char* message=NULL );

View File

@ -1561,7 +1561,7 @@ void Graph::UpdateEstimateCongestion ( bool create )
if ( _vertexes_to_route.size() < 2 ) if ( _vertexes_to_route.size() < 2 )
return; return;
//cerr << "Running FLUTE for net : " << _working_net << endl; //cerr << "Running FLUTE for net : " << _working_net << endl;
auto_ptr<FTree> flutetree ( createFluteTree() ); unique_ptr<FTree> flutetree ( createFluteTree() );
//parcours des branches du FTree pour créer la congestion estimée //parcours des branches du FTree pour créer la congestion estimée
for ( int i = 0 ; i < 2*flutetree->deg-2 ; i++ ) { for ( int i = 0 ; i < 2*flutetree->deg-2 ; i++ ) {

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.7. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@
#ifndef YY_DEFYY_DEF_TAB_HPP_INCLUDED #ifndef YY_DEFYY_DEF_TAB_HPP_INCLUDED
# define YY_DEFYY_DEF_TAB_HPP_INCLUDED # define YY_DEFYY_DEF_TAB_HPP_INCLUDED
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
@ -40,12 +40,11 @@
extern int defyydebug; extern int defyydebug;
#endif #endif
/* Tokens. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype {
QSTRING = 258, QSTRING = 258,
T_STRING = 259, T_STRING = 259,
SITE_PATTERN = 260, SITE_PATTERN = 260,
@ -312,26 +311,10 @@ extern int defyydebug;
}; };
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int defyyparse (void *YYPARSE_PARAM);
#else
int defyyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int defyyparse (defrData *defData); int defyyparse (defrData *defData);
#else
int defyyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_DEFYY_DEF_TAB_HPP_INCLUDED */ #endif /* !YY_DEFYY_DEF_TAB_HPP_INCLUDED */

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.7. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -32,7 +32,7 @@
#ifndef YY_LEFYY_LEF_TAB_HPP_INCLUDED #ifndef YY_LEFYY_LEF_TAB_HPP_INCLUDED
# define YY_LEFYY_LEF_TAB_HPP_INCLUDED # define YY_LEFYY_LEF_TAB_HPP_INCLUDED
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 0 # define YYDEBUG 0
#endif #endif
@ -40,12 +40,11 @@
extern int lefyydebug; extern int lefyydebug;
#endif #endif
/* Tokens. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype {
K_HISTORY = 258, K_HISTORY = 258,
K_ABUT = 259, K_ABUT = 259,
K_ABUTMENT = 260, K_ABUTMENT = 260,
@ -474,41 +473,29 @@ extern int lefyydebug;
}; };
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
union YYSTYPE
{ {
/* Line 2058 of yacc.c */ #line 194 "/home/jpc/coriolis-2.x/src/coriolis/lefdef/src/lef/lef/lef.y" /* yacc.c:1909 */
#line 194 "/dsk/l1/jpc/coriolis-2.x/src/coriolis/lefdef/src/lef/lef/lef.y"
double dval ; double dval ;
int integer ; int integer ;
char * string ; char * string ;
LefDefParser::lefPOINT pt; LefDefParser::lefPOINT pt;
#line 489 "lef.tab.hpp" /* yacc.c:1909 */
};
/* Line 2058 of yacc.c */ typedef union YYSTYPE YYSTYPE;
#line 492 "lef.tab.hpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
extern YYSTYPE lefyylval; extern YYSTYPE lefyylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int lefyyparse (void *YYPARSE_PARAM);
#else
int lefyyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int lefyyparse (void); int lefyyparse (void);
#else
int lefyyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_LEFYY_LEF_TAB_HPP_INCLUDED */ #endif /* !YY_LEFYY_LEF_TAB_HPP_INCLUDED */

View File

@ -473,7 +473,7 @@ GetToken(char **buffer, int *bufferSize)
// 7/23/2003 - pcr 606558 - do not allow \n in a string instead // 7/23/2003 - pcr 606558 - do not allow \n in a string instead
// of ; // of ;
if ((ch == '\n') ) { if (ch == '\n') {
print_nlines(++lefData->lef_nlines); print_nlines(++lefData->lef_nlines);
// 2/2/2007 - PCR 909714, allow string to go more than 1 line // 2/2/2007 - PCR 909714, allow string to go more than 1 line
// continue to parse // continue to parse

View File

@ -54,7 +54,7 @@
namespace Mauka { namespace Mauka {
using std::auto_ptr; using std::unique_ptr;
using Hurricane::ForEachIterator; using Hurricane::ForEachIterator;
using Hurricane::Warning; using Hurricane::Warning;
using Hurricane::Plug; using Hurricane::Plug;
@ -507,7 +507,7 @@ namespace {
bool TestMaukaConstruction(Cell* cell, GCell* gcell) bool TestMaukaConstruction(Cell* cell, GCell* gcell)
// ************************************************* // *************************************************
{ {
auto_ptr<Configuration> configuration ( new Configuration() ); unique_ptr<Configuration> configuration ( new Configuration() );
DbU::Unit pitch = configuration->getPitch(); DbU::Unit pitch = configuration->getPitch();
DbU::Unit sliceHeight = configuration->getSliceHeight(); DbU::Unit sliceHeight = configuration->getSliceHeight();

View File

@ -299,7 +299,7 @@ int main ( int argc, char *argv[] )
} }
if ( not textMode ) { if ( not textMode ) {
auto_ptr<QApplication> qa ( new HApplication(argc,argv) ); unique_ptr<QApplication> qa ( new HApplication(argc,argv) );
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \ #if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \ (QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
not defined (__APPLE__) and not defined (__CYGWIN__) not defined (__APPLE__) and not defined (__CYGWIN__)

View File

@ -136,7 +136,7 @@ namespace Unicorn {
bool SaveCellDialog::runDialog ( QWidget* parent, QString& name ) bool SaveCellDialog::runDialog ( QWidget* parent, QString& name )
{ {
auto_ptr<SaveCellDialog> dialog ( new SaveCellDialog(parent) ); unique_ptr<SaveCellDialog> dialog ( new SaveCellDialog(parent) );
dialog->setCellName ( name ); dialog->setCellName ( name );
bool dialogResult = (dialog->exec() == Accepted); bool dialogResult = (dialog->exec() == Accepted);

View File

@ -136,7 +136,7 @@ int main ( int argc, char* argv[] )
} }
if ( arguments.count("aux") ) { if ( arguments.count("aux") ) {
auto_ptr<Circuit> circuit ( Circuit::parse(arguments["aux"].as<string>()) ); unique_ptr<Circuit> circuit ( Circuit::parse(arguments["aux"].as<string>()) );
circuit->check (); circuit->check ();

View File

@ -52,7 +52,7 @@ int main ( int argc, char* argv[] )
} }
if ( arguments.count("aux") ) { if ( arguments.count("aux") ) {
auto_ptr<Circuit> circuit ( Circuit::parse(arguments["aux"].as<string>()) ); unique_ptr<Circuit> circuit ( Circuit::parse(arguments["aux"].as<string>()) );
circuit->check (); circuit->check ();

View File

@ -63,7 +63,7 @@ int main ( int argc, char* argv[] )
exit ( 0 ); exit ( 0 );
} }
auto_ptr<QApplication> qa ( new QApplication(argc,argv) ); unique_ptr<QApplication> qa ( new QApplication(argc,argv) );
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \ #if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \ (QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
not defined (__APPLE__) and not defined (__CYGWIN__) not defined (__APPLE__) and not defined (__CYGWIN__)

View File

@ -204,7 +204,7 @@ namespace Cfg {
inline void Parameter::registerCb ( void* tag, ParameterChangedCb_t cb ) inline void Parameter::registerCb ( void* tag, ParameterChangedCb_t cb )
{ {
_callbacks.push_back(make_pair(tag,cb)); cb(this); _callbacks.push_back(std::make_pair(tag,cb)); cb(this);
} }
inline void Parameter::unregisterCb ( void* tag ) inline void Parameter::unregisterCb ( void* tag )