diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-01 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-01 08:01:00 -0800 |
commit | 320c429bc46728c1faddfc561c166810aa134a04 (patch) | |
tree | c773cc96431cd38ae35484dae7d7d17a79671ac2 /src/sat/bsat/satSolver.c | |
parent | f65983c2c0810cfb933f696952325a81d2378987 (diff) | |
download | abc-320c429bc46728c1faddfc561c166810aa134a04.tar.gz abc-320c429bc46728c1faddfc561c166810aa134a04.tar.bz2 abc-320c429bc46728c1faddfc561c166810aa134a04.zip |
Version abc80301
Diffstat (limited to 'src/sat/bsat/satSolver.c')
-rw-r--r-- | src/sat/bsat/satSolver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sat/bsat/satSolver.c b/src/sat/bsat/satSolver.c index 8a13d203..a04921c9 100644 --- a/src/sat/bsat/satSolver.c +++ b/src/sat/bsat/satSolver.c @@ -25,6 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include <math.h> #include "satSolver.h" +#include "port_type.h" //#define SAT_USE_SYSTEM_MEMORY_MANAGEMENT @@ -90,9 +91,9 @@ static inline void clause_setactivity(clause* c, float a) { *((float*)&c->lits[ //================================================================================================= // Encode literals in clause pointers: -static inline clause* clause_from_lit (lit l) { return (clause*)((unsigned long)l + (unsigned long)l + 1); } -static inline bool clause_is_lit (clause* c) { return ((unsigned long)c & 1); } -static inline lit clause_read_lit (clause* c) { return (lit)((unsigned long)c >> 1); } +static inline clause* clause_from_lit (lit l) { return (clause*)((PORT_PTRUINT_T)l + (PORT_PTRUINT_T)l + 1); } +static inline bool clause_is_lit (clause* c) { return ((PORT_PTRUINT_T)c & 1); } +static inline lit clause_read_lit (clause* c) { return (lit)((PORT_PTRUINT_T)c >> 1); } //================================================================================================= // Simple helpers: @@ -285,7 +286,7 @@ static clause* clause_new(sat_solver* s, lit* begin, lit* end, int learnt) #endif c->size_learnt = (size << 1) | learnt; - assert(((unsigned long)c & 1) == 0); + assert(((PORT_PTRUINT_T)c & 1) == 0); for (i = 0; i < size; i++) c->lits[i] = begin[i]; |