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>
235 : __begin1_iterator(__b1), __begin2_iterator(__b2) { }
241 template<
typename _Op>
245 typename std::iterator_traits<_It>::difference_type __position
247 return __mult(*__current, *(__begin2_iterator + __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.
_It operator()(_Op __o, _It __i)
Functor execution.
GNU parallel code for public use.
bool operator()(_Op &__o, _It __i)
Functor execution.
std::transform() __selector, two input sequences variant.
bool operator()(_ValueType &__v, _It __i)
Functor execution.
Generic __selector for embarrassingly parallel functions.
const _Tp & __new_val
Value to replace with.
Selector that returns the difference between two adjacent __elements.
bool operator()(_Op &__o, _It __i)
Functor execution.
bool operator()(_Op &__o, _It __i)
Functor execution.
bool operator()(_Op &__o, _It __i)
Functor execution.
_It2 __begin2_iterator
Begin iterator of second sequence.
__replace_selector(const _Tp &__new_val)
Constructor.
_Tp operator()(_Op __mult, _It __current)
Functor execution.
void operator()(_It __i)
Functor execution.
_Diff operator()(_ValueType &__v, _It __i)
Functor execution.
std::accumulate() selector.
_It __begin1_iterator
Begin iterator of first sequence.
bool operator()(_Op &__o, _It __i)
Functor execution.
std::iterator_traits< _It >::value_type operator()(_Op __o, _It __i)
Functor execution.
std::inner_product() selector.
__inner_product_selector(_It __b1, _It2 __b2)
Constructor.
__replace_if_selector(const _Tp &__new_val)
Constructor.
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.
std::generate() selector.
General reduction, using a binary operator.
Selector that just returns the passed iterator.
bool operator()(_Tp &__v, _It __i)
Functor execution.
Reduction for finding the maximum element, using a comparator.
const _Tp & __new_val
Value to replace with.
std::count_if () selector.
_It _M_finish_iterator
_Iterator on last element processed; needed for some algorithms (e. g. std::transform()).
std::for_each() selector.
std::transform() __selector, one input sequence variant.
Reduction function doing nothing.