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
a80a91e4
Commit
a80a91e4
authored
Nov 02, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix and new procedures.
parent
d13e33cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
4 deletions
+70
-4
src/aig/gia/giaAiger.c
+4
-4
src/aig/gia/giaPat2.c
+2
-0
src/misc/vec/vecInt.h
+64
-0
No files found.
src/aig/gia/giaAiger.c
View file @
a80a91e4
...
...
@@ -1702,8 +1702,8 @@ int * Aiger_Read( char * pFileName, int * pnObjs, int * pnIns, int * pnLats, int
int
uLit
=
2
*
(
1
+
nIns
+
nLats
+
i
);
int
uLit1
=
uLit
-
Aiger_ReadUnsigned
(
pFile
);
int
uLit0
=
uLit1
-
Aiger_ReadUnsigned
(
pFile
);
pObjs
[
2
*
(
1
+
nIns
+
i
)
+
0
]
=
uLit0
;
pObjs
[
2
*
(
1
+
nIns
+
i
)
+
1
]
=
uLit1
;
pObjs
[
2
*
(
1
+
nIns
+
nLats
+
i
)
+
0
]
=
uLit0
;
pObjs
[
2
*
(
1
+
nIns
+
nLats
+
i
)
+
1
]
=
uLit1
;
}
fclose
(
pFile
);
if
(
pnObjs
)
*
pnObjs
=
nObjs
;
...
...
@@ -1729,8 +1729,8 @@ void Aiger_Write( char * pFileName, int * pObjs, int nObjs, int nIns, int nLats,
for
(
i
=
0
;
i
<
nAnds
;
i
++
)
{
int
uLit
=
2
*
(
1
+
nIns
+
nLats
+
i
);
int
uLit0
=
pObjs
[
2
*
(
1
+
nIns
+
i
)
+
0
];
int
uLit1
=
pObjs
[
2
*
(
1
+
nIns
+
i
)
+
1
];
int
uLit0
=
pObjs
[
2
*
(
1
+
nIns
+
nLats
+
i
)
+
0
];
int
uLit1
=
pObjs
[
2
*
(
1
+
nIns
+
nLats
+
i
)
+
1
];
Aiger_WriteUnsigned
(
pFile
,
uLit
-
uLit1
);
Aiger_WriteUnsigned
(
pFile
,
uLit1
-
uLit0
);
}
...
...
src/aig/gia/giaPat2.c
View file @
a80a91e4
...
...
@@ -1242,6 +1242,8 @@ Vec_Wrd_t * Min_ManRemapSims( int nInputs, Vec_Int_t * vMap, Vec_Wrd_t * vSimsPi
{
int
i
,
iObj
,
nWords
=
Vec_WrdSize
(
vSimsPi
)
/
Vec_IntSize
(
vMap
);
Vec_Wrd_t
*
vSimsNew
=
Vec_WrdStart
(
2
*
nInputs
*
nWords
);
//Vec_Wrd_t * vSimsNew = Vec_WrdStartRandom( nInputs * nWords );
//Vec_WrdFillExtra( vSimsNew, 2 * nInputs * nWords, 0 );
assert
(
Vec_WrdSize
(
vSimsPi
)
%
Vec_IntSize
(
vMap
)
==
0
);
Vec_WrdShrink
(
vSimsNew
,
Vec_WrdSize
(
vSimsNew
)
/
2
);
Vec_IntForEachEntry
(
vMap
,
iObj
,
i
)
...
...
src/misc/vec/vecInt.h
View file @
a80a91e4
...
...
@@ -1934,6 +1934,70 @@ static inline int Vec_IntTwoRemove( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
Synopsis [Returns the result of merging the two vectors.]
Description [Keeps only those entries of vArr1, which are in vArr2.]
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_IntTwoMerge1
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
)
{
int
*
pBeg
=
vArr1
->
pArray
;
int
*
pBeg1
=
vArr1
->
pArray
;
int
*
pBeg2
=
vArr2
->
pArray
;
int
*
pEnd1
=
vArr1
->
pArray
+
vArr1
->
nSize
;
int
*
pEnd2
=
vArr2
->
pArray
+
vArr2
->
nSize
;
while
(
pBeg1
<
pEnd1
&&
pBeg2
<
pEnd2
)
{
if
(
*
pBeg1
==
*
pBeg2
)
*
pBeg
++
=
*
pBeg1
++
,
pBeg2
++
;
else
if
(
*
pBeg1
<
*
pBeg2
)
*
pBeg1
++
;
else
*
pBeg2
++
;
}
assert
(
vArr1
->
nSize
>=
pBeg
-
vArr1
->
pArray
);
vArr1
->
nSize
=
pBeg
-
vArr1
->
pArray
;
}
/**Function*************************************************************
Synopsis [Returns the result of subtracting for two vectors.]
Description [Keeps only those entries of vArr1, which are not in vArr2.]
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_IntTwoRemove1
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
)
{
int
*
pBeg
=
vArr1
->
pArray
;
int
*
pBeg1
=
vArr1
->
pArray
;
int
*
pBeg2
=
vArr2
->
pArray
;
int
*
pEnd1
=
vArr1
->
pArray
+
vArr1
->
nSize
;
int
*
pEnd2
=
vArr2
->
pArray
+
vArr2
->
nSize
;
while
(
pBeg1
<
pEnd1
&&
pBeg2
<
pEnd2
)
{
if
(
*
pBeg1
==
*
pBeg2
)
*
pBeg1
++
,
pBeg2
++
;
else
if
(
*
pBeg1
<
*
pBeg2
)
*
pBeg
++
=
*
pBeg1
++
;
else
*
pBeg2
++
;
}
while
(
pBeg1
<
pEnd1
)
*
pBeg
++
=
*
pBeg1
++
;
assert
(
vArr1
->
nSize
>=
pBeg
-
vArr1
->
pArray
);
vArr1
->
nSize
=
pBeg
-
vArr1
->
pArray
;
}
/**Function*************************************************************
Synopsis [Returns the result of merging the two vectors.]
Description [Assumes that the vectors are sorted in the increasing order.]
SideEffects []
...
...
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