PPL C Language Interface
1.2
|
Functions | |
int | ppl_set_timeout (unsigned csecs) |
Sets the timeout for computations whose completion could require an exponential amount of time. More... | |
int | ppl_reset_timeout (void) |
Resets the timeout time so that the computation is not interrupted. More... | |
int | ppl_set_deterministic_timeout (unsigned long unscaled_weight, unsigned scale) |
Sets a threshold for computations whose completion could require an exponential amount of time. More... | |
int | ppl_reset_deterministic_timeout (void) |
Resets the deterministic timeout so that the computation is not interrupted. More... | |
Functions for setting and resetting timeouts.
int ppl_reset_deterministic_timeout | ( | void | ) |
Resets the deterministic timeout so that the computation is not interrupted.
Definition at line 276 of file ppl_c_implementation_common.cc.
int ppl_reset_timeout | ( | void | ) |
Resets the timeout time so that the computation is not interrupted.
Definition at line 255 of file ppl_c_implementation_common.cc.
Sets a threshold for computations whose completion could require an exponential amount of time.
PPL_ERROR_INVALID_ARGUMENT
if unscaled_weight
is zero or if the computed weight threshold exceeds the maximum allowed value.unscaled_weight | The unscaled maximum computational weight; it has to be non-zero. |
scale | The scaling factor to be applied to unscaled_weight . |
If unscaled_weight
has value and
scale
has value , then the (scaled) weight threshold is computed as
. Computations taking exponential time will be interrupted some time after reaching the complexity threshold
. If the computation is interrupted that way, the interrupted function will return error code
PPL_TIMEOUT_EXCEPTION
. Otherwise, if the computation completes without being interrupted, then the deterministic timeout should be reset by calling ppl_reset_deterministic_timeout()
.
Definition at line 262 of file ppl_c_implementation_common.cc.
References Parma_Polyhedra_Library::abandon_expensive_computations.
int ppl_set_timeout | ( | unsigned | csecs | ) |
Sets the timeout for computations whose completion could require an exponential amount of time.
csecs | The number of centiseconds sometimes after which a timeout will occur; it must be strictly greater than zero. |
Computations taking exponential time will be interrupted some time after csecs
centiseconds have elapsed since the call to the timeout setting function. If the computation is interrupted that way, the interrupted function will return error code PPL_TIMEOUT_EXCEPTION
. Otherwise, if the computation completes without being interrupted, then the timeout should be reset by calling ppl_reset_timeout()
.
Definition at line 244 of file ppl_c_implementation_common.cc.
References Parma_Polyhedra_Library::abandon_expensive_computations.