Skip to content

Commit b66c0d9

Browse files
committed
allowed wrapup to force solver state
1 parent 016e80f commit b66c0d9

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/gpu/definitions.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ namespace ParaFROST {
6464

6565
#if defined(_DEBUG) || defined(DEBUG) || !defined(NDEBUG)
6666
#define CHECK(FUNCCALL) \
67-
{ \
67+
do { \
6868
const cudaError_t returncode = FUNCCALL; \
6969
if (returncode != cudaSuccess) { \
7070
LOGERRORN("CUDA runtime failure due to %s", cudaGetErrorString(returncode)); \
7171
cudaDeviceReset(); \
7272
exit(1); \
7373
} \
74-
}
74+
} while(0)
7575
#else
7676
#define CHECK(FUNCCALL) FUNCCALL
7777
#endif

src/gpu/solver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,9 @@ void Solver::solve()
229229
wrapup();
230230
}
231231

232-
void Solver::wrapup() {
232+
void Solver::wrapup(const CNFState& state) {
233233
LOGHEADER(1, 5, "Result");
234+
if (state != UNSOLVED) cnfstate = state;
234235
if (cnfstate == SAT) {
235236
LOGSAT("SATISFIABLE");
236237
assert(sp != NULL && sp->value != NULL);

src/gpu/solver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,9 @@ namespace ParaFROST {
657657
void eligibleVMFQ ();
658658
void decide ();
659659
void report ();
660-
void wrapup ();
661660
void solve ();
662661
bool parse ();
662+
void wrapup (const CNFState& state = UNSOLVED);
663663
bool parse (const string&);
664664
void map (BCNF&);
665665
void map (WL&);

0 commit comments

Comments
 (0)