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
e43ca9f8
Commit
e43ca9f8
authored
Feb 19, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Isomorphism checking code.
parent
2377ae60
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
src/aig/gia/giaIso.c
+11
-8
src/aig/saig/saigIso.c
+1
-1
No files found.
src/aig/gia/giaIso.c
View file @
e43ca9f8
...
@@ -375,10 +375,11 @@ void Gia_IsoSimulate( Gia_IsoMan_t * p, int Iter )
...
@@ -375,10 +375,11 @@ void Gia_IsoSimulate( Gia_IsoMan_t * p, int Iter )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Gia_IsoSort
(
Gia_IsoMan_t
*
p
)
int
Gia_IsoSort
(
Gia_IsoMan_t
*
p
)
{
{
Gia_Obj_t
*
pObj
,
*
pObj0
;
Gia_Obj_t
*
pObj
,
*
pObj0
;
int
i
,
k
,
fSameValue
,
iBegin
,
iBeginOld
,
nSize
,
nSizeNew
,
clk
;
int
i
,
k
,
fSameValue
,
iBegin
,
iBeginOld
,
nSize
,
nSizeNew
,
clk
;
int
fRefined
=
0
;
// go through the equiv classes
// go through the equiv classes
p
->
nSingles
=
0
;
p
->
nSingles
=
0
;
...
@@ -401,6 +402,7 @@ void Gia_IsoSort( Gia_IsoMan_t * p )
...
@@ -401,6 +402,7 @@ void Gia_IsoSort( Gia_IsoMan_t * p )
Vec_IntPush
(
p
->
vClasses2
,
nSize
);
Vec_IntPush
(
p
->
vClasses2
,
nSize
);
continue
;
continue
;
}
}
fRefined
=
1
;
// sort objects
// sort objects
clk
=
clock
();
clk
=
clock
();
Abc_QuickSort3
(
p
->
pStoreW
+
iBegin
,
nSize
,
0
);
Abc_QuickSort3
(
p
->
pStoreW
+
iBegin
,
nSize
,
0
);
...
@@ -445,6 +447,7 @@ void Gia_IsoSort( Gia_IsoMan_t * p )
...
@@ -445,6 +447,7 @@ void Gia_IsoSort( Gia_IsoMan_t * p )
ABC_SWAP
(
Vec_Int_t
*
,
p
->
vClasses
,
p
->
vClasses2
);
ABC_SWAP
(
Vec_Int_t
*
,
p
->
vClasses
,
p
->
vClasses2
);
p
->
nEntries
-=
p
->
nSingles
;
p
->
nEntries
-=
p
->
nSingles
;
return
fRefined
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -519,8 +522,8 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fVerbose )
...
@@ -519,8 +522,8 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fVerbose )
{
{
Vec_Ptr_t
*
vEquivs
;
Vec_Ptr_t
*
vEquivs
;
Gia_IsoMan_t
*
p
;
Gia_IsoMan_t
*
p
;
int
nIterMax
=
1000
;
int
nIterMax
=
1000
,
fRefined
;
int
i
,
clk
=
clock
(),
clkTotal
=
clock
();
int
i
,
c
,
c
lk
=
clock
(),
clkTotal
=
clock
();
Gia_ManCleanValue
(
pGia
);
Gia_ManCleanValue
(
pGia
);
p
=
Gia_IsoManStart
(
pGia
);
p
=
Gia_IsoManStart
(
pGia
);
...
@@ -530,21 +533,21 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fVerbose )
...
@@ -530,21 +533,21 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fVerbose )
// Gia_IsoPrintClasses( p );
// Gia_IsoPrintClasses( p );
if
(
fVerbose
)
if
(
fVerbose
)
Gia_IsoPrint
(
p
,
0
,
clock
()
-
clkTotal
);
Gia_IsoPrint
(
p
,
0
,
clock
()
-
clkTotal
);
for
(
i
=
0
;
i
<
nIterMax
;
i
++
)
for
(
i
=
0
,
c
=
0
;
i
<
nIterMax
&&
c
<
3
;
i
++
,
c
++
)
{
{
clk
=
clock
();
clk
=
clock
();
Gia_IsoSimulate
(
p
,
i
);
Gia_IsoSimulate
(
p
,
i
);
p
->
timeSim
+=
clock
()
-
clk
;
p
->
timeSim
+=
clock
()
-
clk
;
clk
=
clock
();
clk
=
clock
();
Gia_IsoSort
(
p
);
fRefined
=
Gia_IsoSort
(
p
);
if
(
fRefined
)
c
=
0
;
p
->
timeRefine
+=
clock
()
-
clk
;
p
->
timeRefine
+=
clock
()
-
clk
;
// Gia_IsoPrintClasses( p );
// Gia_IsoPrintClasses( p );
if
(
fVerbose
)
if
(
fVerbose
)
Gia_IsoPrint
(
p
,
i
+
1
,
clock
()
-
clkTotal
);
Gia_IsoPrint
(
p
,
i
+
1
,
clock
()
-
clkTotal
);
if
(
p
->
nSingles
==
0
)
break
;
}
}
if
(
fVerbose
)
if
(
fVerbose
)
{
{
...
@@ -625,7 +628,7 @@ void Gia_IsoTest( Gia_Man_t * pGia, int fVerbose )
...
@@ -625,7 +628,7 @@ void Gia_IsoTest( Gia_Man_t * pGia, int fVerbose )
vEquivs
=
Gia_IsoDeriveEquivPos
(
pGia
,
fVerbose
);
vEquivs
=
Gia_IsoDeriveEquivPos
(
pGia
,
fVerbose
);
printf
(
"Reduced %d outputs to %d. "
,
Gia_ManPoNum
(
pGia
),
Vec_PtrSize
(
vEquivs
)
);
printf
(
"Reduced %d outputs to %d. "
,
Gia_ManPoNum
(
pGia
),
Vec_PtrSize
(
vEquivs
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
if
(
fVerbose
)
if
(
fVerbose
&&
Gia_ManPoNum
(
pGia
)
!=
Vec_PtrSize
(
vEquivs
)
)
{
{
printf
(
"Nontrivial classes:
\n
"
);
printf
(
"Nontrivial classes:
\n
"
);
Vec_VecPrintInt
(
(
Vec_Vec_t
*
)
vEquivs
,
1
);
Vec_VecPrintInt
(
(
Vec_Vec_t
*
)
vEquivs
,
1
);
...
...
src/aig/saig/saigIso.c
View file @
e43ca9f8
...
@@ -564,7 +564,7 @@ Aig_Man_t * Saig_ManIsoReduce( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int f
...
@@ -564,7 +564,7 @@ Aig_Man_t * Saig_ManIsoReduce( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int f
pPart
=
Iso_ManFilterPos
(
pAig
,
pvPosEquivs
,
fVerbose
);
pPart
=
Iso_ManFilterPos
(
pAig
,
pvPosEquivs
,
fVerbose
);
printf
(
"Reduced %d outputs to %d outputs. "
,
Saig_ManPoNum
(
pAig
),
Saig_ManPoNum
(
pPart
)
);
printf
(
"Reduced %d outputs to %d outputs. "
,
Saig_ManPoNum
(
pAig
),
Saig_ManPoNum
(
pPart
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
if
(
fVerbose
&&
*
pvPosEquivs
)
if
(
fVerbose
&&
*
pvPosEquivs
&&
Saig_ManPoNum
(
pAig
)
!=
Vec_PtrSize
(
*
pvPosEquivs
)
)
{
{
printf
(
"Nontrivial classes:
\n
"
);
printf
(
"Nontrivial classes:
\n
"
);
Vec_VecPrintInt
(
(
Vec_Vec_t
*
)
*
pvPosEquivs
,
1
);
Vec_VecPrintInt
(
(
Vec_Vec_t
*
)
*
pvPosEquivs
,
1
);
...
...
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