PPL
1.2
|
Traits class for the deterministic timeout mechanism. More...
#include <globals_defs.hh>
Public Types | |
typedef unsigned long long | Threshold |
The type used to specify thresholds for computational weight. More... | |
typedef unsigned long long | Delta |
The type used to specify increments of computational weight. More... | |
Static Public Member Functions | |
static const Threshold & | get () |
Returns the current computational weight. More... | |
static bool | less_than (const Threshold &a, const Threshold &b) |
Compares the two weights a and b . More... | |
static Delta | compute_delta (unsigned long unscaled, unsigned scale) |
Computes a Delta value from unscaled and scale . More... | |
static void | from_delta (Threshold &threshold, const Delta &delta) |
Sets threshold to be delta units bigger than the current weight. More... | |
Static Public Attributes | |
static Threshold | weight = 0 |
The current computational weight. More... | |
static void(* | check_function )(void) |
A pointer to the function that has to be called when checking the reaching of thresholds. More... | |
Traits class for the deterministic timeout mechanism.
This abstract base class should be instantiated by those users willing to provide a polynomial upper bound to the time spent by any invocation of a library operator.
Definition at line 169 of file globals_defs.hh.
typedef unsigned long long Parma_Polyhedra_Library::Weightwatch_Traits::Delta |
The type used to specify increments of computational weight.
Definition at line 174 of file globals_defs.hh.
typedef unsigned long long Parma_Polyhedra_Library::Weightwatch_Traits::Threshold |
The type used to specify thresholds for computational weight.
Definition at line 171 of file globals_defs.hh.
|
inlinestatic |
Computes a Delta
value from unscaled
and scale
.
unscaled
and scale
.unscaled | The value of delta before scaling. |
scale | The scaling to be applied to unscaled . |
Definition at line 60 of file globals_inlines.hh.
|
inlinestatic |
Sets threshold
to be delta
units bigger than the current weight.
Definition at line 70 of file globals_inlines.hh.
References weight.
|
inlinestatic |
Returns the current computational weight.
Definition at line 50 of file globals_inlines.hh.
References weight.
|
inlinestatic |
Compares the two weights a
and b
.
Definition at line 55 of file globals_inlines.hh.
References sizeof_to_bits.
|
static |
A pointer to the function that has to be called when checking the reaching of thresholds.
The pointer can be null if no thresholds are set.
Definition at line 208 of file globals_defs.hh.
Referenced by Parma_Polyhedra_Library::maybe_abandon().
|
static |
The current computational weight.
Definition at line 200 of file globals_defs.hh.
Referenced by Parma_Polyhedra_Library::Weight_Profiler::end(), from_delta(), and get().