Boost logo

Boost :

Subject: Re: [boost] Boost SIMD beta release
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-12-21 13:48:26


on Fri Dec 21 2012, Mathias Gaunard <mathias.gaunard-AT-ens-lyon.org> wrote:

> On 20/12/2012 20:34, Dave Abrahams wrote:
>
>> Yes; there's a runtime test.
>
> Let's put a runtime test at every step of our critical loop, sounds
> like a good idea.

Uh, no. You do a runtime test at the beginning of the algorithm. But
if you read Matt's paper, I presume you know that already. So either
you're just taking the opportunity to be snarky, or you don't understand
what I'm suggesting, or you're holding onto some important insight that
I'd need in order to understand something you already do.

> I actually somewhat looked into this, and in this case segmented
> iterators don't allow any optimization compared to normal iterators.

Don't worry, I hear you loud and clear saying that it doesn't work. You
haven't, though, done anything to help me understand why you're saying
that.

> Also, since this clearly cannot work with heterogeneous scalar/simd
> sequences, the iterator would need to fill the remaining data with
> dummy values to fill vectors on the boundaries, dummy value which must
> change according to what the user needs.

I don't know what you mean.

> Polymorphic algorithms ended up being a significantly more interesting
> approach.

Nor here.

>> 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.
>
> I'm afraid you're the one trying to make everything fit into this
> model you've somehow taken a liking to.

Wow, strong words. I'm not that invested in this debate. It just
seems like an obvious fit to me, but I'm hardly a SIMD expert.

> If you'd like to claim that it can apply, then feel free to show how.

I don't have time to write the code out ATM. It seems to me that once
you impose a hierarchical "SIMD" view over the sequence, you can
specialize the algorithm for the aligned part, to use SIMD instructions.
Maybe I'm overlooking something, but so far you haven't been very
helpful in the understanding-what-I'm-missing department.

-- 
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