A type Body satisfies the ParallelForBody if it meet the Function Objects requirements from [function.objects] ISO C++ Standard section. Also it should 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
feeder.add(T)function to spawn the 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 ISO C++ [utility.arg.requirements] section.
If the type is not CopyConstructibe, there are additional usage restrictions:
Body::operator()accepts its argument by value, or if the
InputIteratortype from parallel_for_each algorithm does not also satisfy the Forward Iterator requirements from [forward.iterators] ISO C++ Standard section, then dereferencing an
InputIteratormust produce an rvalue reference.
Additional work items should be passed to the feeder as rvalues, for example via the