33#ifndef _GLIBCXX_PARALLEL_FIND_SELECTORS_H
34#define _GLIBCXX_PARALLEL_FIND_SELECTORS_H 1
57 template<
typename _RAIter1,
typename _RAIter2,
61 {
return __pred(*__i1); }
69 template<
typename _RAIter1,
typename _RAIter2,
74 _RAIter2 __begin2, _Pred __pred)
75 {
return std::make_pair(find_if(__begin1, __end1, __pred,
87 template<
typename _RAIter1,
typename _RAIter2,
93 return __pred(*__i1, *(__i1 + 1));
102 template<
typename _RAIter1,
typename _RAIter2,
107 _RAIter2 __begin2, _Pred __pred)
110 _RAIter1 __spot = adjacent_find(__begin1, __end1 + 1,
112 if (__spot == (__end1 + 1))
114 return std::make_pair(__spot, __begin2);
127 template<
typename _RAIter1,
typename _RAIter2,
131 {
return !__pred(*__i1, *__i2); }
140 template<
typename _RAIter1,
typename _RAIter2,
145 _RAIter2 __begin2, _Pred __pred)
146 {
return mismatch(__begin1, __end1, __begin2,
152 template<
typename _FIterator>
160 : _M_begin(__begin), _M_end(__end) { }
166 template<
typename _RAIter1,
typename _RAIter2,
171 for (_FIterator __pos_in_candidates = _M_begin;
172 __pos_in_candidates != _M_end; ++__pos_in_candidates)
173 if (__pred(*__i1, *__pos_in_candidates))
183 template<
typename _RAIter1,
typename _RAIter2,
188 _RAIter2 __begin2, _Pred __pred)
190 return std::make_pair(find_first_of(__begin1, __end1,
191 _M_begin, _M_end, __pred,
Tags for compile-time selection. This file is a GNU parallel extension to the Standard C++ Library.
Includes the original header files concerned with iterators except for stream iterators....
GNU parallel code for public use.
Struct holding two objects of arbitrary type.
Base class of all __gnu_parallel::__find_template selectors.
Test predicate on a single element, used for std::find() and std::find_if ().
std::pair< _RAIter1, _RAIter2 > _M_sequential_algorithm(_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _Pred __pred)
Corresponding sequential algorithm on a sequence.
bool operator()(_RAIter1 __i1, _RAIter2 __i2, _Pred __pred)
Test on one position.
Test predicate on two adjacent elements.
std::pair< _RAIter1, _RAIter2 > _M_sequential_algorithm(_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _Pred __pred)
Corresponding sequential algorithm on a sequence.
bool operator()(_RAIter1 __i1, _RAIter2 __i2, _Pred __pred)
Test on one position.
Test inverted predicate on a single element.
bool operator()(_RAIter1 __i1, _RAIter2 __i2, _Pred __pred)
Test on one position.
std::pair< _RAIter1, _RAIter2 > _M_sequential_algorithm(_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _Pred __pred)
Corresponding sequential algorithm on a sequence.
Test predicate on several elements.
std::pair< _RAIter1, _RAIter2 > _M_sequential_algorithm(_RAIter1 __begin1, _RAIter1 __end1, _RAIter2 __begin2, _Pred __pred)
Corresponding sequential algorithm on a sequence.
bool operator()(_RAIter1 __i1, _RAIter2 __i2, _Pred __pred)
Test on one position.
Forces sequential execution at compile time.