[PPL-devel] [GIT] ppl/ppl(sparse_matrices): CO_Tree: add assertion in rebalance().

Marco Poletti poletti.marco at gmail.com
Fri May 7 14:02:12 CEST 2010


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

Author: Marco Poletti <poletti.marco at gmail.com>
Date:   Fri May  7 14:01:38 2010 +0200

CO_Tree: add assertion in rebalance().

---

 src/CO_Tree.cc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/CO_Tree.cc b/src/CO_Tree.cc
index b749767..fc73bf9 100644
--- a/src/CO_Tree.cc
+++ b/src/CO_Tree.cc
@@ -555,6 +555,7 @@ PPL::CO_Tree::rebalance(inorder_iterator& itr, dimension_type key,
     ++subtree_size;
     ++height;
     --itr_depth_minus_1;
+    PPL_ASSERT(itr.depth() - 1 == itr_depth_minus_1);
     density = subtree_size / (float) (((dimension_type)1 << height) - 1);
   };
 




More information about the PPL-devel mailing list