thrust icon indicating copy to clipboard operation
thrust copied to clipboard

Use testing iterator wrappers to ensure that algorithms support their stated requirements

Open jaredhoberock opened this issue 13 years ago • 2 comments

Since InputIterators can't be dereferenced multiple times we shouldn't implement algorithms like copy_if(first, last, output, pred) with copy_if(first, last, first, output, pred).

In general the unit tests should check InputIterator semantic correctness.

Forwarded from http://code.google.com/p/thrust/issues/detail?id=419

jaredhoberock avatar May 07 '12 20:05 jaredhoberock

This will require that #902 is addressed first.

alliepiper avatar May 05 '22 22:05 alliepiper

@upsj added an implementation of a forward_iterator_wrapper in #1619 that restricts an iterator's API to match the forward iterator concept. It ended up getting reverted due to #902, but remains in the git history and may be useful as a starting point for this enhancement.

alliepiper avatar May 06 '22 16:05 alliepiper