int64_t LIMIT; \
do { \
const int64_t OLD_LIMIT = stats.ticks.NAME; \
const int64_t TICKS = stats.ticks.search[0] + stats.ticks.search[1]; \
const int64_t LAST = last.NAME.ticks; \
int64_t REFERENCE = TICKS - LAST; \
if (!REFERENCE || !stats.conflicts) { \
VERBOSE (2, "last %" PRId64 " current %" PRId64 " delta %" PRId64, \
LAST, TICKS, REFERENCE); \
REFERENCE = opts.preprocessinit; \
} \
const double EFFORT = (double) opts.NAME##effort * 1e-3; \
const int64_t DELTA = EFFORT * REFERENCE; \
const int64_t THRESH = opts.NAME##thresh * clauses.size (); \
if (THRESHHOLD && DELTA < THRESH) { \
VERBOSE (2, \
"delaying %s with ticklimit %" PRId64 \
" and threshhold %" PRId64, \
return false; \
} \
last.NAME.ticks = TICKS; \
const int64_t NEW_LIMIT = OLD_LIMIT + DELTA; \
LIMIT = NEW_LIMIT; \
} while (0)
131#define SET_EFFORT_LIMIT(LIMIT, NAME, THRESHHOLD) \
132 int64_t LIMIT; \
133 do { \
134 const int64_t OLD_LIMIT = stats.ticks.NAME; \
135 const int64_t TICKS = stats.ticks.search[0] + stats.ticks.search[1]; \
136 const int64_t LAST = last.NAME.ticks; \
137 int64_t REFERENCE = TICKS - LAST; \
138 if (!REFERENCE || !stats.conflicts) { \
139 VERBOSE (2, "last %" PRId64 " current %" PRId64 " delta %" PRId64, \
140 LAST, TICKS, REFERENCE); \
141 REFERENCE = opts.preprocessinit; \
142 } \
143 const double EFFORT = (double) opts.NAME##effort * 1e-3; \
144 const int64_t DELTA = EFFORT * REFERENCE; \
145 const int64_t THRESH = opts.NAME##thresh * clauses.size (); \
146 if (THRESHHOLD && DELTA < THRESH) { \
147 VERBOSE (2, \
148 "delaying %s with ticklimit %" PRId64 \
149 " and threshhold %" PRId64, \
150 #NAME, DELTA, THRESH); \
151 return false; \
152 } \
153 last.NAME.ticks = TICKS; \
154 const int64_t NEW_LIMIT = OLD_LIMIT + DELTA; \
155 LIMIT = NEW_LIMIT; \
156 } while (0)