
On 15/10/2010 04:48, David Abrahams wrote:
At Thu, 14 Oct 2010 20:00:15 +0100, Mathias Gaunard wrote:
On 13/10/10 18:50, David Abrahams wrote:
I think you mean
1 2 | 3 4 5 6 | 7 8 9 10 | 11
What is that nonsense supposed to be?
I fear this conversation is becoming uncivil.
Sorry, I just couldn't make sense of what this is supposed to be, and used bad phrasing. What would the value type of that range be?
That's what "if" statements are for.
We want to avoid these.
I think they do. However, you might find that you need some dynamic dispatching to get it to work. In other words,
if (operating on complete segment) SIMD algorithm else elementwise algorithm
Therefore they do not allow to avoid the inefficiency, and they are no different from standard iterators in that respect.
Yes, they are different, because you don't need to do that test at the lowest level, for each element. That test would only be done at the segment level.
How so? The way I see if, I would need that if at every increment.
Unless you process the uneven end bits with non-SIMD code.
I would quite like a provide a way to do this. A range, however, must be homogeneous, and have all its elements be the same type, so it's either a scalar or a vector, can't be both.