28 #define MAX_PRIMES 304
32 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,
33 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89,
34 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151,
35 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223,
36 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
37 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359,
38 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
39 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,
40 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593,
41 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
42 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743,
43 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827,
44 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911,
45 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997,
46 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069,
47 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163,
48 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249,
49 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321,
50 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439,
51 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511,
52 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601,
53 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693,
54 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783,
55 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877,
56 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987,
57 1993, 1997, 1999, 2003
82 pLit1 = (*ppCube1)->lLits.pHead;
83 pLit2 = (*ppCube2)->lLits.pHead;
118 if ( (*ppCube1)->iCube > (*ppCube2)->iCube )
120 pCubeTemp = *ppCube1;
122 *ppCube2 = pCubeTemp;
139 int Offset1 = 100, Offset2 = 200, i;
143 for ( i = 0; i < nVarsC1; i++ )
144 Key ^=
s_Primes[Offset1+i] * piVarsC1[i];
145 for ( i = 0; i < nVarsC2; i++ )
146 Key ^=
s_Primes[Offset2+i] * piVarsC2[i];
165 int * pnBase,
int * pnLits1,
int * pnLits2 )
167 int Offset1 = 100, Offset2 = 200;
168 int nBase, nLits1, nLits2;
181 if ( pLit1 && pLit2 )
190 else if ( pLit1->
iVar < pLit2->
iVar )
203 else if ( pLit1 && !pLit2 )
209 else if ( !pLit1 && pLit2 )
240 int TopVar1, TopVar2;
288 if ( TopVar2 == pD1C2->
iVar )
295 else if ( TopVar2 < pD1C2->iVar )
317 if ( TopVar2 == pD1C1->
iVar )
324 else if ( TopVar2 < pD1C1->iVar )
342 if ( TopVar1 == pD2C2->
iVar )
349 else if ( TopVar1 < pD2C2->iVar )
361 if ( TopVar1 == pD2C1->
iVar )
368 else if ( TopVar1 < pD2C1->iVar )
381 if ( TopVar1 == TopVar2 )
412 else if ( TopVar1 < TopVar2 )
461 for ( k = 1; k < nCubes; k++ )
481 for ( i = 0; i < pVar->
nCubes; i++ )
#define MAX_PRIMES
DECLARATIONS ///.
void Fxu_PairAllocStorage(Fxu_Var *pVar, int nCubes)
unsigned Fxu_PairHashKeyArray(Fxu_Matrix *p, int piVarsC1[], int piVarsC2[], int nVarsC1, int nVarsC2)
#define ABC_ALLOC(type, num)
void Fxu_PairAdd(Fxu_Pair *pPair)
#define MEM_ALLOC_FXU(Manager, Type, Size)
void Fxu_PairCanonicize2(Fxu_Cube **ppCube1, Fxu_Cube **ppCube2)
void Fxu_PairCanonicize(Fxu_Cube **ppCube1, Fxu_Cube **ppCube2)
FUNCTION DEFINITIONS ///.
static int s_Primes[MAX_PRIMES]
void Fxu_PairFreeStorage(Fxu_Var *pVar)
void Fxu_PairClearStorage(Fxu_Cube *pCube)
#define ABC_NAMESPACE_IMPL_END
unsigned Fxu_PairHashKey(Fxu_Matrix *p, Fxu_Cube *pCube1, Fxu_Cube *pCube2, int *pnBase, int *pnLits1, int *pnLits2)
#define ABC_NAMESPACE_IMPL_START
#define Fxu_Min(a, b)
MACRO DEFINITIONS ///.
Fxu_Pair * Fxu_PairAlloc(Fxu_Matrix *p, Fxu_Cube *pCube1, Fxu_Cube *pCube2)
int Fxu_PairCompare(Fxu_Pair *pPair1, Fxu_Pair *pPair2)
typedefABC_NAMESPACE_HEADER_START struct FxuMatrix Fxu_Matrix
INCLUDES ///.