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
8a03e530
Commit
8a03e530
authored
Oct 06, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resubstitution code.
parent
812a877a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
341 additions
and
20 deletions
+341
-20
abclib.dsp
+4
-0
src/aig/gia/giaResub.c
+292
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+1
-0
src/misc/vec/vecInt.h
+11
-2
src/misc/vec/vecWec.h
+32
-18
No files found.
abclib.dsp
View file @
8a03e530
...
@@ -3739,6 +3739,10 @@ SOURCE=.\src\aig\gia\giaPat.c
...
@@ -3739,6 +3739,10 @@ SOURCE=.\src\aig\gia\giaPat.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaResub.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaRetime.c
SOURCE=.\src\aig\gia\giaRetime.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/aig/gia/giaResub.c
0 → 100644
View file @
8a03e530
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
8a03e530
...
@@ -35,6 +35,7 @@ SRC += src/aig/gia/giaAig.c \
...
@@ -35,6 +35,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaMini.c
\
src/aig/gia/giaMini.c
\
src/aig/gia/giaMuxes.c
\
src/aig/gia/giaMuxes.c
\
src/aig/gia/giaPat.c
\
src/aig/gia/giaPat.c
\
src/aig/gia/giaResub.c
\
src/aig/gia/giaRetime.c
\
src/aig/gia/giaRetime.c
\
src/aig/gia/giaScl.c
\
src/aig/gia/giaScl.c
\
src/aig/gia/giaShrink.c
\
src/aig/gia/giaShrink.c
\
...
...
src/base/abci/abc.c
View file @
8a03e530
...
@@ -33707,6 +33707,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -33707,6 +33707,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Abc_FrameUpdateGia( pAbc, pTemp );
// Abc_FrameUpdateGia( pAbc, pTemp );
// Unm_ManTest( pAbc->pGia );
// Unm_ManTest( pAbc->pGia );
// Agi_ManTest( pAbc->pGia );
// Agi_ManTest( pAbc->pGia );
// Gia_ManResubTest( pAbc->pGia );
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
src/misc/vec/vecInt.h
View file @
8a03e530
...
@@ -1473,9 +1473,8 @@ static inline int Vec_IntTwoRemove( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
...
@@ -1473,9 +1473,8 @@ static inline int Vec_IntTwoRemove( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
static
inline
Vec_Int_t
*
Vec_IntTwoMerge
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
)
static
inline
void
Vec_IntTwoMerge2Int
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
,
Vec_Int_t
*
vArr
)
{
{
Vec_Int_t
*
vArr
=
Vec_IntAlloc
(
vArr1
->
nSize
+
vArr2
->
nSize
);
int
*
pBeg
=
vArr
->
pArray
;
int
*
pBeg
=
vArr
->
pArray
;
int
*
pBeg1
=
vArr1
->
pArray
;
int
*
pBeg1
=
vArr1
->
pArray
;
int
*
pBeg2
=
vArr2
->
pArray
;
int
*
pBeg2
=
vArr2
->
pArray
;
...
@@ -1498,8 +1497,18 @@ static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2
...
@@ -1498,8 +1497,18 @@ static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2
assert
(
vArr
->
nSize
<=
vArr
->
nCap
);
assert
(
vArr
->
nSize
<=
vArr
->
nCap
);
assert
(
vArr
->
nSize
>=
vArr1
->
nSize
);
assert
(
vArr
->
nSize
>=
vArr1
->
nSize
);
assert
(
vArr
->
nSize
>=
vArr2
->
nSize
);
assert
(
vArr
->
nSize
>=
vArr2
->
nSize
);
}
static
inline
Vec_Int_t
*
Vec_IntTwoMerge
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
)
{
Vec_Int_t
*
vArr
=
Vec_IntAlloc
(
vArr1
->
nSize
+
vArr2
->
nSize
);
Vec_IntTwoMerge2Int
(
vArr1
,
vArr2
,
vArr
);
return
vArr
;
return
vArr
;
}
}
static
inline
void
Vec_IntTwoMerge2
(
Vec_Int_t
*
vArr1
,
Vec_Int_t
*
vArr2
,
Vec_Int_t
*
vArr
)
{
Vec_IntGrow
(
vArr
,
Vec_IntSize
(
vArr1
)
+
Vec_IntSize
(
vArr2
)
);
Vec_IntTwoMerge2Int
(
vArr1
,
vArr2
,
vArr
);
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/misc/vec/vecWec.h
View file @
8a03e530
...
@@ -399,7 +399,7 @@ static inline Vec_Wec_t * Vec_WecDup( Vec_Wec_t * p )
...
@@ -399,7 +399,7 @@ static inline Vec_Wec_t * Vec_WecDup( Vec_Wec_t * p )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [
Comparison procedure for two arrays
.]
Synopsis [
Sorting by array size
.]
Description []
Description []
...
@@ -424,18 +424,6 @@ static int Vec_WecSortCompare2( Vec_Int_t * p1, Vec_Int_t * p2 )
...
@@ -424,18 +424,6 @@ static int Vec_WecSortCompare2( Vec_Int_t * p1, Vec_Int_t * p2 )
return
1
;
return
1
;
return
0
;
return
0
;
}
}
/**Function*************************************************************
Synopsis [Sorting the entries by their integer value.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_WecSort
(
Vec_Wec_t
*
p
,
int
fReverse
)
static
inline
void
Vec_WecSort
(
Vec_Wec_t
*
p
,
int
fReverse
)
{
{
if
(
fReverse
)
if
(
fReverse
)
...
@@ -446,9 +434,10 @@ static inline void Vec_WecSort( Vec_Wec_t * p, int fReverse )
...
@@ -446,9 +434,10 @@ static inline void Vec_WecSort( Vec_Wec_t * p, int fReverse )
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare1
);
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare1
);
}
}
/**Function*************************************************************
/**Function*************************************************************
Synopsis [
Comparison procedure for two integers
.]
Synopsis [
Sorting by the first entry
.]
Description []
Description []
...
@@ -473,10 +462,19 @@ static int Vec_WecSortCompare4( Vec_Int_t * p1, Vec_Int_t * p2 )
...
@@ -473,10 +462,19 @@ static int Vec_WecSortCompare4( Vec_Int_t * p1, Vec_Int_t * p2 )
return
1
;
return
1
;
return
0
;
return
0
;
}
}
static
inline
void
Vec_WecSortByFirstInt
(
Vec_Wec_t
*
p
,
int
fReverse
)
{
if
(
fReverse
)
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare4
);
else
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare3
);
}
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Sorting
the entries by their integer value
.]
Synopsis [Sorting
by the last entry
.]
Description []
Description []
...
@@ -485,14 +483,30 @@ static int Vec_WecSortCompare4( Vec_Int_t * p1, Vec_Int_t * p2 )
...
@@ -485,14 +483,30 @@ static int Vec_WecSortCompare4( Vec_Int_t * p1, Vec_Int_t * p2 )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
static
inline
void
Vec_WecSortByFirstInt
(
Vec_Wec_t
*
p
,
int
fReverse
)
static
int
Vec_WecSortCompare5
(
Vec_Int_t
*
p1
,
Vec_Int_t
*
p2
)
{
if
(
Vec_IntEntryLast
(
p1
)
<
Vec_IntEntryLast
(
p2
)
)
return
-
1
;
if
(
Vec_IntEntryLast
(
p1
)
>
Vec_IntEntryLast
(
p2
)
)
return
1
;
return
0
;
}
static
int
Vec_WecSortCompare6
(
Vec_Int_t
*
p1
,
Vec_Int_t
*
p2
)
{
if
(
Vec_IntEntryLast
(
p1
)
>
Vec_IntEntryLast
(
p2
)
)
return
-
1
;
if
(
Vec_IntEntryLast
(
p1
)
<
Vec_IntEntryLast
(
p2
)
)
return
1
;
return
0
;
}
static
inline
void
Vec_WecSortByLastInt
(
Vec_Wec_t
*
p
,
int
fReverse
)
{
{
if
(
fReverse
)
if
(
fReverse
)
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare
4
);
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare
6
);
else
else
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
qsort
(
(
void
*
)
p
->
pArray
,
p
->
nSize
,
sizeof
(
Vec_Int_t
),
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare
3
);
(
int
(
*
)(
const
void
*
,
const
void
*
))
Vec_WecSortCompare
5
);
}
}
/**Function*************************************************************
/**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