[PPL-devel] [GIT] ppl/ppl(floating_point): Fixed one cut-&-paste error.
Fabio Bossi
bossi at cs.unipr.it
Tue Sep 22 09:33:36 CEST 2009
Module: ppl/ppl
Branch: floating_point
Commit: c6e8ada743e7203512e9f830e052e52256458ac6
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=c6e8ada743e7203512e9f830e052e52256458ac6
Author: Fabio Bossi <bossi at cs.unipr.it>
Date: Tue Sep 22 09:36:01 2009 +0200
Fixed one cut-&-paste error.
Use a single call of bounded_affine_image instead of calling
generalized_affine_image twice.
Added two FIXME notes.
---
src/Floating_Point_Expression.defs.hh | 6 ++++++
src/Octagonal_Shape.defs.hh | 2 +-
src/Polyhedron.templates.hh | 9 ++-------
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/Floating_Point_Expression.defs.hh b/src/Floating_Point_Expression.defs.hh
index ec21e1b..ffaf2b7 100644
--- a/src/Floating_Point_Expression.defs.hh
+++ b/src/Floating_Point_Expression.defs.hh
@@ -34,6 +34,12 @@ namespace Parma_Polyhedra_Library {
//! Exception class indicating the failure of a linearization attempt.
class Linearization_Failed {};
+/*
+ FIXME: considering adapting the whole code of Floating_Point_Expression
+ to use the policies defined in Float.defs.hh instead of the following
+ ones that contain duplicate information.
+*/
+
//! Policy class defining the IEEE754 half precision format.
struct IEEE754_Half {
static const unsigned short fraction_bits = 10;
diff --git a/src/Octagonal_Shape.defs.hh b/src/Octagonal_Shape.defs.hh
index 111d2de..61aebe7 100644
--- a/src/Octagonal_Shape.defs.hh
+++ b/src/Octagonal_Shape.defs.hh
@@ -1864,7 +1864,7 @@ private:
const Linear_Form< Interval<T, Interval_Info> >& lf,
N& result) const;
- // FIXME: the name is questionable.
+ // FIXME: this function is currently not used. Consider removing it.
static void interval_coefficient_upper_bound(const N& var_ub,
const N& minus_var_ub,
const N& int_ub, const N& int_lb,
diff --git a/src/Polyhedron.templates.hh b/src/Polyhedron.templates.hh
index a8e2a07..7adf015 100644
--- a/src/Polyhedron.templates.hh
+++ b/src/Polyhedron.templates.hh
@@ -305,7 +305,7 @@ Polyhedron::refine_with_linear_form_inequality(
// Check that FP_Format is indeed a floating point type.
PPL_COMPILE_TIME_CHECK(!std::numeric_limits<FP_Format>::is_exact,
- "Polyhedron::affine_image:"
+ "Polyhedron::refine_with_linear_form_inequality:"
" FP_Format not a floating point type.");
// Dimension compatibility checks.
@@ -383,12 +383,7 @@ const std::map< dimension_type, Interval<FP_Format, Interval_Info> >& store) {
lo_coeff, hi_coeff);
// Finally, do the assignment.
- PPL_DIRTY_TEMP_COEFFICIENT(one_coeff);
- one_coeff = 1;
- generalized_affine_image(var, GREATER_OR_EQUAL, lf_approx_le + lo_coeff,
- one_coeff);
- generalized_affine_image(var, LESS_OR_EQUAL, lf_approx_le + hi_coeff,
- one_coeff);
+ bounded_affine_image(var, lf_approx_le + lo_coeff, lf_approx_le + hi_coeff);
}
More information about the PPL-devel
mailing list