Subject: Re: [boost] Boost SIMD beta release
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-12-20 14:34:55
on Thu Dec 20 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
> On 20/12/12 19:42, Dave Abrahams wrote:
>> on Thu Dec 20 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:
>>> On 20/12/12 19:12, Dave Abrahams wrote:
>>>> on Thu Dec 20 2012, Joel Falcou <joel.falcou-AT-gmail.com> wrote:
>>>>> Maybe we should have a simd::unaligned_input_iterator and/or make
>>>>> simd::transform accept non aligned data. Note that on any pre-Nehalem
>>>>> CPU, the unaligned load will be horrendsously slow.
>>>> It's probably a bit late to bring this up, but did you consider a design
>>>> that uses something like Matt Austern's segmented iterator concept
>>>> (http://lafstern.org/matt/segmented.pdf) and imposes a hierarchical view
>>>> over regular memory that segments on aligned memory regions?
>>> The code needs to be the same for all segments in that model, unless
>>> I've missed something.
>> I don't understand exactly what you mean, nor what problem you see with
>> that model.
> This model is good for B-trees and other similar things.
...like deques, circular buffers, blocked arrays, etc.
> I don't see how this can apply here at all.
> We need to iterate, load and store our data differently depending on
> the segment.
Yes, incomplete end segments are dealt with differently. Did you have
something else in mind?
> We even have different types to manipulate on each of them. In the
> segmented iterator model, all sibling iterators must be the same type,
> and therefore have the same code.
Yes; there's a runtime test.
> The only reasonable thing to do would be to return a fusion sequence
> of ranges, and have algorithms deal with that. Even this still has a
> bit of overhead over a hand-written loop structure.
I'm afraid you have not been specific enough about the problem you claim
to see for me to be able to evaluate whether it exists or not.
-- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk