diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-06 15:40:47 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-09-06 15:40:47 -0700 |
commit | 7a6cf9f48c924548c601a3caf63c68db3cbc346b (patch) | |
tree | 4b8809d191e607a62a6e4a6c93a40c2499fad5c4 /src/bool/lucky/luckyInt.h | |
parent | 9c8be56ccd76eecf43f59fe26fef3d8978213ed8 (diff) | |
download | abc-7a6cf9f48c924548c601a3caf63c68db3cbc346b.tar.gz abc-7a6cf9f48c924548c601a3caf63c68db3cbc346b.tar.bz2 abc-7a6cf9f48c924548c601a3caf63c68db3cbc346b.zip |
Integrated new fast semi-canonical form for Boolean functions up to 16 inputs.
Diffstat (limited to 'src/bool/lucky/luckyInt.h')
-rw-r--r-- | src/bool/lucky/luckyInt.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/bool/lucky/luckyInt.h b/src/bool/lucky/luckyInt.h index 02dc690d..0e5de5c3 100644 --- a/src/bool/lucky/luckyInt.h +++ b/src/bool/lucky/luckyInt.h @@ -82,7 +82,6 @@ typedef struct }permInfo; - static inline void TimePrint( char* Message ) { static int timeBegin; @@ -92,25 +91,19 @@ static inline void TimePrint( char* Message ) timeBegin = clock(); } -static word SFmask[5][4] = { - {0x8888888888888888,0x4444444444444444,0x2222222222222222,0x1111111111111111}, - {0xC0C0C0C0C0C0C0C0,0x3030303030303030,0x0C0C0C0C0C0C0C0C,0x0303030303030303}, - {0xF000F000F000F000,0x0F000F000F000F00,0x00F000F000F000F0,0x000F000F000F000F}, - {0xFF000000FF000000,0x00FF000000FF0000,0x0000FF000000FF00,0x000000FF000000FF}, - {0xFFFF000000000000,0x0000FFFF00000000,0x00000000FFFF0000,0x000000000000FFFF} -}; - -static inline int CompareWords(word x, word y) +static inline int CompareWords( word x, word y) { - if(x>y) + if( x > y ) return 1; - else if(x<y) + if( x < y ) return -1; - else - return 0; - + return 0; } +static inline int luckyMin( int x, int y ) { return (x < y) ? x : y; } +static inline int luckyMax( int x, int y ) { return (x < y) ? y : x; } + + extern inline int memCompare(word* x, word* y, int nVars); extern inline int Kit_TruthWordNum_64bit( int nVars ); extern Abc_TtStore_t * setTtStore(char * pFileInput); |