diff options
Diffstat (limited to 'src/aig/gia/giaIf.c')
-rw-r--r-- | src/aig/gia/giaIf.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index 9958a63c..c11fa841 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -25,6 +25,10 @@ #include "base/main/main.h" #include "sat/bsat/satSolver.h" +#ifdef WIN32 +#include <windows.h> +#endif + ABC_NAMESPACE_IMPL_START @@ -325,14 +329,34 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile ) Gia_ManForEachCo( p, pObj, i ) Ave += pLevels[Gia_ObjFaninId0p(p, pObj)]; ABC_FREE( pLevels ); + +#ifdef WIN32 + { + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); Abc_Print( 1, "Mapping (K=%d) : ", nLutSize ); - Abc_Print( 1, "lut =%7d ", nLuts ); + SetConsoleTextAttribute( hConsole, 14 ); // yellow + Abc_Print( 1, "lut =%7d ", nLuts ); + SetConsoleTextAttribute( hConsole, 10 ); // green Abc_Print( 1, "edge =%8d ", nFanins ); - Abc_Print( 1, "lev =%5d ", LevelMax ); - Abc_Print( 1, "(%.2f) ", (float)Ave / Gia_ManCoNum(p) ); + SetConsoleTextAttribute( hConsole, 11 ); // blue + Abc_Print( 1, "lev =%5d ", LevelMax ); + Abc_Print( 1, "(%.2f) ", (float)Ave / Gia_ManCoNum(p) ); + SetConsoleTextAttribute( hConsole, 7 ); // normal Abc_Print( 1, "over =%5.1f %% ", 100.0 * Gia_ManComputeOverlap(p) / Gia_ManAndNum(p) ); Abc_Print( 1, "mem =%5.2f MB", 4.0*(Gia_ManObjNum(p) + 2*nLuts + nFanins)/(1<<20) ); Abc_Print( 1, "\n" ); + } +#else + Abc_Print( 1, "Mapping (K=%d) : ", nLutSize ); + Abc_Print( 1, "%slut =%7d%s ", "\033[1;33m", nLuts, "\033[0m" ); // yellow + Abc_Print( 1, "%sedge =%8d%s ", "\033[1;32m", nFanins, "\033[0m" ); // green + Abc_Print( 1, "%slev =%5d%s ", "\033[1;36m", LevelMax, "\033[0m" ); // blue + Abc_Print( 1, "%s(%.2f)%s ", "\033[1;36m", (float)Ave / Gia_ManCoNum(p), "\033[0m" ); + Abc_Print( 1, "over =%5.1f %% ", 100.0 * Gia_ManComputeOverlap(p) / Gia_ManAndNum(p) ); + Abc_Print( 1, "mem =%5.2f MB", 4.0*(Gia_ManObjNum(p) + 2*nLuts + nFanins)/(1<<20) ); + Abc_Print( 1, "\n" ); +#endif + if ( pDumpFile ) { |