0

STXXL supports a streaming model of data processing. STXXL data can either be processed by iterating through it (e.g. using stxxl::for_each), or by converting to a stream mode (e.g. using streamify() where such stream transforms can be composed for efficient processing. The stream results can be converted back to iterators using materialize().

I have a bunch of stream transforms, that I want to apply to an input stream. However, I do not need to store the result in any output "container".
What I need is a materialize-like function that just drives the stream without taking any output iterators - essentially like stxxl::for_each.
Is there such a similar function in STXXL?

Naturally, I can write custom "do-nothing"-output-iterators and pass these to materialize(), but I am wondering if there is a more elegant solution.

4

1 回答 1

1

stxxl::stream::discard。它需要一个流并丢弃结果。

于 2015-11-02T18:21:56.970 回答