Combining¶
The member functions in this section iterate across the entire container sequentially in the calling thread.
-
template<typename
BinaryFunc
>
Tcombine
(BinaryFunc f)¶ Requires: A
BinaryFunc
must meet the Function Objects requirements from the [function.objects] ISO C++ Standard section. Specifically, the type should be an associative binary functor with the signatureT BinaryFunc(T,T)
orT BinaryFunc(const T&,const T&)
. AT
type must be the same as a corresponding template parameter forenumerable_thread_specific
object.Effects: Computes reduction over all elements using binary functor
f
. If there are no elements, creates the result using the same rules as for creating a thread-local element.Returns: Result of the reduction.
-
template<typename
UnaryFunc
>
voidcombine_each
(UnaryFunc f)¶ Requires: An
UnaryFunc
must meet the Function Objects requirements from the [function.objects] ISO C++ Standard section. Specifically, the type should be an unary functor with one of signatures:void UnaryFunc(T)
,void UnaryFunc(T&)
, orvoid UnaryFunc(const T&)
AT
type must be the same as a corresponding template parameter for theenumerable_thread_specific
object.Effects: Evaluates
f(x)
for each instancex
ofT
in*this
.