Boost logo

Boost :

Subject: Re: [boost] Boost SIMD beta release
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-12-20 06:34:48


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk