[PPL-devel] [GIT] ppl/ppl(master): Added WEIGHT_BEGIN and corrected WEIGHT_ADD_MUL macro.
Enea Zaffanella
zaffanella at cs.unipr.it
Tue Jul 14 15:06:04 CEST 2009
Module: ppl/ppl
Branch: master
Commit: 80fe52b084cfc50201ef046506e8a967c546d288
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=80fe52b084cfc50201ef046506e8a967c546d288
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Tue Jul 14 15:05:11 2009 +0200
Added WEIGHT_BEGIN and corrected WEIGHT_ADD_MUL macro.
---
src/Box.templates.hh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/Box.templates.hh b/src/Box.templates.hh
index 76379b8..a43a74f 100644
--- a/src/Box.templates.hh
+++ b/src/Box.templates.hh
@@ -2607,17 +2607,19 @@ Box<ITV>
const Constraint_System::const_iterator cs_begin = cs.begin();
const Constraint_System::const_iterator cs_end = cs.end();
const dimension_type cs_size = std::distance(cs_begin, cs_end);
+ const dimension_type propagation_weight = cs_size * space_dim;
Sequence copy;
bool changed;
dimension_type num_iterations = 0;
do {
+ WEIGHT_BEGIN();
++num_iterations;
copy = seq;
for (Constraint_System::const_iterator i = cs_begin; i != cs_end; ++i)
propagate_constraint_no_check(*i);
- WEIGHT_ADD_MUL(cs_size, space_dim);
+ WEIGHT_ADD_MUL(1, propagation_weight);
// 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