Subject: Re: [boost] Accelerating algorithms with SIMD - Segmented iterators and alternatives
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-10-13 06:20:25
On 13/10/10 00:15, David Sankel wrote:
> Please please please, if you're going to attempt a better alternative for
> iterators, read "The essence of the Iterator pattern"  (or  for an
> updated version) and the important work on idioms 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
>  http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103.7480
>  http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf
>  http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.100.22
This is interesting in essence, but I fear it abstracts too much into
lambda land. (to the point where I don't understand it, but that's
another problem ;))
From a glimpse at your paper, the advantages of your approach over a
monadic map (which is what I take to be the most similar thing to a fold
in C++, since C++ has side effects) is that it allows composition, and
doesn't need two symmetric definitions to traverse the data both ways.
Is that correct?
Unfortunately I do no understand how one would use this in C++. The
approach seems a bit similar to continuations, unless I'm completely out
I have already suggested using coroutines to make the iteration more
flexible, but it comes with a runtime cost (context switching).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk