Go to the source code of this file.
|
| ABC_NAMESPACE_IMPL_START void | swap_ij_case1 (word *f, int totalVars, int i, int j) |
| |
| void | swap_ij_case2 (word *f, int totalVars, int i, int j) |
| |
| void | swap_ij_case3 (word *f, int totalVars, int i, int j) |
| |
| void | swap_ij (word *f, int totalVars, int varI, int varJ) |
| |
◆ swap_ij()
| void swap_ij |
( |
word * | f, |
|
|
int | totalVars, |
|
|
int | varI, |
|
|
int | varJ ) |
Definition at line 88 of file luckySwapIJ.c.
89{
90 if (varI == varJ)
91 return;
92 else if(varI>varJ)
93 swap_ij( f,totalVars,varJ,varI);
94 else if((varI <= 4) && (varJ <= 5))
96 else if((varI <= 5) && (varJ > 5))
98 else if((varI > 5) && (varJ > 5))
100}
void swap_ij_case2(word *f, int totalVars, int i, int j)
void swap_ij(word *f, int totalVars, int varI, int varJ)
void swap_ij_case3(word *f, int totalVars, int i, int j)
ABC_NAMESPACE_IMPL_START void swap_ij_case1(word *f, int totalVars, int i, int j)
◆ swap_ij_case1()
CFile****************************************************************
FileName [luckySwapIJ.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Semi-canonical form computation package.]
Synopsis [just for support of swap_ij() function]
Author [Jake]
Date [Started - September 2012]
Definition at line 23 of file luckySwapIJ.c.
24{
25 int e,wordsNumber,n,shift;
35 };
36 e = 3*((9*i - i*i -2)/2 + j);
38 shift = (1<<j)-(1<<i);
39 for(n = 0; n < wordsNumber; n++)
40 f[n] = (f[n]&maskArray[e])+((f[n]&(maskArray[e+1]))<< shift)+((f[n]&(maskArray[e+2]))>> shift);
41}
#define ABC_CONST(number)
PARAMETERS ///.
unsigned __int64 word
DECLARATIONS ///.
int Kit_TruthWordNum_64bit(int nVars)
◆ swap_ij_case2()
| void swap_ij_case2 |
( |
word * | f, |
|
|
int | totalVars, |
|
|
int | i, |
|
|
int | j ) |
Definition at line 47 of file luckySwapIJ.c.
48{
52 int x,y,wj;
54
55 int forShift = (1<<i);
56 wj = 1 << (j - 6);
57 x = 0;
58 y = wj;
59 for(y=wj; y<WORDS_IN_TT;y+=2*wj)
60 for(x=y-wj; x < y; x++)
61 {
62 temp = f[x+wj];
63 f[x+wj] = ((f[x+wj])&(mask[i])) + (((f[x]) & (mask[i])) >> forShift);
64 f[x] = ((f[x])&(~mask[i])) + ((temp&(~mask[i])) << forShift);
65 }
66}
◆ swap_ij_case3()
| void swap_ij_case3 |
( |
word * | f, |
|
|
int | totalVars, |
|
|
int | i, |
|
|
int | j ) |
Definition at line 68 of file luckySwapIJ.c.
69{
70 int x,y,wwi,wwj,shift;
71 int WORDS_IN_TT;
72 int SizeOfBlock;
74 wwi = 1 << (i - 5);
75 wwj = 1 << (j - 5);
76 shift = (wwj - wwi)/2;
78 SizeOfBlock =
sizeof(
word)*wwi/2;
80 for(y=wwj/2; y<WORDS_IN_TT; y+=wwj)
81 for(x=y-shift; x<y; x+=wwi)
82 {
83 memcpy(temp,&f[x],(
size_t)SizeOfBlock);
84 memcpy(&f[x],&f[x+shift],(
size_t)SizeOfBlock);
85 memcpy(&f[x+shift],temp,(
size_t)SizeOfBlock);
86 }
87}