Boost logo

Boost :

Subject: Re: [boost] Accelerating algorithms with SIMD - Segmented iterators and alternatives
From: David Sankel (camior_at_[hidden])
Date: 2010-10-12 19:15:15


On Tue, Oct 12, 2010 at 4:06 AM, David Abrahams <dave_at_[hidden]> wrote:

> At Mon, 11 Oct 2010 22:50:29 +0100,
> Mathias Gaunard wrote:
> >
> > On 11/10/2010 16:37, David Abrahams wrote:
> >
> > >> and ideas about whether there is sufficient interest in the
> > >> alternative to iterators for me to develop them. The intent would
> > >> be to submit both the alternative to iterators and the SIMD helpers
> > >> to Boost.
> > >
> > > Now that your misconceptions about segmented iterators are cleared up,
> > > could you give a brief rundown of your alternative and its advantages?
> > > If all I have to do is read your earlier post and ignore claims of
> > > broken compatibility, just say so, but I don't want to waste time
> > > trying to decipher it if it's substantially wrong.
> >
> > Here, I will only be talking of the full generator I described in that
> > other thread, not the step one.
> >
> > It's push instead of pull, basically.
> >
> > - It's a very simple, easy-to-grasp concept, it's basically just
> > allowing ranges to define their own for_each (I use an output iterator
> > in my example, but it's not really different from a function object)
>
> Nice for very linear things. Not so great for sort, binary_search,
> reverse, rotate, ...
>

Please please please, if you're going to attempt a better alternative for
iterators, read "The essence of the Iterator pattern" [1] (or [2] for an
updated version) and the important work on idioms[3] that it references. I
wish I had more time to spend on this effort, but needless to say the tough
semantic work has already been done!

Thanks David A. for pointing out there was a semantics discussion going on
here.

David

[1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.7480
[2] http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf
[3] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.100.22

-- 
David Sankel
Sankel Software
www.sankelsoftware.com

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