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
518410af
Commit
518410af
authored
Aug 09, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler warnings.
parent
20518f59
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
17 deletions
+18
-17
src/bool/lucky/lucky.c
+1
-1
src/bool/lucky/luckyInt.h
+4
-16
src/bool/lucky/luckySwap.c
+13
-0
No files found.
src/bool/lucky/lucky.c
View file @
518410af
...
...
@@ -85,7 +85,7 @@ void sortAndUnique(word** a, Abc_TtStore_t* p)
{
int
i
,
count
=
1
,
WordsPtrN
=
p
->
nFuncs
;
word
*
tempWordPtr
;
qsort
(
a
,
WordsPtrN
,
sizeof
(
word
*
),
compareWords3
);
qsort
(
a
,
WordsPtrN
,
sizeof
(
word
*
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
compareWords3
);
tempWordPtr
=
a
[
0
];
for
(
i
=
1
;
i
<
WordsPtrN
;
i
++
)
if
(
memcmp
(
a
[
i
],
tempWordPtr
,
sizeof
(
word
)
*
(
p
->
nWords
))
!=
0
)
...
...
src/bool/lucky/luckyInt.h
View file @
518410af
...
...
@@ -35,27 +35,15 @@
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedef
unsigned
__int64
word
;
#endif
ABC_NAMESPACE_HEADER_START
#define bool int
#define false 0
#define true 1
#define inline __inline // compatible with MS VS 6.0
#define ABC_ALLOC(type, num) ((type *) malloc(sizeof(type) * (num)))
static
word
mask1
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
};
static
word
mask0
[
6
]
=
{
0x5555555555555555
,
0x3333333333333333
,
0x0F0F0F0F0F0F0F0F
,
0x00FF00FF00FF00FF
,
0x0000FFFF0000FFFF
,
0x00000000FFFFFFFF
};
static
word
mask
[
6
][
2
]
=
{
{
0x5555555555555555
,
0xAAAAAAAAAAAAAAAA
},
{
0x3333333333333333
,
0xCCCCCCCCCCCCCCCC
},
{
0x0F0F0F0F0F0F0F0F
,
0xF0F0F0F0F0F0F0F0
},
{
0x00FF00FF00FF00FF
,
0xFF00FF00FF00FF00
},
{
0x0000FFFF0000FFFF
,
0xFFFF0000FFFF0000
},
{
0x00000000FFFFFFFF
,
0xFFFFFFFF00000000
}
};
#endif
ABC_NAMESPACE_HEADER_START
typedef
struct
{
...
...
src/bool/lucky/luckySwap.c
View file @
518410af
...
...
@@ -19,6 +19,19 @@
ABC_NAMESPACE_IMPL_START
static
word
mask0
[
6
]
=
{
0x5555555555555555
,
0x3333333333333333
,
0x0F0F0F0F0F0F0F0F
,
0x00FF00FF00FF00FF
,
0x0000FFFF0000FFFF
,
0x00000000FFFFFFFF
};
/*
static word mask1[6] = { 0xAAAAAAAAAAAAAAAA,0xCCCCCCCCCCCCCCCC, 0xF0F0F0F0F0F0F0F0,0xFF00FF00FF00FF00,0xFFFF0000FFFF0000, 0xFFFFFFFF00000000 };
static word mask[6][2] = {
{0x5555555555555555,0xAAAAAAAAAAAAAAAA},
{0x3333333333333333,0xCCCCCCCCCCCCCCCC},
{0x0F0F0F0F0F0F0F0F,0xF0F0F0F0F0F0F0F0},
{0x00FF00FF00FF00FF,0xFF00FF00FF00FF00},
{0x0000FFFF0000FFFF,0xFFFF0000FFFF0000},
{0x00000000FFFFFFFF,0xFFFFFFFF00000000}
};
*/
inline
int
Kit_TruthWordNum_64bit
(
int
nVars
)
{
return
nVars
<=
6
?
1
:
(
1
<<
(
nVars
-
6
));}
inline
int
Kit_WordCountOnes_64bit
(
word
x
)
...
...
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