Closed GoogleCodeExporter closed 9 years ago
fill_by_count may be a better name as this is a generalization of fill_n
template<typename InputIterator1,
typename InputIterator2,
typename OutputIterator>
OutputIterator fill_by_count(counts_first, counts_last, values_first, result);
The semantics would be as if it were implemented as
for(; counts_first != counts_last; ++counts_first, ++values_first)
{
result = fill_n(result, *counts_first, *values_first);
}
return result;
Original comment by jaredhoberock
on 7 Feb 2012 at 8:36
Yes, fill_by_count is better because it connotes the fact that the counts
should be non-negative integers. Here's a parallel implementation:
http://code.google.com/p/thrust/source/browse/examples/expand.cu
Original comment by wnbell
on 12 Feb 2012 at 7:41
Forwarded from https://github.com/thrust/thrust/issues/59
Original comment by jaredhoberock
on 7 May 2012 at 9:02
Original issue reported on code.google.com by
wnbell
on 7 Feb 2012 at 8:03