Skip to content

Commit

Permalink
add phase/unphase to C api
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Felix committed Nov 21, 2023
1 parent 9d3aeb3 commit 7b6175a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ccadical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/ccadical.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7b6175a

Please sign in to comment.