summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifDec16.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/if/ifDec16.c')
-rw-r--r--src/map/if/ifDec16.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/map/if/ifDec16.c b/src/map/if/ifDec16.c
index 372473a7..ce59a946 100644
--- a/src/map/if/ifDec16.c
+++ b/src/map/if/ifDec16.c
@@ -1760,6 +1760,31 @@ static inline word Abc_Tt6Cofactor1( word t, int iVar )
assert( iVar >= 0 && iVar < 6 );
return (t & Truth6[iVar]) | ((t & Truth6[iVar]) >> (1<<iVar));
}
+int If_CluCheckDecInAny( word t, int nVars )
+{
+ int v, u, Cof2[2], Cof4[4];
+ for ( v = 0; v < nVars; v++ )
+ {
+ Cof2[0] = Abc_Tt6Cofactor0( t, v );
+ Cof2[1] = Abc_Tt6Cofactor1( t, v );
+ for ( u = v+1; u < nVars; u++ )
+ {
+ Cof4[0] = Abc_Tt6Cofactor0( Cof2[0], u );
+ Cof4[1] = Abc_Tt6Cofactor1( Cof2[0], u );
+ Cof4[2] = Abc_Tt6Cofactor0( Cof2[1], u );
+ Cof4[3] = Abc_Tt6Cofactor1( Cof2[1], u );
+ if ( Cof4[0] == Cof4[1] && Cof4[0] == Cof4[2] )
+ return 1;
+ if ( Cof4[0] == Cof4[2] && Cof4[0] == Cof4[3] )
+ return 1;
+ if ( Cof4[0] == Cof4[1] && Cof4[0] == Cof4[3] )
+ return 1;
+ if ( Cof4[1] == Cof4[2] && Cof4[1] == Cof4[3] )
+ return 1;
+ }
+ }
+ return 0;
+}
int If_CluCheckDecIn( word t, int nVars )
{
int v, u, Cof2[2], Cof4[4];