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
db3f5b6d
Commit
db3f5b6d
authored
Jun 08, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with cut computation.
parent
7d18d6b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
src/aig/gia/giaCut.c
+3
-1
src/aig/gia/giaResub2.c
+41
-1
No files found.
src/aig/gia/giaCut.c
View file @
db3f5b6d
...
...
@@ -767,7 +767,9 @@ void Gia_ManPrintWinStats( Vec_Wec_t * vCuts )
}
void
Gia_ManExtractTest
(
Gia_Man_t
*
pGia
)
{
Vec_Wec_t
*
vCutsSel
=
Gia_ManExtractCuts
(
pGia
,
8
,
10000
,
1
);
extern
Vec_Wec_t
*
Gia_ManExtractCuts2
(
Gia_Man_t
*
p
,
int
nCutSize
,
int
nCuts
,
int
fVerbose
);
Vec_Wec_t
*
vCutsSel
=
Gia_ManExtractCuts2
(
pGia
,
8
,
10000
,
1
);
//Vec_Wec_t * vCutsSel = Gia_ManExtractCuts( pGia, 8, 10000, 1 );
abctime
clk
=
Abc_Clock
();
Gia_ManCreateWins
(
pGia
,
vCutsSel
);
//Gia_ManPrintWins( vCutsSel );
...
...
src/aig/gia/giaResub2.c
View file @
db3f5b6d
...
...
@@ -1498,10 +1498,50 @@ void Gia_RsbTestArray()
Vec_IntFree
(
vArray
);
}
/**Function*************************************************************
Synopsis [Computing cuts of the nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Wec_t
*
Gia_ManExtractCuts2
(
Gia_Man_t
*
p
,
int
nCutSize
,
int
nCuts
,
int
fVerbose
)
{
int
c
,
nLevelMax
=
8
;
abctime
clk
=
Abc_Clock
();
Vec_Wec_t
*
vCuts
=
Vec_WecStart
(
nCuts
);
Vec_Int_t
*
vPaths
=
Vec_IntStart
(
Gia_ManObjNum
(
p
)
);
srand
(
time
(
NULL
)
);
for
(
c
=
0
;
c
<
nCuts
;
)
{
Vec_Int_t
*
vCut
,
*
vWin
=
NULL
;
while
(
vWin
==
NULL
)
{
int
iPivot
=
1
+
Gia_ManCiNum
(
p
)
+
rand
()
%
Gia_ManAndNum
(
p
);
assert
(
Gia_ObjIsAnd
(
Gia_ManObj
(
p
,
iPivot
))
);
vWin
=
Gia_RsbWindowInit
(
p
,
vPaths
,
iPivot
,
nLevelMax
);
}
vCut
=
Gia_RsbCreateWindowInputs
(
p
,
vWin
);
if
(
Vec_IntSize
(
vCut
)
>=
nCutSize
-
2
&&
Vec_IntSize
(
vCut
)
<=
nCutSize
)
{
Vec_IntPush
(
Vec_WecEntry
(
vCuts
,
c
),
Vec_IntSize
(
vCut
)
);
Vec_IntAppend
(
Vec_WecEntry
(
vCuts
,
c
++
),
vCut
);
}
Vec_IntFree
(
vCut
);
Vec_IntFree
(
vWin
);
}
Vec_IntFree
(
vPaths
);
Abc_PrintTime
(
0
,
"Computing cuts "
,
Abc_Clock
()
-
clk
);
return
vCuts
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
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