prefetch

Keeps a cyclic buffer of size amount which is filled at the construction. After that, each popFront() is accompanied by fetching next element from the original range.

The function is useful when, for instance, range of Tasks is being decorated, because it allows to keep a certain amount of them being executed simultaneously, utilizing all CPU cores.

prefetch
(
Range
)
(
Range r
,
size_t amount
)

Meta