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
ccb5bb34
Commit
ccb5bb34
authored
Oct 10, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suggested patch for type-punned warnings
parent
ca9eca3b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
12 deletions
+35
-12
src/aig/gia/giaEra2.c
+9
-2
src/aig/gia/giaShrink6.c
+7
-4
src/map/mio/mioUtils.c
+6
-3
src/misc/vec/vecHsh.h
+8
-1
src/sat/msat/msatClause.c
+5
-2
No files found.
src/aig/gia/giaEra2.c
View file @
ccb5bb34
...
...
@@ -50,6 +50,13 @@ struct Gia_PtrAre_t_
unsigned
fMark
:
1
;
// user mark
};
typedef
union
Gia_PtrAreInt_t_
Gia_PtrAreInt_t
;
union
Gia_PtrAreInt_t_
{
Gia_PtrAre_t
iGia
;
unsigned
iInt
;
};
// tree nodes
typedef
struct
Gia_ObjAre_t_
Gia_ObjAre_t
;
struct
Gia_ObjAre_t_
...
...
@@ -118,8 +125,8 @@ struct Gia_ManAre_t_
int
timeCube
;
// cube checking time
};
static
inline
Gia_PtrAre_t
Gia_Int2Ptr
(
unsigned
n
)
{
return
*
(
Gia_PtrAre_t
*
)(
&
n
);
}
static
inline
unsigned
Gia_Ptr2Int
(
Gia_PtrAre_t
n
)
{
return
(
*
(
int
*
)(
&
n
))
&
0x7fffffff
;
}
static
inline
Gia_PtrAre_t
Gia_Int2Ptr
(
unsigned
n
)
{
Gia_PtrAreInt_t
g
;
g
.
iInt
=
n
;
return
g
.
iGia
;
}
static
inline
unsigned
Gia_Ptr2Int
(
Gia_PtrAre_t
n
)
{
Gia_PtrAreInt_t
g
=
{
n
};
return
g
.
iInt
&
0x7fffffff
;
}
static
inline
int
Gia_ObjHasBranch0
(
Gia_ObjAre_t
*
q
)
{
return
!
q
->
nStas0
&&
(
q
->
F
[
0
].
nPage
||
q
->
F
[
0
].
nItem
);
}
static
inline
int
Gia_ObjHasBranch1
(
Gia_ObjAre_t
*
q
)
{
return
!
q
->
nStas1
&&
(
q
->
F
[
1
].
nPage
||
q
->
F
[
1
].
nItem
);
}
...
...
src/aig/gia/giaShrink6.c
View file @
ccb5bb34
...
...
@@ -170,11 +170,14 @@ Gia_Man_t * Shr_ManFree( Shr_Man_t * p )
***********************************************************************/
static
inline
void
Shr_ManAddFanout
(
Shr_Man_t
*
p
,
int
iFanin
,
int
iFanout
)
{
Shr_Fan_t
FanStr
;
FanStr
.
iFan
=
iFanout
;
FanStr
.
Next
=
Vec_IntEntry
(
p
->
vObj2Fan
,
iFanin
);
union
{
Shr_Fan_t
sFan
;
word
sWord
;
}
FanStr
;
FanStr
.
sFan
.
iFan
=
iFanout
;
FanStr
.
sFan
.
Next
=
Vec_IntEntry
(
p
->
vObj2Fan
,
iFanin
);
Vec_IntWriteEntry
(
p
->
vObj2Fan
,
iFanin
,
Vec_WrdSize
(
p
->
vFanMem
)
);
Vec_WrdPush
(
p
->
vFanMem
,
*
((
word
*
)
&
FanStr
)
);
Vec_WrdPush
(
p
->
vFanMem
,
FanStr
.
sWord
);
}
static
inline
int
Shr_ManFanIterStart
(
Shr_Man_t
*
p
,
int
iNode
)
{
...
...
src/map/mio/mioUtils.c
View file @
ccb5bb34
...
...
@@ -512,10 +512,13 @@ word Mio_DeriveTruthTable6( Mio_Gate_t * pGate )
{
0xFFFF0000
,
0xFFFF0000
},
{
0x00000000
,
0xFFFFFFFF
}
};
unsigned
uTruthRes
[
2
];
union
{
unsigned
u
[
2
];
word
w
;
}
uTruthRes
;
assert
(
pGate
->
nInputs
<=
6
);
Mio_DeriveTruthTable
(
pGate
,
uTruths6
,
pGate
->
nInputs
,
6
,
uTruthRes
);
return
*
((
word
*
)
uTruthRes
)
;
Mio_DeriveTruthTable
(
pGate
,
uTruths6
,
pGate
->
nInputs
,
6
,
uTruthRes
.
u
);
return
uTruthRes
.
w
;
}
#if 0
...
...
src/misc/vec/vecHsh.h
View file @
ccb5bb34
...
...
@@ -46,6 +46,13 @@ struct Hsh_IntObj_t_
int
iNext
;
};
typedef
union
Hsh_IntObjWord_t_
Hsh_IntObjWord_t
;
union
Hsh_IntObjWord_t_
{
Hsh_IntObj_t
wObj
;
word
wWord
;
};
typedef
struct
Hsh_IntMan_t_
Hsh_IntMan_t
;
struct
Hsh_IntMan_t_
{
...
...
@@ -80,7 +87,7 @@ struct Hsh_VecMan_t_
static
inline
unsigned
*
Hsh_IntData
(
Hsh_IntMan_t
*
p
,
int
iData
)
{
return
(
unsigned
*
)
Vec_IntEntryP
(
p
->
vData
,
p
->
nSize
*
iData
);
}
static
inline
Hsh_IntObj_t
*
Hsh_IntObj
(
Hsh_IntMan_t
*
p
,
int
iObj
)
{
return
iObj
==
-
1
?
NULL
:
(
Hsh_IntObj_t
*
)
Vec_WrdEntryP
(
p
->
vObjs
,
iObj
);
}
static
inline
word
Hsh_IntWord
(
int
iData
,
int
iNext
)
{
Hsh_IntObj
_t
Obj
=
{
iData
,
iNext
};
return
*
((
word
*
)
&
Obj
);
}
static
inline
word
Hsh_IntWord
(
int
iData
,
int
iNext
)
{
Hsh_IntObj
Word_t
Obj
=
{
{
iData
,
iNext
}
};
return
Obj
.
wWord
;
}
static
inline
Hsh_VecObj_t
*
Hsh_VecObj
(
Hsh_VecMan_t
*
p
,
int
i
)
{
return
i
==
-
1
?
NULL
:
(
Hsh_VecObj_t
*
)
Vec_IntEntryP
(
p
->
vData
,
Vec_IntEntry
(
p
->
vMap
,
i
));
}
...
...
src/sat/msat/msatClause.c
View file @
ccb5bb34
...
...
@@ -294,7 +294,10 @@ int Msat_ClauseIsLocked( Msat_Solver_t * p, Msat_Clause_t * pC )
***********************************************************************/
float
Msat_ClauseReadActivity
(
Msat_Clause_t
*
pC
)
{
return
*
((
float
*
)(
pC
->
pData
+
pC
->
nSize
));
float
f
;
memcpy
(
&
f
,
pC
->
pData
+
pC
->
nSize
,
sizeof
(
f
));
return
f
;
}
/**Function*************************************************************
...
...
@@ -310,7 +313,7 @@ float Msat_ClauseReadActivity( Msat_Clause_t * pC )
***********************************************************************/
void
Msat_ClauseWriteActivity
(
Msat_Clause_t
*
pC
,
float
Num
)
{
*
((
float
*
)(
pC
->
pData
+
pC
->
nSize
))
=
Num
;
memcpy
(
pC
->
pData
+
pC
->
nSize
,
&
Num
,
sizeof
(
Num
)
)
;
}
/**Function*************************************************************
...
...
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