Subject: Re: [boost] Boost SIMD beta release
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-12-20 13:21:54
On 20/12/12 18:34, Peter Dimov wrote:
>> We're rolling a beta release of Boost.SIMD along with a beta release
>> of NT2.
> What is the recommended Boost.SIMD way to write a function like
> void add_n( float const * s, float const * s2, float * d, size_t n );
> // d[i] = s[i] + s2[i]
> where none of s, s2, d are guaranteed to be aligned?
I don't think there is any easy way. Either you use unaligned
loads/stores for all but one variable, or you generate all variants
depending on how disaligned each pointer is compared to each other and
select the optimal variant at runtime.
I'd recommend to go the unaligned_load + store route for simplicity.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk