Boost logo

Boost :

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" [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]
> [2]
> [3]

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
of it?
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, gregod at, cpdaniel at, john at