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
6eb2e715
Commit
6eb2e715
authored
Oct 05, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplification in AIG manager object counting.
parent
f11f645f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/aig/aig/aig.h
+2
-3
src/aig/aig/aigCheck.c
+1
-1
No files found.
src/aig/aig/aig.h
View file @
6eb2e715
...
...
@@ -109,7 +109,6 @@ struct Aig_Man_t_
int
nConstrs
;
// the number of constraints (model checking only)
// AIG node counters
int
nObjs
[
AIG_OBJ_VOID
];
// the number of objects by type
int
nCreated
;
// the number of created objects
int
nDeleted
;
// the number of deleted objects
// structural hash table
Aig_Obj_t
**
pTable
;
// structural hash table
...
...
@@ -250,7 +249,7 @@ static inline int Aig_ManAndNum( Aig_Man_t * p ) { return p->nO
static
inline
int
Aig_ManExorNum
(
Aig_Man_t
*
p
)
{
return
p
->
nObjs
[
AIG_OBJ_EXOR
];
}
static
inline
int
Aig_ManNodeNum
(
Aig_Man_t
*
p
)
{
return
p
->
nObjs
[
AIG_OBJ_AND
]
+
p
->
nObjs
[
AIG_OBJ_EXOR
];
}
static
inline
int
Aig_ManGetCost
(
Aig_Man_t
*
p
)
{
return
p
->
nObjs
[
AIG_OBJ_AND
]
+
3
*
p
->
nObjs
[
AIG_OBJ_EXOR
];
}
static
inline
int
Aig_ManObjNum
(
Aig_Man_t
*
p
)
{
return
p
->
nCreated
-
p
->
nDeleted
;
}
static
inline
int
Aig_ManObjNum
(
Aig_Man_t
*
p
)
{
return
Vec_PtrSize
(
p
->
vObjs
)
-
p
->
nDeleted
;
}
static
inline
int
Aig_ManObjNumMax
(
Aig_Man_t
*
p
)
{
return
Vec_PtrSize
(
p
->
vObjs
);
}
static
inline
int
Aig_ManRegNum
(
Aig_Man_t
*
p
)
{
return
p
->
nRegs
;
}
static
inline
int
Aig_ManConstrNum
(
Aig_Man_t
*
p
)
{
return
p
->
nConstrs
;
}
...
...
@@ -366,8 +365,8 @@ static inline Aig_Obj_t * Aig_ManFetchMemory( Aig_Man_t * p )
Aig_Obj_t
*
pTemp
;
pTemp
=
(
Aig_Obj_t
*
)
Aig_MmFixedEntryFetch
(
p
->
pMemObjs
);
memset
(
pTemp
,
0
,
sizeof
(
Aig_Obj_t
)
);
pTemp
->
Id
=
Vec_PtrSize
(
p
->
vObjs
);
Vec_PtrPush
(
p
->
vObjs
,
pTemp
);
pTemp
->
Id
=
p
->
nCreated
++
;
return
pTemp
;
}
static
inline
void
Aig_ManRecycleMemory
(
Aig_Man_t
*
p
,
Aig_Obj_t
*
pEntry
)
...
...
src/aig/aig/aigCheck.c
View file @
6eb2e715
...
...
@@ -100,7 +100,7 @@ int Aig_ManCheck( Aig_Man_t * p )
1
,
Aig_ManCiNum
(
p
),
Aig_ManCoNum
(
p
),
Aig_ManBufNum
(
p
),
Aig_ManAndNum
(
p
),
Aig_ManExorNum
(
p
),
1
+
Aig_ManCiNum
(
p
)
+
Aig_ManCoNum
(
p
)
+
Aig_ManBufNum
(
p
)
+
Aig_ManAndNum
(
p
)
+
Aig_ManExorNum
(
p
)
);
printf
(
"Created = %d. Deleted = %d. Existing = %d.
\n
"
,
p
->
nCreated
,
p
->
nDeleted
,
p
->
nCreated
-
p
->
nDeleted
);
Aig_ManObjNumMax
(
p
),
p
->
nDeleted
,
Aig_ManObjNum
(
p
)
);
return
0
;
}
// count the number of nodes in the table
...
...
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