[−][src]Function ipasir_sys::ipasir_set_terminate
pub unsafe extern "C" fn ipasir_set_terminate(
solver: *mut c_void,
data: *mut c_void,
terminate: Option<unsafe extern "C" fn(data: *mut c_void) -> c_int>
)
Set a callback function used to indicate a termination requirement to the solver. The solver will periodically call this function and check its return value during the search. The ipasir_set_terminate function can be called in any state of the solver, the state remains unchanged after the call. The callback function is of the form "int terminate(void * data)"
- it returns a non-zero value if the solver should terminate.
- the solver calls the callback function with the parameter "data" having the value passed in the ipasir_set_terminate function (2nd parameter).
Required state: INPUT or SAT or UNSAT State after: INPUT or SAT or UNSAT