Combining#
The member functions in this section iterate across the entire container sequentially in the calling thread.
- 
template<typename BinaryFunc>
T combine(BinaryFunc f)# Requires: A
BinaryFuncmust meet the Function Objects requirements described in the [function.objects] section of the ISO C++ standard. Specifically, the type should be an associative binary functor with the signatureT BinaryFunc(T,T)orT BinaryFunc(const T&,const T&). ATtype must be the same as a corresponding template parameter forenumerable_thread_specificobject.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>
void combine_each(UnaryFunc f)# Requires: An
UnaryFuncmust meet the Function Objects requirements described in the [function.objects] section of the ISO C++ standard. Specifically, the type should be an unary functor with one of signatures:void UnaryFunc(T),void UnaryFunc(T&), orvoid UnaryFunc(const T&)ATtype must be the same as a corresponding template parameter for theenumerable_thread_specificobject.Effects: Evaluates
f(x)for each instancexofTin*this.