33 #ifndef _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H 34 #define _GLIBCXX_PARALLEL_FOR_EACH_SELECTORS_H 1 41 template<
typename _It>
51 template<
typename _It>
57 template<
typename _Op>
67 template<
typename _It>
73 template<
typename _Op>
83 template<
typename _It>
89 template<
typename _ValueType>
99 template<
typename _It>
105 template<
typename _Op>
109 *__i.second = __o(*__i.first);
115 template<
typename _It>
121 template<
typename _Op>
125 *__i._M_third = __o(*__i._M_first, *__i._M_second);
131 template<
typename _It,
typename _Tp>
155 template<
typename _It,
typename _Op,
typename _Tp>
179 template<
typename _It,
typename _Diff>
186 template<
typename _ValueType>
189 {
return (__v == *__i) ? 1 : 0; }
193 template<
typename _It,
typename _Diff>
200 template<
typename _Op>
203 {
return (__o(*__i)) ? 1 : 0; }
207 template<
typename _It>
214 template<
typename _Op>
215 typename std::iterator_traits<_It>::value_type
221 template<
typename _It,
typename _It2,
typename _Tp>
241 template<
typename _Op>
245 typename std::iterator_traits<_It>::difference_type __position
252 template<
typename _It>
259 template<
typename _Op>
268 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);
292 template<
typename _It>
301 operator()(
bool,
bool)
const 306 template<
typename _Compare,
typename _It>
315 operator()(_It __x, _It __y)
316 {
return (__comp(*__x, *__y)) ? __x : __y; }
320 template<
typename _Compare,
typename _It>
329 operator()(_It __x, _It __y)
330 {
return (__comp(*__x, *__y)) ? __y : __x; }
334 template<
typename _BinOp>
342 template<
typename _Result,
typename _Addend>
344 operator()(
const _Result& __x,
const _Addend& __y)
345 {
return __binop(__x, __y); }
Reduction for finding the maximum element, using a comparator.
std::for_each() selector.
_Tp operator()(_Op __mult, _It __current)
Functor execution.
std::count_if () selector.
std::iterator_traits< _It >::value_type operator()(_Op __o, _It __i)
Functor execution.
_Diff operator()(_ValueType &__v, _It __i)
Functor execution.
bool operator()(_Op &__o, _It __i)
Functor execution.
Generic __selector for embarrassingly parallel functions.
std::inner_product() selector.
_It _M_finish_iterator
_Iterator on last element processed; needed for some algorithms (e. g. std::transform()).
_It operator()(_Op __o, _It __i)
Functor execution.
std::transform() __selector, two input sequences variant.
Reduction for finding the maximum element, using a comparator.
bool operator()(_Op &__o, _It __i)
Functor execution.
Selector that returns the difference between two adjacent __elements.
bool operator()(_Op &__o, _It __i)
Functor execution.
bool operator()(_Tp &__v, _It __i)
Functor execution.
std::accumulate() selector.
__replace_selector(const _Tp &__new_val)
Constructor.
General reduction, using a binary operator.
bool operator()(_ValueType &__v, _It __i)
Functor execution.
bool operator()(_Op &__o, _It __i)
Functor execution.
Reduction function doing nothing.
GNU parallel code for public use.
_It __begin1_iterator
Begin iterator of first sequence.
Includes the original header files concerned with iterators except for stream iterators. This file is a GNU parallel extension to the Standard C++ Library.
_Diff operator()(_Op &__o, _It __i)
Functor execution.
__inner_product_selector(_It __b1, _It2 __b2)
Constructor.
std::generate() selector.
const _Tp & __new_val
Value to replace with.
void operator()(_It __i)
Functor execution.
_It2 __begin2_iterator
Begin iterator of second sequence.
bool operator()(_Op &__o, _It __i)
Functor execution.
const _Tp & __new_val
Value to replace with.
Selector that just returns the passed iterator.
__replace_if_selector(const _Tp &__new_val)
Constructor.
std::transform() __selector, one input sequence variant.