summaryrefslogtreecommitdiffstats
path: root/src/bool/kit
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-09-06 15:32:07 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-09-06 15:32:07 -0700
commit9c8be56ccd76eecf43f59fe26fef3d8978213ed8 (patch)
tree63b8805a84199cd28eee7da1a0a9d47edfff35bc /src/bool/kit
parent4393a5fade106b91ed9e3c32016a5773b5063c6b (diff)
downloadabc-9c8be56ccd76eecf43f59fe26fef3d8978213ed8.tar.gz
abc-9c8be56ccd76eecf43f59fe26fef3d8978213ed8.tar.bz2
abc-9c8be56ccd76eecf43f59fe26fef3d8978213ed8.zip
Integrated new fast semi-canonical form for Boolean functions up to 16 inputs.
Diffstat (limited to 'src/bool/kit')
-rw-r--r--src/bool/kit/kit.h8
-rw-r--r--src/bool/kit/kitTruth.c18
2 files changed, 13 insertions, 13 deletions
diff --git a/src/bool/kit/kit.h b/src/bool/kit/kit.h
index 8151f1d2..5ecb5581 100644
--- a/src/bool/kit/kit.h
+++ b/src/bool/kit/kit.h
@@ -623,11 +623,11 @@ extern int Kit_TruthVarsSymm( unsigned * pTruth, int nVars, int iVar
extern int Kit_TruthVarsAntiSymm( unsigned * pTruth, int nVars, int iVar0, int iVar1, unsigned * pCof0, unsigned * pCof1 );
extern int Kit_TruthMinCofSuppOverlap( unsigned * pTruth, int nVars, int * pVarMin );
extern int Kit_TruthBestCofVar( unsigned * pTruth, int nVars, unsigned * pCof0, unsigned * pCof1 );
-extern void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, short * pStore );
-extern void Kit_TruthCountOnesInCofs0( unsigned * pTruth, int nVars, short * pStore );
-extern void Kit_TruthCountOnesInCofsSlow( unsigned * pTruth, int nVars, short * pStore, unsigned * pAux );
+extern void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, int * pStore );
+extern void Kit_TruthCountOnesInCofs0( unsigned * pTruth, int nVars, int * pStore );
+extern void Kit_TruthCountOnesInCofsSlow( unsigned * pTruth, int nVars, int * pStore, unsigned * pAux );
extern unsigned Kit_TruthHash( unsigned * pIn, int nWords );
-extern unsigned Kit_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux, int nVars, char * pCanonPerm, short * pStore );
+extern unsigned Kit_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux, int nVars, char * pCanonPerm );
extern char * Kit_TruthDumpToFile( unsigned * pTruth, int nVars, int nFile );
extern void Kit_TruthPrintProfile( unsigned * pTruth, int nVars );
diff --git a/src/bool/kit/kitTruth.c b/src/bool/kit/kitTruth.c
index 258207c2..a6951163 100644
--- a/src/bool/kit/kitTruth.c
+++ b/src/bool/kit/kitTruth.c
@@ -1397,7 +1397,7 @@ int Kit_TruthBestCofVar( unsigned * pTruth, int nVars, unsigned * pCof0, unsigne
Synopsis [Counts the number of 1's in each cofactor.]
- Description [The resulting numbers are stored in the array of shorts,
+ Description [The resulting numbers are stored in the array of ints,
whose length is 2*nVars. The number of 1's is counted in a different
space than the original function. For example, if the function depends
on k variables, the cofactors are assumed to depend on k-1 variables.]
@@ -1407,11 +1407,11 @@ int Kit_TruthBestCofVar( unsigned * pTruth, int nVars, unsigned * pCof0, unsigne
SeeAlso []
***********************************************************************/
-void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, short * pStore )
+void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, int * pStore )
{
int nWords = Kit_TruthWordNum( nVars );
int i, k, Counter;
- memset( pStore, 0, sizeof(short) * 2 * nVars );
+ memset( pStore, 0, sizeof(int) * 2 * nVars );
if ( nVars <= 5 )
{
if ( nVars > 0 )
@@ -1473,7 +1473,7 @@ void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, short * pStore )
Synopsis [Counts the number of 1's in each negative cofactor.]
- Description [The resulting numbers are stored in the array of shorts,
+ Description [The resulting numbers are stored in the array of ints,
whose length is nVars. The number of 1's is counted in a different
space than the original function. For example, if the function depends
on k variables, the cofactors are assumed to depend on k-1 variables.]
@@ -1483,11 +1483,11 @@ void Kit_TruthCountOnesInCofs( unsigned * pTruth, int nVars, short * pStore )
SeeAlso []
***********************************************************************/
-void Kit_TruthCountOnesInCofs0( unsigned * pTruth, int nVars, short * pStore )
+void Kit_TruthCountOnesInCofs0( unsigned * pTruth, int nVars, int * pStore )
{
int nWords = Kit_TruthWordNum( nVars );
int i, k, Counter;
- memset( pStore, 0, sizeof(short) * nVars );
+ memset( pStore, 0, sizeof(int) * nVars );
if ( nVars <= 5 )
{
if ( nVars > 0 )
@@ -1534,7 +1534,7 @@ void Kit_TruthCountOnesInCofs0( unsigned * pTruth, int nVars, short * pStore )
SeeAlso []
***********************************************************************/
-void Kit_TruthCountOnesInCofsSlow( unsigned * pTruth, int nVars, short * pStore, unsigned * pAux )
+void Kit_TruthCountOnesInCofsSlow( unsigned * pTruth, int nVars, int * pStore, unsigned * pAux )
{
int i;
for ( i = 0; i < nVars; i++ )
@@ -1654,9 +1654,9 @@ unsigned Kit_TruthHash( unsigned * pIn, int nWords )
SeeAlso []
***********************************************************************/
-unsigned Kit_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux, int nVars, char * pCanonPerm, short * pStore )
+unsigned Kit_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux, int nVars, char * pCanonPerm )
{
-// short pStore2[32];
+ int pStore[32];
unsigned * pIn = pInOut, * pOut = pAux, * pTemp;
int nWords = Kit_TruthWordNum( nVars );
int i, Temp, fChange, Counter, nOnes;//, k, j, w, Limit;