Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
c890440f
Commit
c890440f
authored
Oct 03, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C++ portability changes.
parent
0175e1a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
src/bool/lucky/lucky.c
+4
-4
src/bool/lucky/luckySwap.c
+11
-11
No files found.
src/bool/lucky/lucky.c
View file @
c890440f
...
...
@@ -157,7 +157,7 @@ void freeArrayB(word* b)
// if highest bit in F ( all ones min term ) is one => inverse
// if pInOnt changed(minimized) by function return 1 if not 0
// in
line in
t minimalInitialFlip_propper(word* pInOut, word* pDuplicat, int nVars)
// int minimalInitialFlip_propper(word* pInOut, word* pDuplicat, int nVars)
// {
// word oneWord=1;
// Kit_TruthCopy_64bit( pDuplicat, pInOut, nVars );
...
...
@@ -169,7 +169,7 @@ void freeArrayB(word* b)
// }
// return 0;
// }
// in
line in
t minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// int minimalFlip(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// {
// int i;
// int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
...
...
@@ -188,7 +188,7 @@ void freeArrayB(word* b)
// else
// return 1;
// }
// in
line in
t minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// int minimalSwap(word* pInOut, word* pMinimal, word* PDuplicat, int nVars)
// {
// int i;
// int blockSize = Kit_TruthWordNum_64bit( nVars )*sizeof(word);
...
...
@@ -561,7 +561,7 @@ int luckyCheck(word* pAfter, word* pBefore, int nVars, char * pCanonPerm, unsign
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
inline
void
luckyCanonicizer
(
word
*
pInOut
,
word
*
pAux
,
word
*
pAux1
,
int
nVars
,
char
*
pCanonPerm
,
char
*
tempArray
,
unsigned
*
p_uCanonPhase
)
void
luckyCanonicizer
(
word
*
pInOut
,
word
*
pAux
,
word
*
pAux1
,
int
nVars
,
char
*
pCanonPerm
,
char
*
tempArray
,
unsigned
*
p_uCanonPhase
)
{
int
counter
=
1
;
assert
(
nVars
<=
16
);
...
...
src/bool/lucky/luckySwap.c
View file @
c890440f
...
...
@@ -35,7 +35,7 @@ static word mask[6][2] = {
int
Kit_TruthWordNum_64bit
(
int
nVars
)
{
return
nVars
<=
6
?
1
:
(
1
<<
(
nVars
-
6
));}
in
line
in
t
Kit_WordCountOnes_64bit
(
word
x
)
int
Kit_WordCountOnes_64bit
(
word
x
)
{
x
=
x
-
((
x
>>
1
)
&
0x5555555555555555
);
x
=
(
x
&
0x3333333333333333
)
+
((
x
>>
2
)
&
0x3333333333333333
);
...
...
@@ -46,7 +46,7 @@ inline int Kit_WordCountOnes_64bit(word x)
return
(
int
)(
x
&
0xFF
);
}
in
line
in
t
Kit_TruthCountOnes_64bit
(
word
*
pIn
,
int
nVars
)
int
Kit_TruthCountOnes_64bit
(
word
*
pIn
,
int
nVars
)
{
int
w
,
Counter
=
0
;
for
(
w
=
Kit_TruthWordNum_64bit
(
nVars
)
-
1
;
w
>=
0
;
w
--
)
...
...
@@ -54,7 +54,7 @@ inline int Kit_TruthCountOnes_64bit( word* pIn, int nVars )
return
Counter
;
}
inline
void
Kit_TruthCountOnesInCofs_64bit
(
word
*
pTruth
,
int
nVars
,
int
*
pStore
)
void
Kit_TruthCountOnesInCofs_64bit
(
word
*
pTruth
,
int
nVars
,
int
*
pStore
)
{
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
int
i
,
k
,
Counter
;
...
...
@@ -97,7 +97,7 @@ inline void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pSto
}
}
inline
void
Kit_TruthChangePhase_64bit
(
word
*
pInOut
,
int
nVars
,
int
iVar
)
void
Kit_TruthChangePhase_64bit
(
word
*
pInOut
,
int
nVars
,
int
iVar
)
{
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
int
i
,
Step
,
SizeOfBlock
;
...
...
@@ -127,18 +127,18 @@ inline void Kit_TruthChangePhase_64bit( word * pInOut, int nVars, int iVar )
}
inline
void
Kit_TruthNot_64bit
(
word
*
pIn
,
int
nVars
)
void
Kit_TruthNot_64bit
(
word
*
pIn
,
int
nVars
)
{
int
w
;
for
(
w
=
Kit_TruthWordNum_64bit
(
nVars
)
-
1
;
w
>=
0
;
w
--
)
pIn
[
w
]
=
~
pIn
[
w
];
}
inline
void
Kit_TruthCopy_64bit
(
word
*
pOut
,
word
*
pIn
,
int
nVars
)
void
Kit_TruthCopy_64bit
(
word
*
pOut
,
word
*
pIn
,
int
nVars
)
{
memcpy
(
pOut
,
pIn
,
Kit_TruthWordNum_64bit
(
nVars
)
*
sizeof
(
word
));
}
inline
void
Kit_TruthSwapAdjacentVars_64bit
(
word
*
pInOut
,
int
nVars
,
int
iVar
)
void
Kit_TruthSwapAdjacentVars_64bit
(
word
*
pInOut
,
int
nVars
,
int
iVar
)
{
int
i
,
Step
,
Shift
,
SizeOfBlock
;
//
word
temp
[
256
];
// to make only pInOut possible
...
...
@@ -183,7 +183,7 @@ inline void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar
}
}
inline
unsigned
Kit_TruthSemiCanonicize_Yasha
(
word
*
pInOut
,
int
nVars
,
char
*
pCanonPerm
)
unsigned
Kit_TruthSemiCanonicize_Yasha
(
word
*
pInOut
,
int
nVars
,
char
*
pCanonPerm
)
{
int
pStore
[
16
];
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
...
...
@@ -242,7 +242,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha( word* pInOut, int nVars, char *
return
uCanonPhase
;
}
inline
unsigned
Kit_TruthSemiCanonicize_Yasha1
(
word
*
pInOut
,
int
nVars
,
char
*
pCanonPerm
,
int
*
pStore
)
unsigned
Kit_TruthSemiCanonicize_Yasha1
(
word
*
pInOut
,
int
nVars
,
char
*
pCanonPerm
,
int
*
pStore
)
{
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
int
i
,
fChange
,
nOnes
;
...
...
@@ -309,7 +309,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
}
//
inline
unsigned Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, char * pCanonPerm )
// unsigned Kit_TruthSemiCanonicize_Yasha_simple( word* pInOut, int nVars, char * pCanonPerm )
// {
// unsigned uCanonPhase = 0;
// int pStore[16];
...
...
@@ -355,7 +355,7 @@ inline unsigned Kit_TruthSemiCanonicize_Yasha1( word* pInOut, int nVars, char *
// return uCanonPhase;
// }
inline
void
Kit_TruthSemiCanonicize_Yasha_simple
(
word
*
pInOut
,
int
nVars
,
int
*
pStore
)
void
Kit_TruthSemiCanonicize_Yasha_simple
(
word
*
pInOut
,
int
nVars
,
int
*
pStore
)
{
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
int
i
,
Temp
,
fChange
,
nOnes
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment