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
80f5070d
Commit
80f5070d
authored
Feb 07, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-introducing floating-point activity in the SAT solver.
parent
44dbf992
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
src/sat/bsat/satSolver.c
+18
-2
No files found.
src/sat/bsat/satSolver.c
View file @
80f5070d
...
...
@@ -492,7 +492,7 @@ int sat_solver_clause_new(sat_solver* s, lit* begin, lit* end, int learnt)
#ifdef USE_FLOAT_ACTIVITY_NEW
veci_push
(
&
s
->
act_clas
,
xSat_Float2Uint
(
xSat_FloatCreateConst1
()));
#else
veci_push
(
&
s
->
act_clas
,
0
);
veci_push
(
&
s
->
act_clas
,
s
->
cla_inc
);
#endif
#else
veci_push
(
&
s
->
act_clas
,
(
1
<<
10
));
...
...
@@ -1532,8 +1532,16 @@ void sat_solver_reducedb(sat_solver* s)
Sat_MemForEachLearned
(
pMem
,
c
,
i
,
k
)
{
Id
=
clause_id
(
c
);
pSortValues
[
Id
]
=
(((
7
-
Abc_MinInt
(
c
->
lbd
,
7
))
<<
28
)
|
(
act_clas
[
Id
]
>>
4
));
// pSortValues[Id] = act[Id];
#ifdef USE_FLOAT_ACTIVITY
#ifdef USE_FLOAT_ACTIVITY_NEW
pSortValues
[
Id
]
=
((
7
-
Abc_MinInt
(
c
->
lbd
,
7
))
<<
28
)
|
(
act_clas
[
Id
]
>>
4
);
#else
pSortValues
[
Id
]
=
((
7
-
Abc_MinInt
(
c
->
lbd
,
7
))
<<
28
);
// | (act_clas[Id] >> 4);
#endif
#else
pSortValues
[
Id
]
=
((
7
-
Abc_MinInt
(
c
->
lbd
,
7
))
<<
28
)
|
(
act_clas
[
Id
]
>>
4
);
#endif
assert
(
pSortValues
[
Id
]
>=
0
);
}
...
...
@@ -1639,7 +1647,15 @@ void sat_solver_rollback( sat_solver* s )
if
(
s
->
activity2
)
{
s
->
var_inc
=
s
->
var_inc2
;
#ifdef USE_FLOAT_ACTIVITY
#ifdef USE_FLOAT_ACTIVITY_NEW
memcpy
(
s
->
activity
,
s
->
activity2
,
sizeof
(
xFloat_t
)
*
s
->
iVarPivot
);
#else
memcpy
(
s
->
activity
,
s
->
activity2
,
sizeof
(
double
)
*
s
->
iVarPivot
);
#endif
#else
memcpy
(
s
->
activity
,
s
->
activity2
,
sizeof
(
unsigned
)
*
s
->
iVarPivot
);
#endif
}
veci_resize
(
&
s
->
order
,
0
);
for
(
i
=
0
;
i
<
s
->
iVarPivot
;
i
++
)
...
...
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