MetaScale/nt2 — pull request #506 by jfalcou (2013-08-03 09:38:06+00:00)
Title: Fix #477 - Reimplement splatted/non-splatted reduction properly

- Added generic all_reduce function and tests:
all_reduce implements a butterfly reduction/broadcast algorithm
using shuffle and any generic binary operator. This can be done
generically on all SIMD extensions. In emulation mode, we still
go by a recursive fold over vector elements to limit the number
of useless MOVs.

- Fixed sum/splatted_sum and tests:
(S)SSE3 version have been removed as it was suboptimal.
Reported benchmark goes from 2.8 to 1.9 cycles/points.

- Fixed prod,minimum,maximum and splatted_ functions and tests:
All are implemented as a call to all_reduce + a value extraction.

- Fixed reduction/all_reduction for complex and dry:
dry support is only required explicitly as complex is now catched
automatically by the common SIMD version. dry version use a back
and forth bitwise-cast implementation.

- Removed useless files

Next to this and to have all_reduce working in all cases, the following changes
impact shuffle:
- Added support for complex shuffle by simply shuffling real and imaginary parts.
- Added support for logical shuffle by bitwise_casting back and forth.
- Fixed shuffle on SSSE3 for real to use normal SSE2 shuffle for performance reasons

Finally, some files in core/ have been amended because they lacked either some
include paths or explicit qualification on 4.4.