Intel® oneAPI Threading Building Blocks Developer Guide and API Reference
ParallelForEachBody
[req.parallel_for_each_body]
A type Body satisfies ParallelForEachBody if it meets the Function Objects requirements described in the [function.objects] section of the ISO C++ standard, as well as meets exactly one of the following two alternative requirements for operator():
ParallelForEachBody Requirements: Pseudo-Signature, Semantics
Alternative 1:
voidBody::operator()(ReferenceTypeitem)const
Process the received item.
Alternative 2:
voidBody::operator()(ReferenceTypeitem, oneapi::tbb::feeder<ItemType>&feeder)const
voidBody::operator()(ItemType&&item, oneapi::tbb::feeder<ItemType>&feeder)const
Process the received item. May invoke the feeder.add function to spawn additional items. The Body::operator() must accept both ReferenceType and ItemType&& values as the first argument.
where
ItemType is std::iterator_traits<Iterator>::value_type for the type of the iterator the parallel_for_each algorithm operates with, and
ReferenceType is std::iterator_traits<Iterator>::reference if the iterator type is a forward iterator as described in the [forward.iterators] section of the ISO C++ Standard,
otherwise, ReferenceType is ItemType&&.
See also: