Parma_Polyhedra_Library::Weightwatch_Traits Struct Reference
[C++ Language Interface]

Traits class for the deterministic timeout mechanism. More...

#include <globals.defs.hh>

List of all members.

Public Types

typedef unsigned long long Threshold
 The type used to specify thresholds for computational weight.
typedef unsigned long long Delta
 The type used to specify increments of computational weight.

Static Public Member Functions

static const Thresholdget ()
 Returns the current computational weight.
static bool less_than (const Threshold &a, const Threshold &b)
 Compares the two weights a and b.
static void from_delta (Threshold &threshold, const Delta &delta)
 Sets threshold to be delta units bigger than the current weigth.

Static Public Attributes

static Threshold weight = 0
 The current computational weight.
static void(* check_function )(void)
 A pointer to the function that has to be called when checking the reaching of thresholds.

Detailed Description

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 97 of file globals.defs.hh.


Member Typedef Documentation

The type used to specify increments of computational weight.

Definition at line 102 of file globals.defs.hh.

The type used to specify thresholds for computational weight.

Definition at line 99 of file globals.defs.hh.


Member Function Documentation

void Parma_Polyhedra_Library::Weightwatch_Traits::from_delta ( Threshold threshold,
const Delta delta 
) [inline, static]

Sets threshold to be delta units bigger than the current weigth.

Definition at line 48 of file globals.inlines.hh.

References weight.

00048                                                                        {
00049   threshold = weight + delta;
00050 }

const Weightwatch_Traits::Threshold & Parma_Polyhedra_Library::Weightwatch_Traits::get (  )  [inline, static]

Returns the current computational weight.

Definition at line 38 of file globals.inlines.hh.

References weight.

00038                         {
00039   return weight;
00040 }

bool Parma_Polyhedra_Library::Weightwatch_Traits::less_than ( const Threshold a,
const Threshold b 
) [inline, static]

Compares the two weights a and b.

Definition at line 43 of file globals.inlines.hh.

00043                                                                     {
00044   return b - a < 1ULL << (sizeof(Threshold)*8-1);
00045 }


Member Data Documentation

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 122 of file globals.defs.hh.

Referenced by Parma_Polyhedra_Library::maybe_abandon().

The current computational weight.

Definition at line 114 of file globals.defs.hh.

Referenced by from_delta(), and get().


The documentation for this struct was generated from the following files:
Generated on Sun Feb 27 16:20:20 2011 for PPL by  doxygen 1.6.3