summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-02-25 08:03:12 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-02-25 08:03:12 -0800
commit15a1c4b96507b524959d171a26b796d6263ea284 (patch)
treeb61cda95791214e0113507f2f076509611be98dd
parent59bf6945e2481afd8b16fd8c7075bc349d1fbb68 (diff)
downloadabc-15a1c4b96507b524959d171a26b796d6263ea284.tar.gz
abc-15a1c4b96507b524959d171a26b796d6263ea284.tar.bz2
abc-15a1c4b96507b524959d171a26b796d6263ea284.zip
g++ compiler errors.
-rw-r--r--src/map/if/ifDsd.c8
-rw-r--r--src/opt/dau/dau.h3
-rw-r--r--src/opt/dau/dauDsd.c10
-rw-r--r--src/opt/dau/dauNonDsd.c2
4 files changed, 15 insertions, 8 deletions
diff --git a/src/map/if/ifDsd.c b/src/map/if/ifDsd.c
index 90874b87..f387e645 100644
--- a/src/map/if/ifDsd.c
+++ b/src/map/if/ifDsd.c
@@ -105,8 +105,6 @@ static inline If_DsdObj_t * If_DsdObjFanin( Vec_Ptr_t * p, If_DsdObj_t * pObj, i
#define If_DsdObjForEachFaninLit( vVec, pObj, iLit, i ) \
for ( i = 0; (i < If_DsdObjFaninNum(pObj)) && ((iLit) = If_DsdObjFaninLit(pObj, i)); i++ )
-extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars );
-
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
@@ -404,7 +402,7 @@ void If_DsdManDump( If_DsdMan_t * p )
Abc_TtPrintHexRev( pFile, If_DsdObjTruth(p, pObj), p->nVars );
fprintf( pFile, "\n" );
printf( " " );
- Kit_DsdPrintFromTruth( (unsigned *)If_DsdObjTruth(p, pObj), p->nVars );
+ Dau_DsdPrintFromTruth( If_DsdObjTruth(p, pObj), p->nVars );
printf( "\n" );
}
fclose( pFile );
@@ -899,8 +897,8 @@ int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char
// If_DsdManPrint( p, NULL );
printf( "\n" );
printf( "Verification failed!\n" );
- Kit_DsdPrintFromTruth( (unsigned *)pTruth, nLeaves ); printf( "\n" );
- Kit_DsdPrintFromTruth( (unsigned *)pRes, nLeaves ); printf( "\n" );
+ Dau_DsdPrintFromTruth( pTruth, nLeaves ); printf( "\n" );
+ Dau_DsdPrintFromTruth( pRes, nLeaves ); printf( "\n" );
If_DsdManPrintOne( stdout, p, Abc_Lit2Var(iDsd), pPerm );
printf( "\n" );
}
diff --git a/src/opt/dau/dau.h b/src/opt/dau/dau.h
index cf2beb97..dab49bc3 100644
--- a/src/opt/dau/dau.h
+++ b/src/opt/dau/dau.h
@@ -80,7 +80,8 @@ extern unsigned Abc_TtCanonicizePhase( word * pTruth, int nVars );
/*=== dauDsd.c ==========================================================*/
extern int * Dau_DsdComputeMatches( char * p );
extern int Dau_DsdDecompose( word * pTruth, int nVarsInit, int fSplitPrime, int fWriteTruth, char * pRes );
-extern void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit );
+extern void Dau_DsdPrintFromTruthFile( FILE * pFile, word * pTruth, int nVarsInit );
+extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit );
extern word * Dau_DsdToTruth( char * p, int nVars );
extern word Dau_Dsd6ToTruth( char * p );
extern void Dau_DsdNormalize( char * p );
diff --git a/src/opt/dau/dauDsd.c b/src/opt/dau/dauDsd.c
index 7ffe63be..e5d83d0c 100644
--- a/src/opt/dau/dauDsd.c
+++ b/src/opt/dau/dauDsd.c
@@ -1897,7 +1897,7 @@ int Dau_DsdDecompose( word * pTruth, int nVarsInit, int fSplitPrime, int fWriteT
// assert( p->nSizeNonDec == 0 );
return p->nSizeNonDec;
}
-void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit )
+void Dau_DsdPrintFromTruthFile( FILE * pFile, word * pTruth, int nVarsInit )
{
char pRes[DAU_MAX_STR];
word pTemp[DAU_MAX_WORD];
@@ -1905,6 +1905,14 @@ void Dau_DsdPrintFromTruth( FILE * pFile, word * pTruth, int nVarsInit )
Dau_DsdDecompose( pTemp, nVarsInit, 0, 1, pRes );
fprintf( pFile, "%s\n", pRes );
}
+void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit )
+{
+ char pRes[DAU_MAX_STR];
+ word pTemp[DAU_MAX_WORD];
+ Abc_TtCopy( pTemp, pTruth, Abc_TtWordNum(nVarsInit), 0 );
+ Dau_DsdDecompose( pTemp, nVarsInit, 0, 1, pRes );
+ fprintf( stdout, "%s\n", pRes );
+}
void Dau_DsdTest44()
{
diff --git a/src/opt/dau/dauNonDsd.c b/src/opt/dau/dauNonDsd.c
index a6410ebc..e5cc58e1 100644
--- a/src/opt/dau/dauNonDsd.c
+++ b/src/opt/dau/dauNonDsd.c
@@ -828,7 +828,7 @@ void Dau_DecTrySets( word * pInit, int nVars )
assert( nVars <= 16 );
memcpy( p, pInit, sizeof(word) * Abc_TtWordNum(nVars) );
vSets = Dau_DecFindSets( p, nVars );
- Dau_DsdPrintFromTruth( stdout, p, nVars );
+ Dau_DsdPrintFromTruth( p, nVars );
printf( "This %d-variable function has %d decomposable variable sets:\n", nVars, Vec_IntSize(vSets) );
Vec_IntForEachEntry( vSets, Entry, i )
{