From 978315c0173296aee331d231e0c686a75f47dd38 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 9 Dec 2014 23:49:46 +0100 Subject: [PATCH] Compliance with Clang 3.4 (RHEL7, MacOS). * New: In Bootstrap, added support for RHEL7 in ccb.py & coriolisEnv.py. In coriolisEnv.py, under RHEL6, directly launch a shell under devtoolset-2 (do not put it in .bashrc). * Change: All tools, compliance with Clang 3.2. - Call using namespace std *after* at least one include of std has been used. - In Utilities.h define both const and non-cont overload for operator<< of mstream (this was the true cause of the Banner display problem). - No longer use defaults arguments in templates, instead create two separated overloads. - Put template static attributes allocation outside of namespaces (this one I'm not sure how to justify). - Protect by NDEBUG variables that are only needed in assert(). - In PyInterval getUnion() & getIntersection() we where silently overwriting the "self" object (interval). - In Mauka, *do no* overload _postCreate() and add an argument, breaks the virtual function mechanism. Rename it into _maukaPostCreate(). Idem for SubRow(). - In Katabatic::GCell(), invalidate() overload a Go funtion but is used for different purpose at this level. Rename it invalidateCt() (invalidate *ConTents*). - Miscellaneous small cleanup. --- bootstrap/builder/Configuration.py | 6 +- bootstrap/ccb.py | 6 +- bootstrap/coriolisEnv.py | 10 +- crlcore/src/ccore/Banner.cpp | 64 ++-------- crlcore/src/ccore/alliance/ap/ApDriver.cpp | 3 +- crlcore/src/ccore/alliance/ap/ApParser.cpp | 4 +- .../src/ccore/bookshelf/BookshelfDriver.cpp | 17 ++- .../src/ccore/bookshelf/BookshelfParser.cpp | 109 +++++++++--------- crlcore/src/ccore/crlcore/Banner.h | 79 +++---------- crlcore/src/ccore/crlcore/Catalog.h | 8 +- crlcore/src/ccore/crlcore/LefDefExtension.h | 31 ++--- crlcore/src/ccore/crlcore/Measures.h | 8 +- crlcore/src/ccore/crlcore/NetExtension.h | 29 ++--- crlcore/src/ccore/crlcore/Utilities.h | 94 +++++++-------- crlcore/src/ccore/ioc/IocParserGrammar.yy | 2 +- crlcore/src/ccore/lefdef/LefDefExtension.cpp | 28 ++--- crlcore/src/ccore/properties/Measures.cpp | 25 ++-- crlcore/src/ccore/properties/NetExtension.cpp | 30 ++--- crlcore/src/ccore/spice/SpiceParser.cpp | 10 +- crlcore/src/cyclop/CyclopMain.cpp | 35 +++--- crlcore/src/pyCRL/PyIspd05.cpp | 2 +- equinox/src/equinox/SweepLine.h | 10 +- etesian/src/EtesianEngine.cpp | 4 +- hurricane/src/isobar/PyDbU.cpp | 16 +-- hurricane/src/isobar/PyInterval.cpp | 12 +- hurricane/src/viewer/CellViewer.cpp | 5 +- hurricane/src/viewer/PyDisplayStyle.cpp | 9 +- hurricane/src/viewer/PyDrawingGroup.cpp | 10 +- katabatic/src/ChipTools.cpp | 1 + katabatic/src/GCell.cpp | 26 ++--- katabatic/src/KatabaticEngine.cpp | 2 + katabatic/src/katabatic/GCell.h | 10 +- kite/src/BuildPowerRails.cpp | 1 - kite/src/Track.cpp | 4 +- knik/src/Edge.cpp | 4 +- knik/src/Graph.cpp | 4 +- knik/src/HEdge.cpp | 10 +- knik/src/MatrixVertex.cpp | 4 +- knik/src/NetExtension.cpp | 31 ++--- knik/src/VEdge.cpp | 10 +- knik/src/knik/Edge.h | 2 +- knik/src/knik/HEdge.h | 2 +- knik/src/knik/SlicingTreeNode.h | 2 +- knik/src/knik/VEdge.h | 2 +- mauka/src/MaukaEngine.cpp | 44 +++---- mauka/src/Move.cpp | 18 +-- mauka/src/SubRow.cpp | 4 +- mauka/src/mauka/MaukaEngine.h | 4 +- mauka/src/mauka/SubRow.h | 2 +- metis/src/MetisEngine.cpp | 2 + metis/src/metis/MetisEngine.h | 2 + nimbus/src/FenceProperty.cpp | 6 +- nimbus/src/GCell.cpp | 4 + nimbus/src/Grid.cpp | 1 + nimbus/src/StepProperty.cpp | 8 +- unicorn/src/UnicornGui.cpp | 1 + unicorn/src/unicorn/UnicornGui.h | 3 +- vlsisapd/src/agds/src/Library.cpp | 2 +- vlsisapd/src/agds/src/PyAgds.cpp | 2 +- vlsisapd/src/agds/src/Structure.cpp | 2 +- .../src/bookshelf/src/BookshelfTkMain.cpp | 2 +- vlsisapd/src/cif/src/Circuit.cpp | 2 +- vlsisapd/src/cif/src/PyCif.cpp | 2 +- vlsisapd/src/cif/src/vlsisapd/cif/Circuit.h | 5 +- vlsisapd/src/cif/src/vlsisapd/cif/Polygon.h | 2 +- vlsisapd/src/dtr/src/PyDtr.cpp | 2 +- vlsisapd/src/liberty/src/Library.cpp | 2 +- vlsisapd/src/liberty/src/Name.cpp | 2 +- vlsisapd/src/liberty/src/PyLiberty.cpp | 3 +- vlsisapd/src/openChams/src/PyOpenChams.cpp | 3 +- vlsisapd/src/openChams/src/Schematic.cpp | 2 +- vlsisapd/src/openChams/src/SimulModel.cpp | 1 - .../src/vlsisapd/openChams/Schematic.h | 6 +- vlsisapd/src/spice/src/PySpice.cpp | 3 +- .../src/spice/src/vlsisapd/spice/Circuit.h | 3 +- vlsisapd/src/utilities/src/Path.cpp | 2 +- 76 files changed, 403 insertions(+), 525 deletions(-) diff --git a/bootstrap/builder/Configuration.py b/bootstrap/builder/Configuration.py index 024a25f8..3dac25df 100644 --- a/bootstrap/builder/Configuration.py +++ b/bootstrap/builder/Configuration.py @@ -121,6 +121,7 @@ class Configuration ( object ): def _guessOs ( self ): self._libSuffix = None + self._osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*") self._osSlsoc6x_64 = re.compile (".*Linux.*(el6|slsoc6).*x86_64.*") self._osSlsoc6x = re.compile (".*Linux.*(el6|slsoc6).*") self._osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*") @@ -139,7 +140,10 @@ class Configuration ( object ): uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() - if self._osSlsoc6x_64.match(lines[0]): + if self._osSlsoc7x_64.match(lines[0]): + self._osType = "Linux.el7" + self._libSuffix = "64" + elif self._osSlsoc6x_64.match(lines[0]): self._osType = "Linux.slsoc6x_64" self._libSuffix = "64" elif self._osSlsoc6x .match(lines[0]): self._osType = "Linux.slsoc6x" diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index 2cfcb42b..617fa35a 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -54,6 +54,7 @@ def safeImport ( moduleName, symbol=None ): def guessOs (): libDir = 'lib' + osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*") osSlsoc6x_64 = re.compile (".*Linux.*(el6|slsoc6).*x86_64.*") osSlsoc6x = re.compile (".*Linux.*(el6|slsoc6).*") osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*") @@ -72,7 +73,10 @@ def guessOs (): uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() - if osSlsoc6x_64.match(lines[0]): + if osSlsoc7x_64.match(lines[0]): + osType = "Linux.el7_64" + libDir = "lib64" + elif osSlsoc6x_64.match(lines[0]): osType = "Linux.slsoc6x_64" libDir = "lib64" elif osSlsoc6x.match(lines[0]): diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index d62f11bc..293c7b9b 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -33,6 +33,7 @@ def stripPath ( pathName ): def guessOs (): useDevtoolset2 = False + osSlsoc7x_64 = re.compile (".*Linux.*el7.*x86_64.*") osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*") osSlsoc6x = re.compile (".*Linux.*(el|slsoc)6.*") osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*") @@ -54,7 +55,10 @@ def guessOs (): lines = uname.stdout.readlines() libDir="lib" - if osSlsoc6x_64.match(lines[0]): + if osSlsoc7x_64.match(lines[0]): + osType = "Linux.el7_64" + libDir = "lib64" + elif osSlsoc6x_64.match(lines[0]): osType = "Linux.slsoc6x_64" libDir = "lib64" useDevtoolset2 = True @@ -100,8 +104,8 @@ def guessOs (): uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) osType = uname.stdout.readlines()[0][:-1] - #print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] - #print " (using: \"%s\")" % osType + print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] + print " (using: \"%s\")" % osType return (osType,libDir,useDevtoolset2) diff --git a/crlcore/src/ccore/Banner.cpp b/crlcore/src/ccore/Banner.cpp index 4beecf98..27858c3e 100644 --- a/crlcore/src/ccore/Banner.cpp +++ b/crlcore/src/ccore/Banner.cpp @@ -1,74 +1,34 @@ - - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== - - // -*- C++ -*- // -// $Id$ +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Banner.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Module : "./Banner.cpp" | +// +-----------------------------------------------------------------+ - -# include -# include -# include - -# include - -# include "crlcore/Banner.h" +# include +# include +# include +# include +# include "hurricane/Error.h" +# include "crlcore/Banner.h" namespace { - using std::make_pair; using std::cerr; using std::endl; using std::setw; + using Hurricane::Error; const char* badChar = diff --git a/crlcore/src/ccore/alliance/ap/ApDriver.cpp b/crlcore/src/ccore/alliance/ap/ApDriver.cpp index 9b832c63..9a0d307f 100644 --- a/crlcore/src/ccore/alliance/ap/ApDriver.cpp +++ b/crlcore/src/ccore/alliance/ap/ApDriver.cpp @@ -15,7 +15,6 @@ #include -using namespace std; #include "hurricane/Pin.h" #include "hurricane/Instance.h" @@ -33,6 +32,8 @@ using namespace std; #include "Ap.h" #include "crlcore/Catalog.h" +using namespace std; + namespace { diff --git a/crlcore/src/ccore/alliance/ap/ApParser.cpp b/crlcore/src/ccore/alliance/ap/ApParser.cpp index 08e4b51c..650df756 100644 --- a/crlcore/src/ccore/alliance/ap/ApParser.cpp +++ b/crlcore/src/ccore/alliance/ap/ApParser.cpp @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -478,7 +478,7 @@ namespace { orientation = fields[5]; index = -1; - if (fields[4] != '\0') index = atoi( fields[4] ); + if (fields[4][0] != '\0') index = atoi( fields[4] ); size_t length = strlen( fields[3] ); if (length > 1000) { diff --git a/crlcore/src/ccore/bookshelf/BookshelfDriver.cpp b/crlcore/src/ccore/bookshelf/BookshelfDriver.cpp index 834ae928..27a2c164 100644 --- a/crlcore/src/ccore/bookshelf/BookshelfDriver.cpp +++ b/crlcore/src/ccore/bookshelf/BookshelfDriver.cpp @@ -34,16 +34,15 @@ // Authors-Tag #include -using namespace std; - -#include "hurricane/Pin.h" -#include "hurricane/Cell.h" -#include "hurricane/Instance.h" -#include "hurricane/Net.h" -#include "hurricane/Horizontal.h" -#include "hurricane/Vertical.h" -#include "hurricane/Warning.h" +#include "hurricane/Pin.h" +#include "hurricane/Cell.h" +#include "hurricane/Instance.h" +#include "hurricane/Net.h" +#include "hurricane/Horizontal.h" +#include "hurricane/Vertical.h" +#include "hurricane/Warning.h" using namespace Hurricane; +using namespace std; namespace { diff --git a/crlcore/src/ccore/bookshelf/BookshelfParser.cpp b/crlcore/src/ccore/bookshelf/BookshelfParser.cpp index d1b04f22..df022f9c 100644 --- a/crlcore/src/ccore/bookshelf/BookshelfParser.cpp +++ b/crlcore/src/ccore/bookshelf/BookshelfParser.cpp @@ -45,22 +45,17 @@ #include - #include - #include - -#include "hurricane/DataBase.h" -#include "hurricane/Horizontal.h" -#include "hurricane/Vertical.h" -#include "hurricane/UpdateSession.h" +#include "hurricane/DataBase.h" +#include "hurricane/Horizontal.h" +#include "hurricane/Vertical.h" +#include "hurricane/UpdateSession.h" using namespace Hurricane; - #include "crlcore/Utilities.h" #include "crlcore/AllianceFramework.h" - -#include "Bookshelf.h" +#include "Bookshelf.h" const char* badRegex = @@ -77,13 +72,13 @@ namespace { - char* lower ( char* str ) - { - for ( char* ptr = str; *ptr != '\0' ; ptr++ ) - *ptr = (char)tolower ( *ptr ); - - return str; - } +// char* lower ( char* str ) +// { +// for ( char* ptr = str; *ptr != '\0' ; ptr++ ) +// *ptr = (char)tolower ( *ptr ); +// +// return str; +// } // CParsAP should read this code : // ******************************* @@ -297,24 +292,24 @@ Name BKParser::getNewNetName() } -Net* MergeNets ( Net* net1, Net* net2 ) -// ************************************ -{ - if ( net2->getName()[0] != '~' ) { - if ( ( net1->getName()[0] == '~' ) || - ( net2->isGlobal() && !net1->isGlobal() ) || - ( net2->isExternal() && !net1->isExternal() ) ) { - Net* tmpNet = net1; - net1 = net2; - net2 = tmpNet; - } - } - net1->setExternal ( net1->isExternal() || net2->isExternal() ); - net1->setGlobal ( net1->isGlobal() || net2->isGlobal() ); - - net1->merge ( net2 ); // Caution : net2 will be deleted - return net1; -} +// Net* MergeNets ( Net* net1, Net* net2 ) +// // ************************************ +// { +// if ( net2->getName()[0] != '~' ) { +// if ( ( net1->getName()[0] == '~' ) || +// ( net2->isGlobal() && !net1->isGlobal() ) || +// ( net2->isExternal() && !net1->isExternal() ) ) { +// Net* tmpNet = net1; +// net1 = net2; +// net2 = tmpNet; +// } +// } +// net1->setExternal ( net1->isExternal() || net2->isExternal() ); +// net1->setGlobal ( net1->isGlobal() || net2->isGlobal() ); +// +// net1->merge ( net2 ); // Caution : net2 will be deleted +// return net1; +// } // ************************************************************************************ @@ -734,28 +729,28 @@ Transformation getTransformation ( const Box& abox, const DbU::Unit& x, const Db } -void UpdateSizes ( Contact* contact ) -// ********************************** -{ - DbU::Unit width = 0; - DbU::Unit height = 0; - const Layer* layer = contact->getLayer(); - //if ( layer->getType() == CompositeLayer::Type::VIA ) { - width = max ( contact->getWidth(), layer->getMinimalSize() ); - height = max ( contact->getHeight(), layer->getMinimalSize() ); - //} - - for_each_hook ( hook, contact->getBodyHook()->getSlaveHooks() ) { - Component* component = hook->getComponent(); - if ( Vertical* vertical = dynamic_cast ( component ) ) { - width = max ( width, vertical->getWidth() ); - } else if ( Horizontal* horizontal = dynamic_cast ( component ) ) { - height = max ( height, horizontal->getWidth() ); - } - end_for; - } - contact->setSizes ( width, height ); -} +// void UpdateSizes ( Contact* contact ) +// // ********************************** +// { +// DbU::Unit width = 0; +// DbU::Unit height = 0; +// const Layer* layer = contact->getLayer(); +// //if ( layer->getType() == CompositeLayer::Type::VIA ) { +// width = max ( contact->getWidth(), layer->getMinimalSize() ); +// height = max ( contact->getHeight(), layer->getMinimalSize() ); +// //} +// +// for_each_hook ( hook, contact->getBodyHook()->getSlaveHooks() ) { +// Component* component = hook->getComponent(); +// if ( Vertical* vertical = dynamic_cast ( component ) ) { +// width = max ( width, vertical->getWidth() ); +// } else if ( Horizontal* horizontal = dynamic_cast ( component ) ) { +// height = max ( height, horizontal->getWidth() ); +// } +// end_for; +// } +// contact->setSizes ( width, height ); +// } // *************************************************************************************** diff --git a/crlcore/src/ccore/crlcore/Banner.h b/crlcore/src/ccore/crlcore/Banner.h index cf413efd..a7c9b708 100644 --- a/crlcore/src/ccore/crlcore/Banner.h +++ b/crlcore/src/ccore/crlcore/Banner.h @@ -1,78 +1,37 @@ - - // -*- C++ -*- // -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it -// and/or modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be -// useful, but WITHOUT ANY WARRANTY; without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA -// -// License-Tag -// Authors-Tag -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Banner.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./crlcore/Banner.h" | +// +-----------------------------------------------------------------+ +#ifndef CRL_BANNER_H +#define CRL_BANNER_H +#include +#include +#include +#include +#include - - -# ifndef __CRL_BANNER_H__ -# define __CRL_BANNER_H__ - -# include -# include -# include -# include -# include - -# ifdef __CCORE_INTERNAL__ -# include "hurricane/CConfig.h" -# endif -# include "crlcore/Utilities.h" +#ifdef __CCORE_INTERNAL__ +# include "hurricane/CConfig.h" +#endif +#include "crlcore/Utilities.h" namespace CRL { - + using std::string; using std::map; using std::vector; using std::ostream; @@ -220,7 +179,7 @@ namespace CRL { inline unsigned int Banner::getScreenWidth () const { return _screenWidth; } -} // End of CRL namespace. +} // CRL namespace. // Hurricane Management. @@ -233,4 +192,4 @@ inline std::ostream& operator<< ( std::ostream& o, const CRL::Banner& b ) { retu MSTREAM_R_SUPPORT(CRL::Banner); -# endif +#endif // CRL_BANNER_H diff --git a/crlcore/src/ccore/crlcore/Catalog.h b/crlcore/src/ccore/crlcore/Catalog.h index 1097b1da..21164090 100644 --- a/crlcore/src/ccore/crlcore/Catalog.h +++ b/crlcore/src/ccore/crlcore/Catalog.h @@ -180,11 +180,9 @@ namespace CRL { inline bool Catalog::State::isLogical () const { return (_flags&Logical )?1:0; } inline unsigned int Catalog::State::getFlags ( unsigned int mask ) const { return ( _flags & mask ); } inline bool Catalog::State::setFlags ( unsigned int mask, bool value ) { - switch ( value ) { - case true: _flags |= mask; break; - case false: _flags &= ~mask; break; - } - return ( (_flags&mask) ? true : false ); + if (value) { _flags |= mask; } + else { _flags &= ~mask; } + return ((_flags&mask) ? true : false); } inline bool Catalog::State::setFlattenLeaf ( bool value ) { return setFlags(FlattenLeaf,value); } inline bool Catalog::State::setFeed ( bool value ) { return setFlags(Feed ,value); } diff --git a/crlcore/src/ccore/crlcore/LefDefExtension.h b/crlcore/src/ccore/crlcore/LefDefExtension.h index 44f56cc6..37e8cfc0 100644 --- a/crlcore/src/ccore/crlcore/LefDefExtension.h +++ b/crlcore/src/ccore/crlcore/LefDefExtension.h @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,19 +11,15 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./LefDefExtension.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#ifndef __LEFDEF_EXTENSION__ -#define __LEFDEF_EXTENSION__ +#ifndef CRL_LEFDEF_EXTENSION_H +#define CRL_LEFDEF_EXTENSION_H -#include - -#include "hurricane/Box.h" -#include "hurricane/Property.h" +#include +#include "hurricane/Box.h" +#include "hurricane/Property.h" namespace Hurricane { class Cell; @@ -91,7 +81,6 @@ namespace CRL { }; -} // End of CRL namespace. +} // CRL namespace. - -#endif // __LEFDEF_EXTENSION__ +#endif // CRL_LEFDEF_EXTENSION_H diff --git a/crlcore/src/ccore/crlcore/Measures.h b/crlcore/src/ccore/crlcore/Measures.h index b3279a6a..6a3ca7bb 100644 --- a/crlcore/src/ccore/crlcore/Measures.h +++ b/crlcore/src/ccore/crlcore/Measures.h @@ -147,7 +147,8 @@ namespace CRL { public: typedef StandardPrivateProperty Extension; public: - template friend inline void addMeasure ( DBo*, const Name&, const Data&, unsigned int width=8 ); + template friend inline void addMeasure ( DBo*, const Name&, const Data&, unsigned int width ); + template friend inline void addMeasure ( DBo*, const Name&, const Data& ); template friend inline void addMeasure ( DBo*, const Name&, Data* ); template friend inline const Measure* getMeasure ( DBo*, const Name& ); static const MeasuresSet* get ( const DBo* ); @@ -170,6 +171,11 @@ namespace CRL { } + template + inline void addMeasure ( DBo* object, const Name& name, const Data& data ) + { return addMeasure(object,name,data,8); } + + template inline void addMeasure ( DBo* object, const Name& name, Data* data ) { diff --git a/crlcore/src/ccore/crlcore/NetExtension.h b/crlcore/src/ccore/crlcore/NetExtension.h index 582ff476..ad659e19 100644 --- a/crlcore/src/ccore/crlcore/NetExtension.h +++ b/crlcore/src/ccore/crlcore/NetExtension.h @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,18 +11,14 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./NetExtension.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#ifndef __NET_EXTENSION__ -#define __NET_EXTENSION__ +#ifndef CRL_NET_EXTENSION_H +#define CRL_NET_EXTENSION_H -#include - -#include "hurricane/Property.h" +#include +#include "hurricane/Property.h" namespace Hurricane { class Net; @@ -79,7 +69,6 @@ namespace CRL { }; -} // End of CRL namespace. +} // CRL namespace. - -#endif // __NET_EXTENSION__ +#endif // CRL_NET_EXTENSION_H diff --git a/crlcore/src/ccore/crlcore/Utilities.h b/crlcore/src/ccore/crlcore/Utilities.h index f1780ea2..fbca972c 100644 --- a/crlcore/src/ccore/crlcore/Utilities.h +++ b/crlcore/src/ccore/crlcore/Utilities.h @@ -31,7 +31,6 @@ namespace CRL { - using Hurricane::_TName; using Hurricane::Record; using Hurricane::Error; @@ -152,12 +151,9 @@ namespace CRL { } // End of CRL namespace. - - // ------------------------------------------------------------------- // Class : "::tty()". - class tty { public: enum Flags { Black = 0 @@ -253,7 +249,6 @@ inline std::string tty::bgcolor ( unsigned int mask ) // Wrapper around the STL ostream which uses a verbose level to choose // wether to print or not. - class mstream : public std::ostream { public: enum StreamMasks { PassThrough = 0x00000001 @@ -298,46 +293,57 @@ inline std::string tty::bgcolor ( unsigned int mask ) inline mstream& mstream::flush () { if (enabled()) static_cast(this)->flush(); return *this; } inline mstream& mstream::operator<< ( std::ostream& (*pf)(std::ostream&) ) { if (enabled()) (*pf)(*this); return *this; } +// For POD Types. template inline mstream& mstream::operator<< ( T& t ) - { if (enabled()) { *(static_cast(this)) << t; } return *this; }; + { if (enabled()) { *(static_cast(this)) << t; } return *this; }; template inline mstream& mstream::operator<< ( T* t ) - { if (enabled()) { *(static_cast(this)) << t; } return *this; }; + { if (enabled()) { *(static_cast(this)) << t; } return *this; }; template inline mstream& mstream::operator<< ( const T& t ) - { if (enabled()) { *(static_cast(this)) << t; } return *this; }; + { if (enabled()) { *(static_cast(this)) << t; } return *this; }; template inline mstream& mstream::operator<< ( const T* t ) - { if (enabled()) { *(static_cast(this)) << t; } return *this; }; + { if (enabled()) { *(static_cast(this)) << t; } return *this; }; + +// For STL Types. + inline mstream& operator<< ( mstream& o, const std::string& s ) + { if (o.enabled()) { static_cast(o) << s; } return o; }; // Specific non-member operator overload. Must be one for each type. #define MSTREAM_V_SUPPORT(Type) \ - inline mstream& operator<< ( mstream& o, const Type s ) \ - { if (o.enabled()) { static_cast(o) << s; } return o; }; + inline mstream& operator<< ( mstream& o, Type t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; \ + \ + inline mstream& operator<< ( mstream& o, const Type t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; #define MSTREAM_R_SUPPORT(Type) \ - inline mstream& operator<< ( mstream& o, const Type& s ) \ - { if (o.enabled()) { static_cast(o) << s; } return o; }; + inline mstream& operator<< ( mstream& o, const Type& t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; \ + \ + inline mstream& operator<< ( mstream& o, Type& t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; #define MSTREAM_P_SUPPORT(Type) \ - inline mstream& operator<< ( mstream& o, const Type* s ) \ - { if (o.enabled()) { static_cast(o) << s; } return o; }; + inline mstream& operator<< ( mstream& o, const Type* t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; \ + \ + inline mstream& operator<< ( mstream& o, Type* t ) \ + { if (o.enabled()) { static_cast(o) << t; } return o; }; #define MSTREAM_PR_SUPPORT(Type) \ MSTREAM_P_SUPPORT(Type) \ MSTREAM_R_SUPPORT(Type) -MSTREAM_PR_SUPPORT(std::string); - // ------------------------------------------------------------------- // Shared objects. - extern mstream cmess0; extern mstream cmess1; extern mstream cmess2; @@ -346,39 +352,12 @@ extern mstream cparanoid; extern mstream cbug; -// ------------------------------------------------------------------- -// Class : "::Dots". - - -class Dots { - public: - static Dots asPercentage ( const std::string& left, float ); - static Dots asBool ( const std::string& left, bool ); - static Dots asInt ( const std::string& left, int ); - static Dots asUInt ( const std::string& left, unsigned int ); - static Dots asULong ( const std::string& left, unsigned long ); - static Dots asSizet ( const std::string& left, size_t ); - static Dots asDouble ( const std::string& left, double ); - static Dots asLambda ( const std::string& left, Hurricane::DbU::Unit ); - static Dots asLambda ( const std::string& left, double ); - static Dots asIdentifier ( const std::string& left, const std::string& ); - static Dots asString ( const std::string& left, const std::string& ); - private: - Dots ( const std::string& left, const std::string& right ); - friend std::ostream& operator<< ( std::ostream&, const Dots& ); - private: - const std::string _left; - const std::string _right; -}; - - // ------------------------------------------------------------------- // Class : "::linefill()". // // Wrapper around the STL ostream which try print unbufferized filed // lines. - class linefill : public std::ostream { public: inline linefill ( const std::string& header, mstream &s ); @@ -460,4 +439,29 @@ inline linefill& linefill::operator<< ( const T* t ) LINEFILL_PR_SUPPORT(std::string); +// ------------------------------------------------------------------- +// Class : "::Dots". + +class Dots { + public: + static Dots asPercentage ( const std::string& left, float ); + static Dots asBool ( const std::string& left, bool ); + static Dots asInt ( const std::string& left, int ); + static Dots asUInt ( const std::string& left, unsigned int ); + static Dots asULong ( const std::string& left, unsigned long ); + static Dots asSizet ( const std::string& left, size_t ); + static Dots asDouble ( const std::string& left, double ); + static Dots asLambda ( const std::string& left, Hurricane::DbU::Unit ); + static Dots asLambda ( const std::string& left, double ); + static Dots asIdentifier ( const std::string& left, const std::string& ); + static Dots asString ( const std::string& left, const std::string& ); + private: + Dots ( const std::string& left, const std::string& right ); + friend std::ostream& operator<< ( std::ostream&, const Dots& ); + private: + const std::string _left; + const std::string _right; +}; + + #endif // CRL_UTILITIES diff --git a/crlcore/src/ccore/ioc/IocParserGrammar.yy b/crlcore/src/ccore/ioc/IocParserGrammar.yy index 41202a95..9f411e71 100644 --- a/crlcore/src/ccore/ioc/IocParserGrammar.yy +++ b/crlcore/src/ccore/ioc/IocParserGrammar.yy @@ -2,7 +2,6 @@ #include #include #include -using namespace std; #include "hurricane/DataBase.h" #include "hurricane/Technology.h" @@ -15,6 +14,7 @@ using namespace Hurricane; #include "crlcore/LefDefExtension.h" #include "crlcore/NetExtension.h" using namespace CRL; +using namespace std; #include "crlcore/Ioc.h" #define yyin Iocin diff --git a/crlcore/src/ccore/lefdef/LefDefExtension.cpp b/crlcore/src/ccore/lefdef/LefDefExtension.cpp index 72590227..9dabb9ed 100644 --- a/crlcore/src/ccore/lefdef/LefDefExtension.cpp +++ b/crlcore/src/ccore/lefdef/LefDefExtension.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,16 +11,16 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./LefDefExtension.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "hurricane/Error.h" -#include "hurricane/Cell.h" +#include "hurricane/Error.h" +#include "hurricane/Cell.h" +#include "crlcore/LefDefExtension.h" -#include "crlcore/LefDefExtension.h" + +template<> +Hurricane::Name CRL::LefDefExtension::Extension::_name = "CRL::LefDefExtension"; namespace CRL { @@ -37,10 +31,6 @@ namespace CRL { const char* MissingLefDefExtension = "LefDefExtension::%s(): %s missing the LEF/DEF extension."; - - template<> - Name LefDefExtension::Extension::_name = "CRL::LefDefExtension"; - // ------------------------------------------------------------------- // Class : "CRL::LefDefExtensionDatas". diff --git a/crlcore/src/ccore/properties/Measures.cpp b/crlcore/src/ccore/properties/Measures.cpp index e9805477..4c47c76a 100644 --- a/crlcore/src/ccore/properties/Measures.cpp +++ b/crlcore/src/ccore/properties/Measures.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,20 +11,19 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./Measures.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include - #include "hurricane/Error.h" #include "hurricane/DBo.h" - #include "crlcore/Measures.h" +template<> +Hurricane::Name Hurricane::StandardPrivateProperty::_name = "CRL::Measures"; + + namespace CRL { @@ -60,10 +53,6 @@ namespace CRL { // Class : "CRL::MeasuresSet". - template<> - Name StandardPrivateProperty::_name = "CRL::Measures"; - - MeasuresSet::~MeasuresSet () { iterator imeasure = begin(); diff --git a/crlcore/src/ccore/properties/NetExtension.cpp b/crlcore/src/ccore/properties/NetExtension.cpp index b6a681ad..a21e6644 100644 --- a/crlcore/src/ccore/properties/NetExtension.cpp +++ b/crlcore/src/ccore/properties/NetExtension.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,17 +11,17 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./NetExtension.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "hurricane/Error.h" -#include "hurricane/Net.h" -#include "hurricane/Cell.h" +#include "hurricane/Error.h" +#include "hurricane/Net.h" +#include "hurricane/Cell.h" +#include "crlcore/NetExtension.h" -#include "crlcore/NetExtension.h" + +template<> +Hurricane::Name Hurricane::StandardPrivateProperty::_name = "CRL::NetExtension"; namespace CRL { @@ -39,10 +33,6 @@ namespace CRL { const char* MissingNetExtension = "NetExtension::%s(): %s missing the Net extension."; - - template<> - Name StandardPrivateProperty::_name = "CRL::NetExtension"; - // ------------------------------------------------------------------- // Class : "CRL::NetExtensionDatas". diff --git a/crlcore/src/ccore/spice/SpiceParser.cpp b/crlcore/src/ccore/spice/SpiceParser.cpp index fa68fd20..fc9c92f0 100644 --- a/crlcore/src/ccore/spice/SpiceParser.cpp +++ b/crlcore/src/ccore/spice/SpiceParser.cpp @@ -551,10 +551,12 @@ END_IF list::iterator it6_begin = (*it5_begin).second.begin(), it6_end = (*it5_begin).second.end(); // signal index list iterator - list::iterator it7_begin = // masterModel port list iterator - modelNameToPortListMap[getString(masterModel->getName())].begin(), - it7_end = - modelNameToPortListMap[getString(masterModel->getName())].end(); + list::iterator it7_begin = // masterModel port list iterator + modelNameToPortListMap[getString(masterModel->getName())].begin(); +#ifndef NDEBUG + list::iterator it7_end = + modelNameToPortListMap[getString(masterModel->getName())].end(); +#endif while(it6_begin!=it6_end){ // For all port<=> signals to branch. ins->getPlug(*it7_begin)->setNet(_model->getNet((*_indexToNetNameMap)[*it6_begin])); diff --git a/crlcore/src/cyclop/CyclopMain.cpp b/crlcore/src/cyclop/CyclopMain.cpp index 0999f220..c8d0e347 100644 --- a/crlcore/src/cyclop/CyclopMain.cpp +++ b/crlcore/src/cyclop/CyclopMain.cpp @@ -45,6 +45,7 @@ using namespace Hurricane; #include "DemoGo.h" #include "Cyclop.h" +#include "crlcore/Utilities.h" using namespace CRL; @@ -54,23 +55,23 @@ namespace { // ------------------------------------------------------------------- // Function : "printHelp()". - void printHelp () - { - cout << endl; - cout << "Usage: cyclop [-v|--verbose] [-V|--very-verbose] [-D|--core-dump] \\\n" - << " [-l|--trace-level ] [-c|--cell ] \\\n" - << endl; - cout << "Options:\n" - << " o [-v|--verbose] : First level of verbosity.\n" - << " o [-V|--very-verbose] : Second level of verbosity (very talkative).\n" - << " o [-D|--core-dump] : Enable core dumping.\n" - << " o [-l|--trace-level ] :\n" - << " Sets the level of trace, trace messages with a level superior to\n" - << " will be printed on .\n" - << " o [-c|--cell ] :\n" - << " The name of the Cell to load, without extention.\n" - << endl; - } +// void printHelp () +// { +// cout << endl; +// cout << "Usage: cyclop [-v|--verbose] [-V|--very-verbose] [-D|--core-dump] \\\n" +// << " [-l|--trace-level ] [-c|--cell ] \\\n" +// << endl; +// cout << "Options:\n" +// << " o [-v|--verbose] : First level of verbosity.\n" +// << " o [-V|--very-verbose] : Second level of verbosity (very talkative).\n" +// << " o [-D|--core-dump] : Enable core dumping.\n" +// << " o [-l|--trace-level ] :\n" +// << " Sets the level of trace, trace messages with a level superior to\n" +// << " will be printed on .\n" +// << " o [-c|--cell ] :\n" +// << " The name of the Cell to load, without extention.\n" +// << endl; +// } } // End of anonymous namespace. diff --git a/crlcore/src/pyCRL/PyIspd05.cpp b/crlcore/src/pyCRL/PyIspd05.cpp index d8fc41ac..7cf2937f 100644 --- a/crlcore/src/pyCRL/PyIspd05.cpp +++ b/crlcore/src/pyCRL/PyIspd05.cpp @@ -14,9 +14,9 @@ // +-----------------------------------------------------------------+ -#include "crlcore/Ispd05Bookshelf.h" #include "crlcore/PyIspd05.h" #include "hurricane/isobar/PyCell.h" +#include "crlcore/Ispd05Bookshelf.h" #include #include diff --git a/equinox/src/equinox/SweepLine.h b/equinox/src/equinox/SweepLine.h index d5ae15b0..af10693b 100644 --- a/equinox/src/equinox/SweepLine.h +++ b/equinox/src/equinox/SweepLine.h @@ -89,10 +89,10 @@ namespace Equinox { /**/ Record* _getRecord () const; /**/ string _getString () const; /**/ Box getBoundingBox () const; - /**/ void run ( vector < ITEM >* _itemsByXmin, - vector < ITEM >* _itemsByXmax, - bool stopToMax, - int max); + /**/ void run ( vector < ITEM >* _itemsByXmin + , vector < ITEM >* _itemsByXmax + , bool stopToMax = false + , int max = 0 ); /**/ void initIntervalSets () ; /**/inline void insertInterval (ITEM newitem); @@ -346,7 +346,7 @@ inline void SweepLine::insertInterval(ITEM item) template < typename ITEM, typename ENGINE > - void SweepLine::run (vector < ITEM >* _itemsByXmin, vector < ITEM >* _itemsByXmax,bool stopAtMax = false,int max = 0) + void SweepLine::run (vector < ITEM >* _itemsByXmin, vector < ITEM >* _itemsByXmax,bool stopAtMax, int max ) { ///*DEBUG*/ cmess1 << " o SweepLine :: run : " << endl; diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index d7e3bd3d..fe2b2bfb 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -50,6 +50,7 @@ namespace { using namespace Hurricane; +#if HAVE_COLOQUINTE string extractInstanceName ( const RoutingPad* rp ) { ostringstream name; @@ -101,7 +102,6 @@ namespace { } -#if HAVE_COLOQUINTE Coloquinte::cell::pin::pin_dir extractDirection ( const RoutingPad* rp ) { switch ( rp->_getEntityAsComponent()->getNet()->getDirection() ) { @@ -114,7 +114,6 @@ namespace { return Coloquinte::cell::pin::O; } -#endif Point extractRpOffset ( const RoutingPad* rp ) @@ -130,6 +129,7 @@ namespace { return offset; } +#endif } // Anonymous namespace. diff --git a/hurricane/src/isobar/PyDbU.cpp b/hurricane/src/isobar/PyDbU.cpp index 8333d71b..fede5724 100644 --- a/hurricane/src/isobar/PyDbU.cpp +++ b/hurricane/src/isobar/PyDbU.cpp @@ -60,15 +60,15 @@ extern "C" { #if defined(__PYTHON_MODULE__) - static DbU::SnapMode PyInt_AsSnapMode ( PyObject* object ) { - switch ( PyAny_AsLong(object) ) { - case DbU::Inferior : return ( DbU::Inferior ); - case DbU::Superior : return ( DbU::Superior ); - case DbU::Nearest : return ( DbU::Nearest ); - } + // static DbU::SnapMode PyInt_AsSnapMode ( PyObject* object ) { + // switch ( PyAny_AsLong(object) ) { + // case DbU::Inferior : return ( DbU::Inferior ); + // case DbU::Superior : return ( DbU::Superior ); + // case DbU::Nearest : return ( DbU::Nearest ); + // } - return ( DbU::Superior ); - } + // return ( DbU::Superior ); + // } static DbU::UnitPower PyInt_AsUnitPower ( PyObject* object ) { switch ( PyAny_AsLong(object) ) { diff --git a/hurricane/src/isobar/PyInterval.cpp b/hurricane/src/isobar/PyInterval.cpp index 52fa30d7..67a8e60d 100644 --- a/hurricane/src/isobar/PyInterval.cpp +++ b/hurricane/src/isobar/PyInterval.cpp @@ -95,12 +95,13 @@ extern "C" { METHOD_HEAD ( "Interval.getUnion()" ) - PyInterval* otherPyInterval; + Interval* uinterval = NULL; + PyInterval* otherPyInterval = NULL; if (PyArg_ParseTuple(args,"O!:Interval.getUnion", &PyTypeInterval, &otherPyInterval)) { HTRY - Interval* interval = new Interval ( interval->getUnion(*PYINTERVAL_O(otherPyInterval))); + uinterval = new Interval ( interval->getUnion(*PYINTERVAL_O(otherPyInterval))); HCATCH - return PyInterval_Link( interval ); + return PyInterval_Link( uinterval ); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for Interval.getUnion."); } @@ -113,12 +114,13 @@ extern "C" { METHOD_HEAD ( "Interval.getIntersection()" ) + Interval* iinterval = NULL; PyInterval* otherPyInterval = NULL; if (PyArg_ParseTuple(args,"O!:Interval.getIntersection", &PyTypeInterval, &otherPyInterval)) { HTRY - Interval* interval = new Interval(interval->getIntersection(*PYINTERVAL_O(otherPyInterval))); + iinterval = new Interval(interval->getIntersection(*PYINTERVAL_O(otherPyInterval))); HCATCH - return PyInterval_Link( interval ); + return PyInterval_Link( iinterval ); } else { PyErr_SetString(ConstructorError, "invalid number of parameters for Interval.getIntersection."); } diff --git a/hurricane/src/viewer/CellViewer.cpp b/hurricane/src/viewer/CellViewer.cpp index 622224ab..99d49d00 100644 --- a/hurricane/src/viewer/CellViewer.cpp +++ b/hurricane/src/viewer/CellViewer.cpp @@ -682,9 +682,8 @@ namespace Hurricane { list< shared_ptr >::iterator istate = _cellHistory.begin(); size_t index = historyAction->data().toUInt(); - for ( ; index>0 ; index--, istate++ ); - - //cerr << "History: " << (*istate)->getName() << endl; + //for ( ; index>0 ; index--, istate++ ) + // cerr << "History: " << (*istate)->getName() << endl; emit stateChanged ( *istate ); } } diff --git a/hurricane/src/viewer/PyDisplayStyle.cpp b/hurricane/src/viewer/PyDisplayStyle.cpp index eb702be3..744d29da 100644 --- a/hurricane/src/viewer/PyDisplayStyle.cpp +++ b/hurricane/src/viewer/PyDisplayStyle.cpp @@ -29,12 +29,12 @@ namespace { using std::istringstream; - void parseInt ( const char* s, int& value ) - { istringstream is ( s ); is >> value; } + // 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 parseFloat ( const char* s, float& value ) + // { istringstream is ( s ); is >> value; } void parseRgbColor ( const char* color, int& red, int& green, int& blue ) @@ -46,7 +46,6 @@ namespace { } - } // Anonymous namespace. diff --git a/hurricane/src/viewer/PyDrawingGroup.cpp b/hurricane/src/viewer/PyDrawingGroup.cpp index ac251add..f65f1ea6 100644 --- a/hurricane/src/viewer/PyDrawingGroup.cpp +++ b/hurricane/src/viewer/PyDrawingGroup.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved +// Copyright (c) UPMC 2012-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -26,12 +26,12 @@ namespace { using std::istringstream; - void parseInt ( const char* s, int& value ) - { istringstream is ( s ); is >> value; } + // 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 parseFloat ( const char* s, float& value ) + // { istringstream is ( s ); is >> value; } void parseRgbColor ( const char* color, int& red, int& green, int& blue ) diff --git a/katabatic/src/ChipTools.cpp b/katabatic/src/ChipTools.cpp index 28310320..e6cf8d27 100644 --- a/katabatic/src/ChipTools.cpp +++ b/katabatic/src/ChipTools.cpp @@ -18,6 +18,7 @@ #include #include "hurricane/Warning.h" #include "hurricane/Bug.h" +#include "hurricane/Torus.h" #include "hurricane/DataBase.h" #include "hurricane/Technology.h" #include "hurricane/Horizontal.h" diff --git a/katabatic/src/GCell.cpp b/katabatic/src/GCell.cpp index 8fbc00c4..1995a913 100644 --- a/katabatic/src/GCell.cpp +++ b/katabatic/src/GCell.cpp @@ -611,14 +611,12 @@ namespace Katabatic { if ( (i%2) and (_densities[i] > density) ) density = _densities[i]; } //density = roundfp(density); - density = density; } else if (getGCellGrid()->getDensityMode() == GCellGrid::MaxVDensity) { // Density of the most saturated vertical layer. for ( size_t i=_pinDepth ; i<_depth ; i++ ) { if ( (i%2 == 0) and (_densities[i] > density) ) density = _densities[i]; } //density = roundfp(density); - density = density; } return density; @@ -758,18 +756,18 @@ namespace Katabatic { sort ( _hsegments.begin(), _hsegments.end(), AutoSegment::CompareByDepthLength() ); sort ( _vsegments.begin(), _vsegments.end(), AutoSegment::CompareByDepthLength() ); - float hcapacity = getHCapacity (); - float vcapacity = getVCapacity (); - float ccapacity = hcapacity * vcapacity * 4; - DbU::Unit hpenalty = 0 /*_box.getWidth () / 3*/; - DbU::Unit vpenalty = 0 /*_box.getHeight() / 3*/; - DbU::Unit uLengths1 [ _depth ]; - DbU::Unit uLengths2 [ _depth ]; - float localCounts [ _depth ]; - UsedFragments ufragments [ _depth ]; + float hcapacity = getHCapacity (); + float vcapacity = getVCapacity (); + float ccapacity = hcapacity * vcapacity * 4; + DbU::Unit hpenalty = 0 /*_box.getWidth () / 3*/; + DbU::Unit vpenalty = 0 /*_box.getHeight() / 3*/; + DbU::Unit uLengths1 [ _depth ]; + DbU::Unit uLengths2 [ _depth ]; + float localCounts [ _depth ]; + vector ufragments ( _depth ); for ( size_t i=0 ; i<_depth ; i++ ) { - ufragments [i].setPitch ( Session::getPitch(i) ); + ufragments[i].setPitch ( Session::getPitch(i) ); _feedthroughs[i] = 0.0; uLengths2 [i] = 0; localCounts [i] = 0.0; @@ -809,7 +807,7 @@ namespace Katabatic { size_t count = 0; for ( size_t i=0 ; i<_hsegments.size() ; i++ ) { _globalsCount[depth] += 1.0; - ufragments [depth].incGlobals(); + ufragments[depth].incGlobals(); if ( layer != _hsegments[i]->getLayer() ) { uLengths2[depth] += count * _box.getWidth(); @@ -833,7 +831,7 @@ namespace Katabatic { size_t count = 0; for ( size_t i=0 ; i<_vsegments.size() ; i++ ) { _globalsCount[depth] += 1.0; - ufragments [depth].incGlobals(); + ufragments[depth].incGlobals(); if ( layer != _vsegments[i]->getLayer() ) { uLengths2[depth] += count * _box.getHeight(); diff --git a/katabatic/src/KatabaticEngine.cpp b/katabatic/src/KatabaticEngine.cpp index 374e09dd..5175bdf7 100644 --- a/katabatic/src/KatabaticEngine.cpp +++ b/katabatic/src/KatabaticEngine.cpp @@ -43,6 +43,7 @@ namespace { using namespace Hurricane; +#if 0 bool isTopAndBottomConnected ( Segment* segment, set& layers ) { ltrace(88) << "* Potential Null Length: " << segment << endl; @@ -77,6 +78,7 @@ namespace { return layers.size()+supplemental > 2; } +#endif } // End of anonymous namespace. diff --git a/katabatic/src/katabatic/GCell.h b/katabatic/src/katabatic/GCell.h index 4bab378c..7df8d907 100644 --- a/katabatic/src/katabatic/GCell.h +++ b/katabatic/src/katabatic/GCell.h @@ -178,7 +178,7 @@ namespace Katabatic { bool stepNetDesaturate ( unsigned int depth , set& globalNets , SetIndex& invalidateds ); - inline void invalidate (); + inline void invalidateCt (); inline void setUnderIoPad (); // Inspector Management. Record* _getRecord () const; @@ -246,7 +246,7 @@ namespace Katabatic { inline const vector& GCell::getHSegments () const { return _hsegments; } inline const vector& GCell::getContacts () const { return _contacts; } inline string GCell::_getTypeName () const { return _TName("GCell"); } - inline void GCell::invalidate () { _flags |= GCellInvalidated; } + inline void GCell::invalidateCt () { _flags |= GCellInvalidated; } inline void GCell::setUnderIoPad() { _flags |= GCellUnderIoPad; } inline const GCell::Key& GCell::getKey () const { return _key; } inline void GCell::updateKey ( unsigned int depth ) { _key.update(depth); } @@ -276,13 +276,13 @@ namespace Katabatic { { return (depth<_depth) ? _blockages[depth] : 0; } inline void GCell::addVSegment ( AutoSegment* segment ) - { invalidate(); _vsegments.push_back(segment); } + { invalidateCt(); _vsegments.push_back(segment); } inline void GCell::addHSegment ( AutoSegment* segment ) - { invalidate(); _hsegments.push_back(segment); } + { invalidateCt(); _hsegments.push_back(segment); } inline void GCell::addContact ( AutoContact* contact ) - { invalidate(); _contacts.push_back(contact); } + { invalidateCt(); _contacts.push_back(contact); } // GCell::CompareByIndex Inline Functions. diff --git a/kite/src/BuildPowerRails.cpp b/kite/src/BuildPowerRails.cpp index 98f03626..12e81db2 100644 --- a/kite/src/BuildPowerRails.cpp +++ b/kite/src/BuildPowerRails.cpp @@ -417,7 +417,6 @@ namespace { DbU::Unit _axis; DbU::Unit _width; list _chunks; - Net* _net; }; private: diff --git a/kite/src/Track.cpp b/kite/src/Track.cpp index 623c76bb..00145582 100644 --- a/kite/src/Track.cpp +++ b/kite/src/Track.cpp @@ -40,8 +40,8 @@ namespace { }; - DbU::Unit getPositionByIterator ( const vector& v, size_t i ) - { return (*(v.begin()+i))->getSourceU(); } + // DbU::Unit getPositionByIterator ( const vector& v, size_t i ) + // { return (*(v.begin()+i))->getSourceU(); } } // Anonymous namespace. diff --git a/knik/src/Edge.cpp b/knik/src/Edge.cpp index 220e43fd..ec3bbfbd 100644 --- a/knik/src/Edge.cpp +++ b/knik/src/Edge.cpp @@ -56,8 +56,8 @@ Edge::Edge ( Vertex* from, Vertex* to, unsigned capacity ) //cerr << " Edge::Edge() capacity:" << _capacity << endl; } -void Edge::_postCreate ( bool capacity ) -// ************************************* +void Edge::_postCreate () +// ********************** { Inherit::_postCreate(); diff --git a/knik/src/Graph.cpp b/knik/src/Graph.cpp index de257ff6..6c5ae593 100644 --- a/knik/src/Graph.cpp +++ b/knik/src/Graph.cpp @@ -858,7 +858,9 @@ void Graph::addToSTuplePQ ( STuple* stuple ) STuple::CostProperty* costProperty = stuple->getCostProperty(); assert( costProperty ); costProperty->setPQIter ( _stuplePriorityQueue.insert( stuple ) ); +#ifndef NDEBUG STuple::STuplePQIter pqit = costProperty->getPQIter(); +#endif assert( (*pqit) == stuple ); } @@ -2068,7 +2070,7 @@ unsigned Graph::analyseRouting ( set& segmentsToUnroute ) } else { STuple* topSTuple = getMaxFromSTuplePQ(); - float maxCost = topSTuple->getCost(); + //float maxCost = topSTuple->getCost(); //cmess1 << " - Maximum segment cost : " << maxCost << endl; float minCost = 0.20; if (_stuplePriorityQueue.size() <= 100) diff --git a/knik/src/HEdge.cpp b/knik/src/HEdge.cpp index 8cd21c69..9f911bfd 100644 --- a/knik/src/HEdge.cpp +++ b/knik/src/HEdge.cpp @@ -36,7 +36,7 @@ HEdge* HEdge::create ( Vertex* from, Vertex* to ) HEdge* hEdge = new HEdge ( from, to ); - hEdge->_postCreate(true); + hEdge->_postCreate(); return hEdge; } @@ -49,15 +49,15 @@ HEdge* HEdge::create ( Vertex* from, Vertex* to, unsigned capacity ) HEdge* hEdge = new HEdge ( from, to, capacity ); - hEdge->_postCreate(false); + hEdge->_postCreate(); return hEdge; } -void HEdge::_postCreate ( bool fenceCapacity ) -// ******************************************* +void HEdge::_postCreate () +// *********************** { - Inherit::_postCreate ( fenceCapacity ); + Inherit::_postCreate(); } HEdge::~HEdge() diff --git a/knik/src/MatrixVertex.cpp b/knik/src/MatrixVertex.cpp index 9e0efc6e..d61a0cd6 100644 --- a/knik/src/MatrixVertex.cpp +++ b/knik/src/MatrixVertex.cpp @@ -308,7 +308,7 @@ unsigned int MatrixVertex::getLineIndex ( DbU::Unit y ) } assert(is_sorted(_linesIndexes.begin(), _linesIndexes.end())); - if ( _linesIndexes.empty() ); + if ( _linesIndexes.empty() ) throw Error ( "MatrixVertex::getLineIndex(): Indexes map is empty." ); pair result = equal_range (_linesIndexes.begin(), _linesIndexes.end() @@ -346,7 +346,7 @@ unsigned int MatrixVertex::getColumnIndex ( DbU::Unit x ) } assert(is_sorted(_columnsIndexes.begin(),_columnsIndexes.end())); - if ( _columnsIndexes.empty() ); + if ( _columnsIndexes.empty() ) throw Error ( "MatrixVertex::getColumnIndex(): Indexes map is empty." ); pair result = equal_range (_columnsIndexes.begin(), _columnsIndexes.end() diff --git a/knik/src/NetExtension.cpp b/knik/src/NetExtension.cpp index d0408c32..7c0b9aed 100644 --- a/knik/src/NetExtension.cpp +++ b/knik/src/NetExtension.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K n i k - Global Router | // | | @@ -17,32 +11,27 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Module : "./NetExtension.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "hurricane/Error.h" -#include "hurricane/Net.h" -#include "hurricane/Cell.h" +#include "hurricane/Error.h" +#include "hurricane/Net.h" +#include "hurricane/Cell.h" +#include "knik/NetExtension.h" -#include "knik/NetExtension.h" + +template<> +Hurricane::Name Hurricane::StandardPrivateProperty::_name = "Knik::NetExtension"; namespace Knik { - using Hurricane::Error; using Hurricane::ForEachIterator; const char* MissingNetExtension = "NetExtension::%s(): %s missing the Knik::Net extension."; - - template<> - Name StandardPrivateProperty::_name = "Knik::NetExtension"; - // ------------------------------------------------------------------- // Class : "Knik::NetExtensionDatas". diff --git a/knik/src/VEdge.cpp b/knik/src/VEdge.cpp index 013730f1..923c0d32 100644 --- a/knik/src/VEdge.cpp +++ b/knik/src/VEdge.cpp @@ -36,7 +36,7 @@ VEdge* VEdge::create ( Vertex* from, Vertex* to ) VEdge* vEdge = new VEdge ( from, to ); - vEdge->_postCreate(true); + vEdge->_postCreate(); return vEdge; } @@ -49,15 +49,15 @@ VEdge* VEdge::create ( Vertex* from, Vertex* to, unsigned capacity ) VEdge* vEdge = new VEdge ( from, to, capacity ); - vEdge->_postCreate(false); + vEdge->_postCreate(); return vEdge; } -void VEdge::_postCreate( bool fenceCapacity ) -// ****************************************** +void VEdge::_postCreate() +// ********************** { - Inherit::_postCreate ( fenceCapacity ); + Inherit::_postCreate (); } VEdge::~VEdge() diff --git a/knik/src/knik/Edge.h b/knik/src/knik/Edge.h index 7c813fcd..52931891 100644 --- a/knik/src/knik/Edge.h +++ b/knik/src/knik/Edge.h @@ -55,7 +55,7 @@ namespace Knik { public: //static Edge* create ( Fence* fence, Vertex* from, Vertex* to ); void destroy(); - void _postCreate ( bool capacity ); + void _postCreate(); void _preDestroy(); // Modifiers diff --git a/knik/src/knik/HEdge.h b/knik/src/knik/HEdge.h index 131993a2..34f2e039 100644 --- a/knik/src/knik/HEdge.h +++ b/knik/src/knik/HEdge.h @@ -23,7 +23,7 @@ namespace Knik { static HEdge* create ( Vertex* from, Vertex* to ); static HEdge* create ( Vertex* from, Vertex* to, unsigned capacity ); //void destroy(); - void _postCreate ( bool fenceCapacity ); + void _postCreate (); //void _preDestroy(); // Others diff --git a/knik/src/knik/SlicingTreeNode.h b/knik/src/knik/SlicingTreeNode.h index a6f78255..86ce9dea 100644 --- a/knik/src/knik/SlicingTreeNode.h +++ b/knik/src/knik/SlicingTreeNode.h @@ -44,7 +44,7 @@ namespace Knik { // Predicates // ********** public: - virtual bool isTerminal() { return false; }; + virtual bool isTerminal() const { return false; }; virtual bool isVertical() const = 0; virtual bool isHorizontal() const = 0; diff --git a/knik/src/knik/VEdge.h b/knik/src/knik/VEdge.h index b754cdf1..f180c212 100644 --- a/knik/src/knik/VEdge.h +++ b/knik/src/knik/VEdge.h @@ -23,7 +23,7 @@ namespace Knik { static VEdge* create ( Vertex* from, Vertex* to ); static VEdge* create ( Vertex* from, Vertex* to, unsigned capacity ); //void destroy(); - void _postCreate ( bool fenceCapacity ); + void _postCreate (); //void _preDestroy(); // Others diff --git a/mauka/src/MaukaEngine.cpp b/mauka/src/MaukaEngine.cpp index 8cb513cf..9d00deca 100644 --- a/mauka/src/MaukaEngine.cpp +++ b/mauka/src/MaukaEngine.cpp @@ -94,13 +94,13 @@ MaukaEngine* MaukaEngine::create(Cell* cell, Box placementbox) { MaukaEngine* mauka = new MaukaEngine(cell); - mauka->_postCreate(placementbox); + mauka->_maukaPostCreate(placementbox); return mauka; } -void MaukaEngine::_postCreate(Box& placementbox) -// ********************************************* +void MaukaEngine::_maukaPostCreate(Box& placementbox) +// ************************************************** { Inherit::_postCreate(); @@ -109,17 +109,11 @@ void MaukaEngine::_postCreate(Box& placementbox) addFeed ( AllianceFramework::get()->getCell("rowend_x0",Catalog::State::Views) ); Construct(); - //_simAnnealingPlacer = new SimAnnealingPlacer(this, 1, 0.0, 0.0); _simAnnealingPlacer = new SimAnnealingPlacer(this); - //_displaySlot = DisplaySlot::create(getCell(),,139,0,139); - _surface = Surface::create(this, placementbox); - - _simAnnealingPlacer->init(); - //Plot(); } @@ -162,22 +156,22 @@ void MaukaEngine::Run() } namespace { -void VerifyPathCellBox(const Occurrence& occurrence) -//On occurrence Path set all cells Abox to (0,0,0,0) if Box is empty -//This avoids bad Transfos on Path -{ - Path path = occurrence.getPath(); - while (!path.isEmpty()) - { - Instance* instance = path.getHeadInstance(); - Cell* model = instance->getMasterCell(); - if (model->getAbutmentBox().isEmpty()) - { - model->setAbutmentBox(Box(Point(0,0), Point(0,0))); - } - path = path.getTailPath(); - } -} +// void VerifyPathCellBox(const Occurrence& occurrence) +// //On occurrence Path set all cells Abox to (0,0,0,0) if Box is empty +// //This avoids bad Transfos on Path +// { +// Path path = occurrence.getPath(); +// while (!path.isEmpty()) +// { +// Instance* instance = path.getHeadInstance(); +// Cell* model = instance->getMasterCell(); +// if (model->getAbutmentBox().isEmpty()) +// { +// model->setAbutmentBox(Box(Point(0,0), Point(0,0))); +// } +// path = path.getTailPath(); +// } +// } } void MaukaEngine::Construct() diff --git a/mauka/src/Move.cpp b/mauka/src/Move.cpp index a26b37c0..deac1ac4 100644 --- a/mauka/src/Move.cpp +++ b/mauka/src/Move.cpp @@ -53,18 +53,18 @@ namespace { using Hurricane::DbU; -DbU::Unit PositionRand(const DbU::Unit position, const double distance, const DbU::Unit min, const DbU::Unit max) -{ - DbU::Unit borneInf, borneSup; +// DbU::Unit PositionRand(const DbU::Unit position, const double distance, const DbU::Unit min, const DbU::Unit max) +// { +// DbU::Unit borneInf, borneSup; - if ((borneSup = position + DbU::lambda((int)(distance * DbU::getLambda(max) + 0.5)) ) > max ) - borneSup = max; +// if ((borneSup = position + DbU::lambda((int)(distance * DbU::getLambda(max) + 0.5)) ) > max ) +// borneSup = max; - if ((borneInf = position - DbU::lambda((int)(distance * DbU::getLambda(max) + 0.5)) ) < min ) - borneInf = min; +// if ((borneInf = position - DbU::lambda((int)(distance * DbU::getLambda(max) + 0.5)) ) < min ) +// borneInf = min; - return borneInf + DbU::lambda((int)(DbU::getLambda(borneSup - borneInf) * rand() / (RAND_MAX+1.0))); -} +// return borneInf + DbU::lambda((int)(DbU::getLambda(borneSup - borneInf) * rand() / (RAND_MAX+1.0))); +// } } // End of anonymous namespace. diff --git a/mauka/src/SubRow.cpp b/mauka/src/SubRow.cpp index 6eb075c7..46e7d88c 100644 --- a/mauka/src/SubRow.cpp +++ b/mauka/src/SubRow.cpp @@ -56,11 +56,11 @@ SubRow::SubRow(Cell* cell, Surface* surface, const Box& box) SubRow* SubRow::create(Cell* cell, Surface* surface, const Box& box, bool orientation) { SubRow* subRow = new SubRow(cell, surface, box); - subRow->_postCreate(orientation); + subRow->_subRowPostCreate(orientation); return subRow; } - void SubRow::_postCreate(bool orientation) + void SubRow::_subRowPostCreate(bool orientation) { _row = _surface->InsertSubRowInRow(this, orientation); diff --git a/mauka/src/mauka/MaukaEngine.h b/mauka/src/mauka/MaukaEngine.h index 77dde454..4e2a4d87 100644 --- a/mauka/src/mauka/MaukaEngine.h +++ b/mauka/src/mauka/MaukaEngine.h @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2006-2014, All Rights Reserved +// Copyright (c) UPMC 2006-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -134,7 +134,7 @@ namespace Mauka { private: // Internals. MaukaEngine ( Cell* ); - void _postCreate ( Box& placementbox ); + void _maukaPostCreate ( Box& placementbox ); void _preDestroy (); inline Surface* _getSurface () const { return _surface; } Box PlotFixedPointsLabels ( std::ofstream& ) const; diff --git a/mauka/src/mauka/SubRow.h b/mauka/src/mauka/SubRow.h index 1966d668..5645aac5 100644 --- a/mauka/src/mauka/SubRow.h +++ b/mauka/src/mauka/SubRow.h @@ -100,7 +100,7 @@ class SubRow : public Container { private: void _computeCapacity(double margin); private: bool _MergeBins(); public: void DisplayBinHits() const; - protected: virtual void _postCreate(bool orientation); + protected: virtual void _subRowPostCreate(bool orientation); protected: virtual void _preDestroy(); public: double getBinCost() const; public: DbU::Unit getBinsSize() const; diff --git a/metis/src/MetisEngine.cpp b/metis/src/MetisEngine.cpp index 04962097..a5d12a65 100644 --- a/metis/src/MetisEngine.cpp +++ b/metis/src/MetisEngine.cpp @@ -64,8 +64,10 @@ namespace Metis { : Inherit (cell) , _configuration(new Configuration()) , _step (0) +#ifdef HAVE_HMETIS_LIB , _actualGraphs () , _newGraphs () +#endif , _globalEdgeCut(0) { #ifdef HAVE_HMETIS_LIB diff --git a/metis/src/metis/MetisEngine.h b/metis/src/metis/MetisEngine.h index e05efca7..9552ed4f 100644 --- a/metis/src/metis/MetisEngine.h +++ b/metis/src/metis/MetisEngine.h @@ -89,8 +89,10 @@ namespace Metis { static const Name _toolName; Configuration* _configuration; unsigned _step; +#ifdef HAVE_HMETIS_LIB MetisGraphs* _actualGraphs; MetisGraphs* _newGraphs; +#endif int _globalEdgeCut; private: // Internals. diff --git a/nimbus/src/FenceProperty.cpp b/nimbus/src/FenceProperty.cpp index 070ad6bd..e04892f9 100644 --- a/nimbus/src/FenceProperty.cpp +++ b/nimbus/src/FenceProperty.cpp @@ -12,10 +12,10 @@ #include "nimbus/FenceProperty.h" #include "nimbus/Fence.h" -namespace Nimbus { +template<> +Hurricane::Name Hurricane::StandardPrivateProperty::_name = "ComponentFencePropName"; - template<> - Name StandardPrivateProperty::_name = "ComponentFencePropName"; +namespace Nimbus { Fence* getFence ( const Component& component ) diff --git a/nimbus/src/GCell.cpp b/nimbus/src/GCell.cpp index 4ef347c3..c17e71a5 100644 --- a/nimbus/src/GCell.cpp +++ b/nimbus/src/GCell.cpp @@ -768,7 +768,9 @@ GCell* GCell::getSubUpperLeft () const assert (col != _pavement.end()); RBMap::const_reverse_iterator rbit = ((*col).second)->rbegin(); +#ifndef NDEBUG RBMap::const_reverse_iterator rbend = ((*col).second)->rend(); +#endif assert (rbit != rbend); return (*rbit).second; @@ -783,7 +785,9 @@ GCell* GCell::getSubUpperRight () const assert (col != _pavement.rend()); RBMap::const_reverse_iterator rbit = ((*col).second)->rbegin(); +#ifndef NDEBUG RBMap::const_reverse_iterator rbend = ((*col).second)->rend(); +#endif assert (rbit != rbend); return (*rbit).second; diff --git a/nimbus/src/Grid.cpp b/nimbus/src/Grid.cpp index 055b5b49..f43660ba 100644 --- a/nimbus/src/Grid.cpp +++ b/nimbus/src/Grid.cpp @@ -9,6 +9,7 @@ #include +#include "hurricane/Box.h" #include "hurricane/DataBase.h" #include "hurricane/Technology.h" #include "hurricane/UpdateSession.h" diff --git a/nimbus/src/StepProperty.cpp b/nimbus/src/StepProperty.cpp index ba4b95c3..1a5dc4e9 100644 --- a/nimbus/src/StepProperty.cpp +++ b/nimbus/src/StepProperty.cpp @@ -46,9 +46,13 @@ namespace Nimbus { typedef StandardPrivateProperty InstanceProperty; - template<> - Name InstanceProperty::_name = "Nimbus::InstanceProperty"; +} +template<> +Hurricane::Name Nimbus::InstanceProperty::_name = "Nimbus::InstanceProperty"; + + +namespace Nimbus { unsigned getStep(const Instance& instance) { diff --git a/unicorn/src/UnicornGui.cpp b/unicorn/src/UnicornGui.cpp index 8d1cc86b..e2343a89 100644 --- a/unicorn/src/UnicornGui.cpp +++ b/unicorn/src/UnicornGui.cpp @@ -21,6 +21,7 @@ #include "hurricane/viewer/Script.h" #include "hurricane/viewer/CellViewer.h" #include "hurricane/viewer/PyCellViewer.h" +#include "crlcore/Utilities.h" #include "crlcore/Catalog.h" #include "crlcore/AllianceFramework.h" #include "crlcore/GraphicToolEngine.h" diff --git a/unicorn/src/unicorn/UnicornGui.h b/unicorn/src/unicorn/UnicornGui.h index 58d71f32..949734a4 100644 --- a/unicorn/src/unicorn/UnicornGui.h +++ b/unicorn/src/unicorn/UnicornGui.h @@ -1,7 +1,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved +// Copyright (c) UPMC 2008-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -24,7 +24,6 @@ using namespace std; #include "hurricane/viewer/CellViewer.h" - #include "crlcore/Banner.h" namespace CRL { class GraphicTool; diff --git a/vlsisapd/src/agds/src/Library.cpp b/vlsisapd/src/agds/src/Library.cpp index c6a42c7c..8bd8ca64 100644 --- a/vlsisapd/src/agds/src/Library.cpp +++ b/vlsisapd/src/agds/src/Library.cpp @@ -29,7 +29,7 @@ bool Library::writeToFile(string filename) { tm now = *localtime(&curtime); char date[BUFSIZ]={0}; const char format[]="%y-%m-%d %H:%M:%S"; - if (!strftime(date, sizeof(date)-1, format, &now)>0) + if (strftime(date, sizeof(date)-1, format, &now) == 0) cerr << "[GDS DRIVE ERROR]: cannot build current date." << endl; ofstream file; diff --git a/vlsisapd/src/agds/src/PyAgds.cpp b/vlsisapd/src/agds/src/PyAgds.cpp index b229f1f7..4342692c 100644 --- a/vlsisapd/src/agds/src/PyAgds.cpp +++ b/vlsisapd/src/agds/src/PyAgds.cpp @@ -1,4 +1,3 @@ -using namespace std; #include using namespace boost::python; @@ -7,6 +6,7 @@ using namespace boost::python; #include "vlsisapd/agds/Structure.h" #include "vlsisapd/agds/Element.h" #include "vlsisapd/agds/Rectangle.h" +using namespace std; namespace AGDS { BOOST_PYTHON_MODULE(AGDS) { diff --git a/vlsisapd/src/agds/src/Structure.cpp b/vlsisapd/src/agds/src/Structure.cpp index ae61b556..81c484b9 100644 --- a/vlsisapd/src/agds/src/Structure.cpp +++ b/vlsisapd/src/agds/src/Structure.cpp @@ -25,7 +25,7 @@ bool Structure::write(ofstream &file) { tm now = *localtime(&curtime); char date[BUFSIZ]={0}; const char format[]="%y-%m-%d %H:%M:%S"; - if (!strftime(date, sizeof(date)-1, format, &now)>0) + if (strftime(date, sizeof(date)-1, format, &now) == 0) cerr << "[GDS DRIVE ERROR]: cannot build current date." << endl; // Header diff --git a/vlsisapd/src/bookshelf/src/BookshelfTkMain.cpp b/vlsisapd/src/bookshelf/src/BookshelfTkMain.cpp index ea874152..51963048 100644 --- a/vlsisapd/src/bookshelf/src/BookshelfTkMain.cpp +++ b/vlsisapd/src/bookshelf/src/BookshelfTkMain.cpp @@ -57,7 +57,7 @@ void doFindMegaCells ( Circuit* circuit ) Node* node = (*inode).second; map& pins = node->getPins(); - map::iterator ipin = pins.begin(); + //map::iterator ipin = pins.begin(); if ( (double)pins.size() > node->getWidth() ) { cout << setw(4) << right << megacellsNb << ":megacell:" << node->getName() diff --git a/vlsisapd/src/cif/src/Circuit.cpp b/vlsisapd/src/cif/src/Circuit.cpp index ddb6f165..11a67e7f 100644 --- a/vlsisapd/src/cif/src/Circuit.cpp +++ b/vlsisapd/src/cif/src/Circuit.cpp @@ -25,7 +25,7 @@ bool Circuit::writeToFile(string filename) { tm now = *localtime(&curtime); char date[BUFSIZ]={0}; const char format[]="%d-%b-%Y %H:%M:%S"; - if (!strftime(date, sizeof(date)-1, format, &now)>0) + if (strftime(date, sizeof(date)-1, format, &now) == 0) cerr << "[CIF DRIVE ERROR]: cannot build current date." << endl; ofstream file; diff --git a/vlsisapd/src/cif/src/PyCif.cpp b/vlsisapd/src/cif/src/PyCif.cpp index 82d07397..9f5f122e 100644 --- a/vlsisapd/src/cif/src/PyCif.cpp +++ b/vlsisapd/src/cif/src/PyCif.cpp @@ -1,10 +1,10 @@ -using namespace std; #include using namespace boost::python; #include "vlsisapd/cif/Polygon.h" #include "vlsisapd/cif/Circuit.h" +using namespace std; namespace CIF { BOOST_PYTHON_MODULE(CIF) { diff --git a/vlsisapd/src/cif/src/vlsisapd/cif/Circuit.h b/vlsisapd/src/cif/src/vlsisapd/cif/Circuit.h index 3d3d0173..b4ba9621 100644 --- a/vlsisapd/src/cif/src/vlsisapd/cif/Circuit.h +++ b/vlsisapd/src/cif/src/vlsisapd/cif/Circuit.h @@ -2,6 +2,7 @@ #define __CIF_CIRCUIT_H #include +#include namespace CIF { class Polygon; @@ -13,8 +14,8 @@ class Circuit { bool writeToFile ( std::string ); private: - string _name; - string _unit; + std::string _name; + std::string _unit; double _scale; std::vector _polygons; diff --git a/vlsisapd/src/cif/src/vlsisapd/cif/Polygon.h b/vlsisapd/src/cif/src/vlsisapd/cif/Polygon.h index 08cf7af6..2353c0f3 100644 --- a/vlsisapd/src/cif/src/vlsisapd/cif/Polygon.h +++ b/vlsisapd/src/cif/src/vlsisapd/cif/Polygon.h @@ -10,7 +10,7 @@ class Polygon { Polygon(long); void addPoint (long, long); - void write ( ofstream& ); + void write ( std::ofstream& ); private: long _layer; diff --git a/vlsisapd/src/dtr/src/PyDtr.cpp b/vlsisapd/src/dtr/src/PyDtr.cpp index db02a084..02ab0ff5 100644 --- a/vlsisapd/src/dtr/src/PyDtr.cpp +++ b/vlsisapd/src/dtr/src/PyDtr.cpp @@ -1,5 +1,4 @@ -using namespace std; #include using namespace boost::python; @@ -7,6 +6,7 @@ using namespace boost::python; #include "vlsisapd/dtr/Techno.h" #include "vlsisapd/dtr/Rules.h" #include "vlsisapd/dtr/DTRException.h" +using namespace std; namespace DTR { diff --git a/vlsisapd/src/liberty/src/Library.cpp b/vlsisapd/src/liberty/src/Library.cpp index 05dde80b..28a93e0c 100644 --- a/vlsisapd/src/liberty/src/Library.cpp +++ b/vlsisapd/src/liberty/src/Library.cpp @@ -244,7 +244,7 @@ bool Library::writeToFile(string filename) { tm now = *localtime(&curtime); char date[BUFSIZ]={0}; const char format[]="%y-%m-%d %H:%M:%S"; - if (!strftime(date, sizeof(date)-1, format, &now)>0) + if (strftime(date, sizeof(date)-1, format, &now) == 0) cerr << "[Liberty DRIVE ERROR]: cannot build current date." << endl; ofstream file; diff --git a/vlsisapd/src/liberty/src/Name.cpp b/vlsisapd/src/liberty/src/Name.cpp index 09a2977b..c0741035 100644 --- a/vlsisapd/src/liberty/src/Name.cpp +++ b/vlsisapd/src/liberty/src/Name.cpp @@ -1,6 +1,6 @@ -using namespace std; #include "vlsisapd/liberty/Name.h" +using namespace std; namespace LIB { unsigned long Name::_globalId = 0; diff --git a/vlsisapd/src/liberty/src/PyLiberty.cpp b/vlsisapd/src/liberty/src/PyLiberty.cpp index 86c36d87..b8837eca 100644 --- a/vlsisapd/src/liberty/src/PyLiberty.cpp +++ b/vlsisapd/src/liberty/src/PyLiberty.cpp @@ -1,4 +1,3 @@ -using namespace std; #include #include @@ -14,8 +13,8 @@ using namespace boost::python; #include "vlsisapd/liberty/Timing.h" #include "vlsisapd/liberty/FlipFlop.h" #include "vlsisapd/liberty/Library.h" - #include "vlsisapd/liberty/PySTLMapWrapper.h" +using namespace std; namespace LIB { //void translator(LibertyException const& e) { diff --git a/vlsisapd/src/openChams/src/PyOpenChams.cpp b/vlsisapd/src/openChams/src/PyOpenChams.cpp index 04fd1bdd..aaa8462c 100644 --- a/vlsisapd/src/openChams/src/PyOpenChams.cpp +++ b/vlsisapd/src/openChams/src/PyOpenChams.cpp @@ -1,4 +1,3 @@ -using namespace std; #include #include @@ -20,8 +19,8 @@ using namespace boost::python; #include "vlsisapd/openChams/Port.h" #include "vlsisapd/openChams/Wire.h" #include "vlsisapd/openChams/OpenChamsException.h" - #include "vlsisapd/openChams/PySTLMapWrapper.h" +using namespace std; namespace OpenChams { diff --git a/vlsisapd/src/openChams/src/Schematic.cpp b/vlsisapd/src/openChams/src/Schematic.cpp index 63ddb6c2..b5c2f0a3 100644 --- a/vlsisapd/src/openChams/src/Schematic.cpp +++ b/vlsisapd/src/openChams/src/Schematic.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the VLSI SAPD Software. -// Copyright (c) UPMC/LIP6 2010-2012, All Rights Reserved +// Copyright (c) UPMC 2010-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | V L S I S A P D | diff --git a/vlsisapd/src/openChams/src/SimulModel.cpp b/vlsisapd/src/openChams/src/SimulModel.cpp index 0f97d9bf..2eca20b9 100644 --- a/vlsisapd/src/openChams/src/SimulModel.cpp +++ b/vlsisapd/src/openChams/src/SimulModel.cpp @@ -7,7 +7,6 @@ * */ -using namespace std; #include "vlsisapd/openChams/SimulModel.h" diff --git a/vlsisapd/src/openChams/src/vlsisapd/openChams/Schematic.h b/vlsisapd/src/openChams/src/vlsisapd/openChams/Schematic.h index 915d120f..89b80920 100644 --- a/vlsisapd/src/openChams/src/vlsisapd/openChams/Schematic.h +++ b/vlsisapd/src/openChams/src/vlsisapd/openChams/Schematic.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the VLSI SAPD Software. -// Copyright (c) UPMC/LIP6 2010-2012, All Rights Reserved +// Copyright (c) UPMC 2010-2014, All Rights Reserved // // +-----------------------------------------------------------------+ // | V L S I S A P D | @@ -15,8 +15,8 @@ // +-----------------------------------------------------------------+ -#ifndef __OPENCHAMS_SCHEMATIC_H__ -#define __OPENCHAMS_SCHEMATIC_H__ +#ifndef VLSISAPD_OPENCHAMS_SCHEMATIC_H +#define VLSISAPD_OPENCHAMS_SCHEMATIC_H #include #include diff --git a/vlsisapd/src/spice/src/PySpice.cpp b/vlsisapd/src/spice/src/PySpice.cpp index 5afb3dcd..0221a417 100644 --- a/vlsisapd/src/spice/src/PySpice.cpp +++ b/vlsisapd/src/spice/src/PySpice.cpp @@ -1,4 +1,3 @@ -using namespace std; #include #include @@ -9,8 +8,8 @@ using namespace boost::python; #include "vlsisapd/spice/Subckt.h" #include "vlsisapd/spice/Circuit.h" #include "vlsisapd/spice/SpiceException.h" - #include "vlsisapd/spice/PySTLMapWrapper.h" +using namespace std; namespace SPICE { void translator(SpiceException const& e) { diff --git a/vlsisapd/src/spice/src/vlsisapd/spice/Circuit.h b/vlsisapd/src/spice/src/vlsisapd/spice/Circuit.h index 5c956631..5c903985 100644 --- a/vlsisapd/src/spice/src/vlsisapd/spice/Circuit.h +++ b/vlsisapd/src/spice/src/vlsisapd/spice/Circuit.h @@ -43,7 +43,6 @@ class Circuit { typedef std::vector string_vector; typedef std::map strings_map; private: - unsigned _line; std::string _title; string_vector _includes; strpair_vector _libraries; @@ -54,7 +53,7 @@ class Circuit { std::vector _sources; public: - Circuit(): _line(0), _title(""), _includes(), _libraries(), _options(), _parameters(), _subckts(), _instances() {}; + Circuit(): _title(""), _includes(), _libraries(), _options(), _parameters(), _subckts(), _instances() {}; ~Circuit() {}; inline std::string getTitle(); diff --git a/vlsisapd/src/utilities/src/Path.cpp b/vlsisapd/src/utilities/src/Path.cpp index b283bd1b..32b774fc 100644 --- a/vlsisapd/src/utilities/src/Path.cpp +++ b/vlsisapd/src/utilities/src/Path.cpp @@ -243,7 +243,7 @@ namespace Utilities { Path& Path::operator= ( const Path& other ) { - _elements.swap( vector() ); + vector().swap( _elements ); _elements = other._elements; _flags = other._flags; _pathcache = other._pathcache;