diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-02-18 14:20:10 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-02-18 14:20:10 -0800 |
commit | 429f52ce15d1c10e71d98d8c1388b93809a425e1 (patch) | |
tree | 9c9a388ba80ec97abbc2afcfb1c966e50cccfbc7 /src/misc/util/utilTruth.h | |
parent | bc010af4be920199d7f1e0bfe4a6d70dcbca042b (diff) | |
download | abc-429f52ce15d1c10e71d98d8c1388b93809a425e1.tar.gz abc-429f52ce15d1c10e71d98d8c1388b93809a425e1.tar.bz2 abc-429f52ce15d1c10e71d98d8c1388b93809a425e1.zip |
Experiments with SAT sweeping.
Diffstat (limited to 'src/misc/util/utilTruth.h')
-rw-r--r-- | src/misc/util/utilTruth.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h index d77ed64d..e04ffbc9 100644 --- a/src/misc/util/utilTruth.h +++ b/src/misc/util/utilTruth.h @@ -1631,6 +1631,14 @@ static inline int Abc_TtFindFirstBit( word * pIn, int nVars ) return 64*w + Abc_Tt6FirstBit(pIn[w]); return -1; } +static inline int Abc_TtFindFirstBit2( word * pIn, int nWords ) +{ + int w; + for ( w = 0; w < nWords; w++ ) + if ( pIn[w] ) + return 64*w + Abc_Tt6FirstBit(pIn[w]); + return -1; +} static inline int Abc_TtFindFirstDiffBit( word * pIn1, word * pIn2, int nVars ) { int w, nWords = Abc_TtWordNum(nVars); @@ -1639,6 +1647,14 @@ static inline int Abc_TtFindFirstDiffBit( word * pIn1, word * pIn2, int nVars ) return 64*w + Abc_Tt6FirstBit(pIn1[w] ^ pIn2[w]); return -1; } +static inline int Abc_TtFindFirstDiffBit2( word * pIn1, word * pIn2, int nWords ) +{ + int w; + for ( w = 0; w < nWords; w++ ) + if ( pIn1[w] ^ pIn2[w] ) + return 64*w + Abc_Tt6FirstBit(pIn1[w] ^ pIn2[w]); + return -1; +} static inline int Abc_TtFindFirstZero( word * pIn, int nVars ) { int w, nWords = Abc_TtWordNum(nVars); |