[GIT] ppl/ppl(sparse_matrices): Weaken assertion in mixed Sparse-Dense linear_combine().
 
            Module: ppl/ppl Branch: sparse_matrices Commit: dbf14acfda9da1615f7eeb9ef2dd2e36a81511f4 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=dbf14acfda9da...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Tue Apr 17 16:16:23 2012 +0200
Weaken assertion in mixed Sparse-Dense linear_combine(). (Note: they can be called in Constraint_System::affine_preimage() with a second argument row with a smaller size than the first one; see e.g. test02() in tests/Concrete_Expression/polyhedron1.cc). a call in Constraint_System::affine_preimage()).
---
src/Sparse_Row.cc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Sparse_Row.cc b/src/Sparse_Row.cc index c5c63a6..e9fb379 100644 --- a/src/Sparse_Row.cc +++ b/src/Sparse_Row.cc @@ -761,7 +761,7 @@ void PPL::linear_combine(Sparse_Row& x, const Dense_Row& y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2) { - PPL_ASSERT(x.size() == y.size()); + PPL_ASSERT(x.size() >= y.size()); PPL_ASSERT(coeff1 != 0); PPL_ASSERT(coeff2 != 0);
@@ -930,7 +930,7 @@ void PPL::linear_combine(Dense_Row& x, const Sparse_Row& y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2) { - PPL_ASSERT(x.size() == y.size()); + PPL_ASSERT(x.size() >= y.size()); if (coeff1 == 1) { for (Sparse_Row::const_iterator i = y.begin(), i_end = y.end(); i != i_end; ++i) @@ -957,7 +957,7 @@ PPL::linear_combine(Dense_Row& x, const Sparse_Row& y, Coefficient_traits::const_reference coeff1, Coefficient_traits::const_reference coeff2, dimension_type start, dimension_type end) { - PPL_ASSERT(x.size() == y.size()); + PPL_ASSERT(x.size() >= y.size()); PPL_ASSERT(coeff1 != 0); PPL_ASSERT(coeff2 != 0);
participants (1)
- 
                 Enea Zaffanella Enea Zaffanella