33 #ifndef _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H
34 #define _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H 1
91 template<
typename Val>
101 template<
typename It>
107 template<
typename Op>
111 *i.second = o(*i.first);
117 template<
typename It>
123 template<
typename Op>
127 *i.third = o(*i.first, *i.second);
133 template<
typename It,
typename T>
157 template<
typename It,
typename Op,
typename T>
181 template<
typename It,
typename Diff>
188 template<
typename Val>
191 {
return (v == *i) ? 1 : 0; }
195 template<
typename It,
typename Diff>
202 template<
typename Op>
205 {
return (o(*i)) ? 1 : 0; }
209 template<
typename It>
216 template<
typename Op>
217 typename std::iterator_traits<It>::value_type
operator()(Op o, It i)
222 template<
typename It,
typename It2,
typename T>
236 : begin1_iterator(b1), begin2_iterator(b2) { }
242 template<
typename Op>
246 typename std::iterator_traits<It>::difference_type position
248 return mult(*current, *(begin2_iterator + position));
253 template<
typename It>
260 template<
typename Op>
269 template<
typename It>
272 template<
typename Op>
274 operator()(Op& o, It i)
276 typename It::first_type go_back_one = i.first;
278 *i.second = o(*i.first, *go_back_one);
293 template<
typename It>
302 operator()(
bool ,
bool )
const
307 template<
typename Comp,
typename It>
316 operator()(It x, It y)
326 template<
typename Comp,
typename It>
335 operator()(It x, It y)
345 template<
typename BinOp>
353 template<
typename Result,
typename Addend>
355 operator()(
const Result& x,
const Addend& y)
356 {
return binop(x, y); }
std::iterator_traits< It >::value_type operator()(Op o, It i)
Functor execution.
void operator()(It i)
Functor execution.
It operator()(Op o, It i)
Functor execution.
std::transform() selector, one input sequence variant.
bool operator()(T &v, It i)
Functor execution.
Selector that returns the difference between two adjacent elements.
replace_selector(const T &new_val)
Constructor.
std::generate() selector.
GNU parallel code for public use.
bool operator()(Val &v, It i)
Functor execution.
It2 begin2_iterator
Begin iterator of second sequence.
std::inner_product() selector.
std::accumulate() selector.
inner_product_selector(It b1, It2 b2)
Constructor.
bool operator()(Op &o, It i)
Functor execution.
Reduction for finding the maximum element, using a comparator.
std::for_each() selector.
replace_if_selector(const T &new_val)
Constructor.
It begin1_iterator
Begin iterator of first sequence.
const T & new_val
Value to replace with.
bool operator()(Op &o, It i)
Functor execution.
Diff operator()(Op &o, It i)
Functor execution.
Reduction for finding the maximum element, using a comparator.
std::count_if () selector.
const T & new_val
Value to replace with.
Generic selector for embarrassingly parallel functions.
T operator()(Op mult, It current)
Functor execution.
Reduction function doing nothing.
Includes the original header files concerned with iterators except for stream iterators. This file is a GNU parallel extension to the Standard C++ Library.
General reduction, using a binary operator.
Selector that just returns the passed iterator.
bool operator()(Op &o, It i)
Functor execution.
It finish_iterator
Iterator on last element processed; needed for some algorithms (e. g. std::transform()).
Diff operator()(Val &v, It i)
Functor execution.
bool operator()(Op &o, It i)
Functor execution.
bool operator()(Op &o, It i)
Functor execution.
std::transform() selector, two input sequences variant.