Evaluator/ReductionEvaluator.h question

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Tue Feb 18 10:47:09 UTC 2003


Hi!

Why is the result of ReductionEvaluator<>::evaluate() initialized
to Expr.read(0) and op never applied to it? This seems to be wrong,
f.i. if the operation is

 void op(double &res, double val)
 {
   double tmp = std::sqrt(val);
   if (tmp > res)
      res = tmp;
 }

It seems to be more natural to just use the "current" value of ret
for initialization of answer, so an appropriate starting value can
be provided by the users.

Was there any reason in the current implementation?

Thanks for clarifying,

Richard.

--
Richard Guenther <richard.guenther at uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/




More information about the pooma-dev mailing list