PPL C Language Interface 0.12
|
Functions | |
int | ppl_set_timeout (unsigned csecs) |
Sets the timeout for computations whose completion could require an exponential amount of time. | |
int | ppl_reset_timeout (void) |
Resets the timeout time so that the computation is not interrupted. | |
int | ppl_set_deterministic_timeout (unsigned weight) |
Sets a threshold for computations whose completion could require an exponential amount of time. | |
int | ppl_reset_deterministic_timeout (void) |
Resets the deterministic timeout so that the computation is not interrupted. |
Functions for setting and resetting timeouts.
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()
.
int ppl_set_deterministic_timeout | ( | unsigned | weight | ) |
Sets a threshold for computations whose completion could require an exponential amount of time.
weight | The maximum computational weight allowed; it must be strictly greater than zero. |
Computations taking exponential time will be interrupted some time after reaching the weight
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()
.