A type Body satisfies ParallelForBody if it meets the Function Objects requirements from the [function.objects] ISO C++ Standard section. It should also meet one of the following requirements:
ParallelForEachBody Requirements: Pseudo-Signature, Semantics
operator()(ItemType item) const¶
Process the received item.
operator()(ItemType item, tbb::feeder<ItemType> &feeder) const¶
Process the received item. May invoke the
feeder.add(T)function to spawn additional items.
ItemType may be optionally passed to
Body::operator() by reference.
volatile type qualifiers are also applicable.
The argument type
ItemType should either satisfy the CopyConstructibe, MoveConstructibe or
both requirements from the ISO C++ [utility.arg.requirements] section.
If the type is not CopyConstructibe, there are additional usage restrictions:
Body::operator()accepts an argument by value, or if the
InputIteratortype from parallel_for_each algorithm does not satisfy the Forward Iterator requirements from the [forward.iterators] ISO C++ Standard section, dereferencing an
InputIteratormust produce an rvalue reference.
Additional work items should be passed to the feeder as rvalues, for example, via the