[pooma-dev] [PATCH] Reduction cleanup (2nd try)
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Mon Oct 27 12:50:19 UTC 2003
On Sun, 26 Oct 2003, Richard Guenther wrote:
> Hi!
>
> The following patch cleans up the reduction evaluator by introducing
> a ReductionTraits<Op, T> class to specify a neutral element for the
> reduction operation. This enables "trivial" OpenMP parallelization for
> reductions (patch to come). It also simplifies the loop structure of
> the reductions and thus exposes more optimization abilities to the
> compiler. This second approach does not inhibit use of arbitrary complex
> types, but only requires appropriate specialization of the
> ReductionTraits. In question is only the default specialization for
> OpBitwiseOrAssign and OpBitwiseAndAssign which constructs from 0ULL and
> ~0ULL - any better ideas?
>
> Reductions tested on ppc, full test tomorrow.
Tested on ia32 with no regressions.
There are no measurable performance improvements (just checked
benchmarks/Solver/Krylov which is the only bench doing reductions), but
the generated code "looks" better (one comparison less in the outer
loop in case of 2d reduction). Also there is a slight decrease in code
size.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the pooma-dev
mailing list