[PPL-devel] [GIT] ppl/ppl(master): Use less simplistic weights.
Roberto Bagnara
bagnara at cs.unipr.it
Mon Jul 13 21:49:12 CEST 2009
Module: ppl/ppl
Branch: master
Commit: 30c4076e092bff1bab33c1cf121f1100f1d73866
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=30c4076e092bff1bab33c1cf121f1100f1d73866
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Mon Jul 13 21:48:50 2009 +0200
Use less simplistic weights.
---
src/conversion.cc | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/conversion.cc b/src/conversion.cc
index 13cd87e..1d8a373 100644
--- a/src/conversion.cc
+++ b/src/conversion.cc
@@ -409,7 +409,7 @@ PPL::Polyhedron::conversion(Linear_System& source,
if (scalar_prod[index_non_zero] != 0)
// The generator does not saturate the constraint.
break;
- WEIGHT_ADD(1);
+ WEIGHT_ADD(source_num_columns);
// Check if the client has requested abandoning all expensive
// computations. If so, the exception specified by the client
// is thrown now.
@@ -417,7 +417,7 @@ PPL::Polyhedron::conversion(Linear_System& source,
}
for (dimension_type i = index_non_zero + 1; i < dest_num_rows; ++i) {
Scalar_Products::assign(scalar_prod[i], source_k, dest[i]);
- WEIGHT_ADD(1);
+ WEIGHT_ADD(source_num_columns);
// Check if the client has requested abandoning all expensive
// computations. If so, the exception specified by the client
// is thrown now.
@@ -538,8 +538,8 @@ PPL::Polyhedron::conversion(Linear_System& source,
dest_i.strong_normalize();
scalar_prod[i] = 0;
// `dest' has already been set as non-sorted.
+ WEIGHT_ADD_MUL(4, dest_num_columns);
}
- WEIGHT_ADD(1);
// Check if the client has requested abandoning all expensive
// computations. If so, the exception specified by the client
// is thrown now.
@@ -711,6 +711,8 @@ PPL::Polyhedron::conversion(Linear_System& source,
redundant = true;
break;
}
+ assert(bound >= num_lines_or_equalities);
+ WEIGHT_ADD(bound - num_lines_or_equalities);
if (!redundant) {
// Adding the new ray to `dest' and the corresponding
// saturation row to `sat'.
@@ -756,10 +758,10 @@ PPL::Polyhedron::conversion(Linear_System& source,
scalar_prod[dest_num_rows] = Coefficient_zero();
// Increment the number of generators.
++dest_num_rows;
- }
+ WEIGHT_ADD_MUL(4, dest_num_columns);
+ } // if (!redundant)
}
}
- WEIGHT_ADD(1);
// Check if the client has requested abandoning all expensive
// computations. If so, the exception specified by the client
// is thrown now.
More information about the PPL-devel
mailing list