[PPL-devel] [GIT] ppl/ppl(master): Keep macro names within the PPL namespace.

Roberto Bagnara bagnara at cs.unipr.it
Sun Mar 25 21:19:30 CEST 2012


Module: ppl/ppl
Branch: master
Commit: 59bbf2ad8eeaaa4506c572785f178fd7fdbd9826
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=59bbf2ad8eeaaa4506c572785f178fd7fdbd9826

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Sun Mar 25 21:18:47 2012 +0200

Keep macro names within the PPL namespace.

---

 src/BD_Shape.inlines.hh      |    2 +-
 src/Box.templates.hh         |    4 ++--
 src/Grid_Certificate.cc      |    2 +-
 src/Interval.inlines.hh      |    8 ++++----
 src/MIP_Problem.inlines.hh   |    2 +-
 src/PIP_Tree.cc              |   10 ++++------
 src/checked_float.inlines.hh |    4 ++--
 src/compiler.hh              |    6 +++---
 8 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/src/BD_Shape.inlines.hh b/src/BD_Shape.inlines.hh
index 4c8b8fc..221d2f5 100644
--- a/src/BD_Shape.inlines.hh
+++ b/src/BD_Shape.inlines.hh
@@ -892,7 +892,7 @@ inline void
 BD_Shape<T>::drop_some_non_integer_points_helper(N& elem) {
   if (!is_integer(elem)) {
     Result r = floor_assign_r(elem, elem, ROUND_DOWN);
-    used(r);
+    PPL_USED(r);
     PPL_ASSERT(r == V_EQ);
     reset_shortest_path_closed();
   }
diff --git a/src/Box.templates.hh b/src/Box.templates.hh
index 169a197..f32c505 100644
--- a/src/Box.templates.hh
+++ b/src/Box.templates.hh
@@ -1515,8 +1515,8 @@ Box<ITV>::wrap_assign(const Variables_Set& vars,
                               complexity_threshold, wrap_individually,
                               "Box");
 #else // Specialized implementation.
-  used(wrap_individually);
-  used(complexity_threshold);
+  PPL_USED(wrap_individually);
+  PPL_USED(complexity_threshold);
   Box& x = *this;
 
   // Dimension-compatibility check for `*cs_p', if any.
diff --git a/src/Grid_Certificate.cc b/src/Grid_Certificate.cc
index 72959df..defaff4 100644
--- a/src/Grid_Certificate.cc
+++ b/src/Grid_Certificate.cc
@@ -56,7 +56,7 @@ PPL::Grid_Certificate::Grid_Certificate(const Grid& gr)
         Grid& mgr = const_cast<Grid&>(gr);
 	bool empty = Grid::simplify(mgr.con_sys, mgr.dim_kinds);
 	// Avoid possible compiler warning.
-	used(empty);
+	PPL_USED(empty);
 	PPL_ASSERT(!empty);
 	mgr.set_congruences_minimized();
 
diff --git a/src/Interval.inlines.hh b/src/Interval.inlines.hh
index 1f1b2f0..15c9959 100644
--- a/src/Interval.inlines.hh
+++ b/src/Interval.inlines.hh
@@ -480,7 +480,7 @@ Interval<To_Boundary, To_Info>::refine_universal(Relation_Symbol rel,
       Result ru = Boundary_NS::assign(UPPER, upper(), info(),
 				      LOWER, f_lower(x), SCALAR_INFO,
                                       !is_open(LOWER, f_lower(x), f_info(x)));
-      used(ru);
+      PPL_USED(ru);
       return I_ANY;
     }
   case LESS_OR_EQUAL:
@@ -490,7 +490,7 @@ Interval<To_Boundary, To_Info>::refine_universal(Relation_Symbol rel,
       info().clear_boundary_properties(UPPER);
       Result ru = Boundary_NS::assign(UPPER, upper(), info(),
 				      LOWER, f_lower(x), SCALAR_INFO);
-      used(ru);
+      PPL_USED(ru);
       return I_ANY;
     }
   case GREATER_THAN:
@@ -501,7 +501,7 @@ Interval<To_Boundary, To_Info>::refine_universal(Relation_Symbol rel,
       Result rl = Boundary_NS::assign(LOWER, lower(), info(),
 				      UPPER, f_upper(x), SCALAR_INFO,
                                       !is_open(UPPER, f_upper(x), f_info(x)));
-      used(rl);
+      PPL_USED(rl);
       return I_ANY;
     }
   case GREATER_OR_EQUAL:
@@ -511,7 +511,7 @@ Interval<To_Boundary, To_Info>::refine_universal(Relation_Symbol rel,
       info().clear_boundary_properties(LOWER);
       Result rl = Boundary_NS::assign(LOWER, lower(), info(),
 				      UPPER, f_upper(x), SCALAR_INFO);
-      used(rl);
+      PPL_USED(rl);
       return I_ANY;
     }
   case EQUAL:
diff --git a/src/MIP_Problem.inlines.hh b/src/MIP_Problem.inlines.hh
index 0a538b2..c2dd27d 100644
--- a/src/MIP_Problem.inlines.hh
+++ b/src/MIP_Problem.inlines.hh
@@ -160,7 +160,7 @@ MIP_Problem::integer_space_dimensions() const {
 
 inline MIP_Problem::Control_Parameter_Value
 MIP_Problem::get_control_parameter(Control_Parameter_Name name) const {
-  used(name);
+  PPL_USED(name);
   PPL_ASSERT(name == PRICING);
   return pricing;
 }
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index a0165ec..4ee628d 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -1303,7 +1303,7 @@ PIP_Decision_Node::solve(const PIP_Problem& pip,
 #ifdef NOISY_PIP_TREE_STRUCTURE
   indent_and_print(std::cerr, indent_level, "=== SOLVING DECISION NODE\n");
 #else
-  used(indent_level);
+  PPL_USED(indent_level);
 #endif
   PPL_ASSERT(true_child != 0);
   Matrix context_true(context);
@@ -2370,7 +2370,7 @@ PIP_Solution_Node::solve(const PIP_Problem& pip,
 #ifdef NOISY_PIP_TREE_STRUCTURE
   indent_and_print(std::cerr, indent_level, "=== SOLVING NODE\n");
 #else
-  used(indent_level);
+  PPL_USED(indent_level);
 #endif
   // Reset current solution as invalid.
   solution_valid = false;
@@ -3158,7 +3158,7 @@ PIP_Solution_Node::generate_cut(const dimension_type index,
   std::cerr << std::setw(2 * indent_level) << ""
             << "Row " << index << " requires cut generation.\n";
 #else
-  used(indent_level);
+  PPL_USED(indent_level);
 #endif // #ifdef NOISY_PIP
 
   const dimension_type num_rows = tableau.t.num_rows();
@@ -3491,10 +3491,8 @@ PIP_Tree_Node::print(std::ostream& s, const int indent) const {
 
 void
 PIP_Tree_Node::print_tree(std::ostream& s, const int indent,
-                          const std::vector<bool>& pip_dim_is_param,
+                          const std::vector<bool>&,
                           dimension_type first_art_dim) const {
-  used(pip_dim_is_param);
-
   using namespace IO_Operators;
 
   // Print artificial parameters.
diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 7f261a2..495bc7a 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -134,12 +134,12 @@ fpu_inverse_rounding(Rounding_Dir dir) {
 
 inline void
 limit_precision(const float& v) {
-  cc_flush(v);
+  PPL_CC_FLUSH(v);
 }
 
 inline void
 limit_precision(const double& v) {
-  cc_flush(v);
+  PPL_CC_FLUSH(v);
 }
 
 inline void
diff --git a/src/compiler.hh b/src/compiler.hh
index 08017f6..578b83b 100644
--- a/src/compiler.hh
+++ b/src/compiler.hh
@@ -36,7 +36,7 @@ namespace Parma_Polyhedra_Library {
   the compiler.
 */
 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
-#define used(v) (void)(v)
+#define PPL_USED(v) (void)(v)
 
 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
 /*! \brief
@@ -46,12 +46,12 @@ namespace Parma_Polyhedra_Library {
 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
 template <typename T>
 inline void
-cc_flush(const T& x) {
+PPL_CC_FLUSH(const T& x) {
 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
   __asm__ __volatile__ ("" : "+m" (const_cast<T&>(x)));
 #else
   // FIXME: is it possible to achieve the same effect in a portable way?
-  used(x);
+  PPL_USED(x);
 #endif
 }
 




More information about the PPL-devel mailing list