Thrust
|
#include <thrust/iterator/discard_iterator.h>
discard_iterator
is an iterator which represents a special kind of pointer that ignores values written to it upon dereference. This iterator is useful for ignoring the output of certain algorithms without wasting memory capacity or bandwidth. discard_iterator
may also be used to count the size of an algorithm's output which may not be known a priori.
The following code snippet demonstrates how to use discard_iterator
to ignore ignore one of the output ranges of reduce_by_key