From 7b6175a66941420d3ded08c1ce3229302b7135f0 Mon Sep 17 00:00:00 2001 From: Simon Felix Date: Tue, 21 Nov 2023 10:02:51 +0100 Subject: [PATCH] add phase/unphase to C api --- src/ccadical.cpp | 8 ++++++++ src/ccadical.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/ccadical.cpp b/src/ccadical.cpp index ac11e445..fae8bff2 100644 --- a/src/ccadical.cpp +++ b/src/ccadical.cpp @@ -139,6 +139,14 @@ int ccadical_fixed (CCaDiCaL *wrapper, int lit) { return ((Wrapper *) wrapper)->solver->fixed (lit); } +void ccadical_phase (CCaDiCaL *wrapper, int lit) { + ((Wrapper *) wrapper)->solver->phase (lit); +} + +void ccadical_unphase (CCaDiCaL *wrapper, int lit) { + ((Wrapper *) wrapper)->solver->unphase (lit); +} + void ccadical_set_terminate (CCaDiCaL *ptr, void *state, int (*terminate) (void *)) { Wrapper *wrapper = (Wrapper *) ptr; diff --git a/src/ccadical.h b/src/ccadical.h index 035ffe9d..495a9f96 100644 --- a/src/ccadical.h +++ b/src/ccadical.h @@ -51,6 +51,9 @@ DllExport int ccadical_frozen (CCaDiCaL *, int lit); DllExport void ccadical_melt (CCaDiCaL *, int lit); DllExport int ccadical_simplify (CCaDiCaL *); +DllExport void ccadical_phase (CCaDiCaL *, int lit); +DllExport void ccadical_unphase (CCaDiCaL *, int lit); + /*------------------------------------------------------------------------*/ // Support legacy names used before moving to more IPASIR conforming names.