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:
-
void Body::operator()(ReferenceType item) const#
Process the received item.
Alternative 2:
-
void Body::operator()(ReferenceType item, oneapi::tbb::feeder<ItemType> &feeder) const#
-
void Body::operator()(ItemType &&item, oneapi::tbb::feeder<ItemType> &feeder) const#
Process the received item. May invoke the
feeder.addfunction to spawn additional items. TheBody::operator()must accept bothReferenceTypeandItemType&&values as the first argument.
where
ItemTypeisstd::iterator_traits<Iterator>::value_typefor the type of the iterator theparallel_for_eachalgorithm operates with, andReferenceTypeisstd::iterator_traits<Iterator>::referenceif the iterator type is a forward iterator as described in the [forward.iterators] section of the ISO C++ Standard,otherwise,
ReferenceTypeisItemType&&.
Note
The usual rules for pseudo-signatures apply.
Therefore, Body::operator() may optionally take items by value or by const reference.
See also: