
On 20/12/2012 11:33, Tim Blechmann wrote:
* does boost.simd support horizontal operations (fold/reduce/accumulate)? The reduction toolbox provides vector horizontal operation. You can then run std::accumulate with a proper functor and have the simd_iterator kicks in and vectorize your large data reduction.
ok, but you might be able to use native simd instructions to do horizontal operations. for sse, i'm using this for providing the horizontal minimum for example:
We do have such horizontal operations. sum, prod, minimum, maximum, all, any, none, etc.
once the compiler decides to allocate the register type to the stack, one needs to care about stack alignment (compare [1]). i was hoping that the compiler will try to ensure the alignment automatically, but unfortunately it doesn't :/
Putting things on the stack with arbitrary alignment seems to work (at least according to our tests). Passing the thing in question to a function by value doesn't, however.