Merged with mainline at revision 128810.
[official-gcc.git] / libstdc++-v3 / include / parallel / algorithmfwd.h
blob319091904cd767ed15bd373715966700a53081f2
1 // <algorithm> parallel extensions -*- C++ -*-
3 // Copyright (C) 2007 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 2, or (at your option) any later
9 // version.
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this library; see the file COPYING. If not, write to
18 // the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19 // MA 02111-1307, USA.
21 // As a special exception, you may use this file as part of a free
22 // software library without restriction. Specifically, if other files
23 // instantiate templates or use macros or inline functions from this
24 // file, or you compile this file and link it with other files to
25 // produce an executable, this file does not by itself cause the
26 // resulting executable to be covered by the GNU General Public
27 // License. This exception does not however invalidate any other
28 // reasons why the executable file might be covered by the GNU General
29 // Public License.
31 /** @file parallel/algorithmfwd.h
32 * This file is a GNU parallel extension to the Standard C++ Library.
35 #ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H
36 #define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1
38 #pragma GCC system_header
40 #include <parallel/tags.h>
41 #include <parallel/settings.h>
43 namespace std
45 namespace __parallel
47 template<typename _FIter>
48 inline _FIter
49 adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag);
51 template<typename _FIter, typename BinaryPredicate>
52 inline _FIter
53 adjacent_find(_FIter, _FIter, BinaryPredicate, __gnu_parallel::sequential_tag);
55 template<typename _FIter>
56 inline _FIter
57 adjacent_find(_FIter, _FIter);
59 template<typename _FIter, typename BinaryPredicate>
60 inline _FIter
61 adjacent_find(_FIter, _FIter, BinaryPredicate);
63 template<typename _RAIter>
64 _RAIter
65 adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag);
67 template<typename _FIter, typename IteratorTag>
68 inline _FIter
69 adjacent_find_switch(_FIter, _FIter, IteratorTag);
71 template<typename _FIter, typename BinaryPredicate, typename IteratorTag>
72 inline _FIter
73 adjacent_find_switch(_FIter, _FIter, BinaryPredicate, IteratorTag);
75 template<typename _RAIter, typename BinaryPredicate>
76 _RAIter
77 adjacent_find_switch(_RAIter, _RAIter, BinaryPredicate, random_access_iterator_tag);
80 template<typename _IIter, typename T>
81 inline typename iterator_traits<_IIter>::difference_type
82 count(_IIter, _IIter, const T& value, __gnu_parallel::sequential_tag);
84 template<typename _IIter, typename T>
85 inline typename iterator_traits<_IIter>::difference_type
86 count(_IIter, _IIter, const T& value, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_unbalanced);
88 template<typename _RAIter, typename T>
89 typename iterator_traits<_RAIter>::difference_type
90 count_switch(_RAIter, _RAIter, const T& value, random_access_iterator_tag, __gnu_parallel::parallelism);
92 template<typename _IIter, typename T, typename IteratorTag>
93 typename iterator_traits<_IIter>::difference_type
94 count_switch(_IIter, _IIter, const T& value, IteratorTag, __gnu_parallel::parallelism);
97 template<typename _IIter, typename Predicate>
98 inline typename iterator_traits<_IIter>::difference_type
99 count_if(_IIter, _IIter, Predicate, __gnu_parallel::sequential_tag);
101 template<typename _IIter, typename Predicate>
102 inline typename iterator_traits<_IIter>::difference_type
103 count_if(_IIter, _IIter, Predicate, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_unbalanced);
105 template<typename _RAIter, typename Predicate>
106 typename iterator_traits<_RAIter>::difference_type
107 count_if_switch(_RAIter, _RAIter, Predicate, random_access_iterator_tag, __gnu_parallel::parallelism);
109 template<typename _IIter, typename Predicate, typename IteratorTag>
110 typename iterator_traits<_IIter>::difference_type
111 count_if_switch(_IIter, _IIter, Predicate, IteratorTag, __gnu_parallel::parallelism);
113 // algobase.h
114 template<typename _IIter1, typename _IIter2>
115 inline bool
116 equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
118 template<typename _IIter1, typename _IIter2, typename Predicate>
119 inline bool
120 equal(_IIter1, _IIter1, _IIter2, Predicate, __gnu_parallel::sequential_tag);
122 template<typename _IIter1, typename _IIter2>
123 inline bool
124 equal(_IIter1, _IIter1, _IIter2);
126 template<typename _IIter1, typename _IIter2, typename Predicate>
127 inline bool
128 equal(_IIter1, _IIter1, _IIter2, Predicate);
130 template<typename _IIter, typename T>
131 inline _IIter
132 find(_IIter, _IIter, const T&, __gnu_parallel::sequential_tag);
134 template<typename _IIter, typename T>
135 inline _IIter
136 find(_IIter, _IIter, const T& val);
138 template<typename _IIter, typename T, typename IteratorTag>
139 inline _IIter
140 find_switch(_IIter, _IIter, const T&, IteratorTag);
142 template<typename _RAIter, typename T>
143 _RAIter
144 find_switch(_RAIter, _RAIter, const T&, random_access_iterator_tag);
146 template<typename _IIter, typename Predicate>
147 inline _IIter
148 find_if(_IIter, _IIter, Predicate, __gnu_parallel::sequential_tag);
150 template<typename _IIter, typename Predicate>
151 inline _IIter
152 find_if (_IIter, _IIter, Predicate);
154 template<typename _IIter, typename Predicate, typename IteratorTag>
155 inline _IIter
156 find_if_switch(_IIter, _IIter, Predicate, IteratorTag);
158 template<typename _RAIter, typename Predicate>
159 _RAIter
160 find_if_switch(_RAIter, _RAIter, Predicate, random_access_iterator_tag);
162 template<typename _IIter, typename _FIter>
163 inline _IIter
164 find_first_of(_IIter, _IIter, _FIter, _FIter, __gnu_parallel::sequential_tag);
166 template<typename _IIter, typename _FIter, typename BinaryPredicate>
167 inline _IIter
168 find_first_of(_IIter, _IIter, _FIter, _FIter, BinaryPredicate, __gnu_parallel::sequential_tag);
170 template<typename _IIter, typename _FIter, typename BinaryPredicate>
171 inline _IIter
172 find_first_of(_IIter, _IIter, _FIter, _FIter, BinaryPredicate);
174 template<typename _IIter, typename _FIter>
175 _IIter
176 find_first_of(_IIter, _IIter, _FIter, _FIter);
178 template<typename _IIter, typename _FIter, typename IteratorTag1, typename IteratorTag2>
179 inline _IIter
180 find_first_of_switch(_IIter, _IIter, _FIter, _FIter, IteratorTag1, IteratorTag2);
182 template<typename _RAIter, typename _FIter, typename BinaryPredicate, typename IteratorTag>
183 inline _RAIter
184 find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, BinaryPredicate, random_access_iterator_tag, IteratorTag);
186 template<typename _IIter, typename _FIter, typename BinaryPredicate, typename IteratorTag1, typename IteratorTag2>
187 inline _IIter
188 find_first_of_switch(_IIter, _IIter, _FIter, _FIter, BinaryPredicate, IteratorTag1, IteratorTag2);
191 template<typename _IIter, typename Function>
192 inline Function
193 for_each(_IIter, _IIter, Function f, __gnu_parallel::sequential_tag);
195 template<typename Iterator, typename Function>
196 inline Function
197 for_each(Iterator, Iterator, Function f, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
199 template<typename _IIter, typename Function, typename IteratorTag>
200 Function
201 for_each_switch(_IIter, _IIter, Function f, IteratorTag, __gnu_parallel::parallelism);
203 template<typename _RAIter, typename Function>
204 Function
205 for_each_switch(_RAIter, _RAIter, Function f, random_access_iterator_tag, __gnu_parallel::parallelism);
207 template<typename _FIter, typename Generator>
208 inline void
209 generate(_FIter, _FIter, Generator, __gnu_parallel::sequential_tag);
211 template<typename _FIter, typename Generator>
212 inline void
213 generate(_FIter, _FIter, Generator, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
215 template<typename _FIter, typename Generator, typename IteratorTag>
216 void
217 generate_switch(_FIter, _FIter, Generator, IteratorTag, __gnu_parallel::parallelism);
219 template<typename _RAIter, typename Generator>
220 void
221 generate_switch(_RAIter, _RAIter, Generator, random_access_iterator_tag, __gnu_parallel::parallelism);
223 template<typename _OIter, typename Size, typename Generator>
224 inline _OIter
225 generate_n(_OIter, Size, Generator, __gnu_parallel::sequential_tag);
227 template<typename _OIter, typename Size, typename Generator>
228 inline _OIter
229 generate_n(_OIter, Size, Generator, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
231 template<typename _OIter, typename Size, typename Generator, typename IteratorTag>
232 _OIter
233 generate_n_switch(_OIter, Size, Generator, IteratorTag, __gnu_parallel::parallelism);
235 template<typename _RAIter, typename Size, typename Generator>
236 _RAIter
237 generate_n_switch(_RAIter, Size, Generator, random_access_iterator_tag, __gnu_parallel::parallelism);
239 template<typename _IIter1, typename _IIter2>
240 inline bool
241 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, __gnu_parallel::sequential_tag);
243 template<typename _IIter1, typename _IIter2, typename Predicate>
244 inline bool
245 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, Predicate, __gnu_parallel::sequential_tag);
247 template<typename _IIter1, typename _IIter2>
248 inline bool
249 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
251 template<typename _IIter1, typename _IIter2, typename Predicate>
252 inline bool
253 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, Predicate);
255 template<typename _IIter1, typename _IIter2, typename Predicate, typename IteratorTag1, typename IteratorTag2>
256 inline bool
257 lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2, Predicate, IteratorTag1, IteratorTag2);
259 template<typename _RAIter1, typename _RAIter2, typename Predicate>
260 bool
261 lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, Predicate, random_access_iterator_tag, random_access_iterator_tag);
263 // algo.h
264 template<typename _IIter1, typename _IIter2>
265 inline pair<_IIter1, _IIter2>
266 mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
268 template<typename _IIter1, typename _IIter2, typename Predicate>
269 inline pair<_IIter1, _IIter2>
270 mismatch(_IIter1, _IIter1, _IIter2, Predicate, __gnu_parallel::sequential_tag);
272 template<typename _IIter1, typename _IIter2>
273 inline pair<_IIter1, _IIter2>
274 mismatch(_IIter1, _IIter1, _IIter2);
276 template<typename _IIter1, typename _IIter2, typename Predicate>
277 inline pair<_IIter1, _IIter2>
278 mismatch(_IIter1, _IIter1, _IIter2, Predicate);
280 template<typename _IIter1, typename _IIter2, typename Predicate, typename IteratorTag1, typename IteratorTag2>
281 inline pair<_IIter1, _IIter2>
282 mismatch_switch(_IIter1, _IIter1, _IIter2, Predicate, IteratorTag1, IteratorTag2);
284 template<typename _RAIter1, typename _RAIter2, typename Predicate>
285 pair<_RAIter1, _RAIter2>
286 mismatch_switch(_RAIter1, _RAIter1, _RAIter2, Predicate, random_access_iterator_tag, random_access_iterator_tag);
288 template<typename _FIter1, typename _FIter2>
289 inline _FIter1
290 search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag);
292 template<typename _FIter1, typename _FIter2>
293 inline _FIter1
294 search(_FIter1, _FIter1, _FIter2, _FIter2);
296 template<typename _FIter1, typename _FIter2, typename BinaryPredicate>
297 inline _FIter1
298 search(_FIter1, _FIter1, _FIter2, _FIter2, BinaryPredicate, __gnu_parallel::sequential_tag);
300 template<typename _FIter1, typename _FIter2, typename BinaryPredicate>
301 inline _FIter1
302 search(_FIter1, _FIter1, _FIter2, _FIter2, BinaryPredicate);
304 template<typename _RAIter1, typename _RAIter2>
305 _RAIter1
306 search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, random_access_iterator_tag, random_access_iterator_tag);
308 template<typename _FIter1, typename _FIter2, typename IteratorTag1, typename IteratorTag2>
309 inline _FIter1
310 search_switch(_FIter1, _FIter1, _FIter2, _FIter2, IteratorTag1, IteratorTag2);
312 template<typename _RAIter1, typename _RAIter2, typename BinaryPredicate>
313 _RAIter1
314 search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, BinaryPredicate , random_access_iterator_tag, random_access_iterator_tag);
316 template<typename _FIter1, typename _FIter2, typename BinaryPredicate, typename IteratorTag1, typename IteratorTag2>
317 inline _FIter1
318 search_switch(_FIter1, _FIter1, _FIter2, _FIter2, BinaryPredicate, IteratorTag1, IteratorTag2);
320 template<typename _FIter, typename Integer, typename T>
321 inline _FIter
322 search_n(_FIter, _FIter, Integer, const T&, __gnu_parallel::sequential_tag);
324 template<typename _FIter, typename Integer, typename T, typename BinaryPredicate>
325 inline _FIter
326 search_n(_FIter, _FIter, Integer, const T&, BinaryPredicate, __gnu_parallel::sequential_tag);
328 template<typename _FIter, typename Integer, typename T>
329 inline _FIter
330 search_n(_FIter, _FIter, Integer, const T& val);
332 template<typename _FIter, typename Integer, typename T, typename BinaryPredicate>
333 inline _FIter
334 search_n(_FIter, _FIter, Integer, const T&, BinaryPredicate);
336 template<typename _RAIter, typename Integer, typename T, typename BinaryPredicate>
337 _RAIter
338 search_n_switch(_RAIter, _RAIter, Integer, const T&, BinaryPredicate, random_access_iterator_tag);
340 template<typename _FIter, typename Integer, typename T, typename BinaryPredicate, typename IteratorTag>
341 inline _FIter
342 search_n_switch(_FIter, _FIter, Integer, const T&, BinaryPredicate, IteratorTag);
345 template<typename _IIter, typename _OIter, typename UnaryOperation>
346 inline _OIter
347 transform(_IIter, _IIter, _OIter, UnaryOperation, __gnu_parallel::sequential_tag);
349 template<typename _IIter1, typename _IIter2, typename _OIter, typename BinaryOperation>
350 inline _OIter
351 transform(_IIter1, _IIter1, _IIter2, _OIter, BinaryOperation binary_op, __gnu_parallel::sequential_tag);
353 template<typename _IIter, typename _OIter, typename UnaryOperation>
354 inline _OIter
355 transform(_IIter, _IIter, _OIter, UnaryOperation, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
357 template<typename _IIter1, typename _IIter2, typename _OIter, typename BinaryOperation>
358 inline _OIter
359 transform(_IIter1, _IIter1, _IIter2, _OIter, BinaryOperation binary_op, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
361 template<typename _RAIter1, typename _RAIter3, typename UnaryOperation>
362 _RAIter3
363 transform1_switch(_RAIter1, _RAIter1, _RAIter3, UnaryOperation, random_access_iterator_tag, random_access_iterator_tag, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
365 template<typename _RAIter1, typename _RAIter3, typename UnaryOperation, typename IteratorTag1, typename IteratorTag2>
366 inline _RAIter3
367 transform1_switch(_RAIter1, _RAIter1, _RAIter3, UnaryOperation, IteratorTag1, IteratorTag2, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
369 template<typename _RAIter1, typename _RAIter2, typename _RAIter3, typename BinaryOperation>
370 _RAIter3
371 transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, BinaryOperation binary_op, random_access_iterator_tag, random_access_iterator_tag, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
373 template<typename _RAIter1, typename _RAIter2, typename _RAIter3, typename BinaryOperation, typename tag1, typename tag2, typename tag3>
374 inline _RAIter3
375 transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, BinaryOperation binary_op, tag1, tag2, tag3, __gnu_parallel::parallelism);
377 template<typename _FIter, typename T>
378 inline void
379 replace(_FIter, _FIter, const T&, const T&, __gnu_parallel::sequential_tag);
381 template<typename _FIter, typename T>
382 inline void
383 replace(_FIter, _FIter, const T&, const T&, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
385 template<typename _FIter, typename T, typename IteratorTag>
386 void
387 replace_switch(_FIter, _FIter, const T&, const T&, IteratorTag, __gnu_parallel::parallelism);
389 template<typename _RAIter, typename T>
390 void
391 replace_switch(_RAIter, _RAIter, const T&, const T&, random_access_iterator_tag, __gnu_parallel::parallelism);
394 template<typename _FIter, typename Predicate, typename T>
395 inline void
396 replace_if(_FIter, _FIter, Predicate, const T&, __gnu_parallel::sequential_tag);
398 template<typename _FIter, typename Predicate, typename T>
399 inline void
400 replace_if(_FIter, _FIter, Predicate, const T&, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
402 template<typename _FIter, typename Predicate, typename T, typename IteratorTag>
403 void
404 replace_if_switch(_FIter, _FIter, Predicate, const T&, IteratorTag, __gnu_parallel::parallelism);
406 template<typename _RAIter, typename Predicate, typename T>
407 void
408 replace_if_switch(_RAIter, _RAIter, Predicate, const T&, random_access_iterator_tag, __gnu_parallel::parallelism);
410 template<typename _FIter>
411 inline _FIter
412 max_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
414 template<typename _FIter, typename _Compare>
415 inline _FIter
416 max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
418 template<typename _FIter>
419 inline _FIter
420 max_element(_FIter, _FIter, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
422 template<typename _FIter, typename _Compare>
423 inline _FIter
424 max_element(_FIter, _FIter, _Compare, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
426 template<typename _FIter, typename _Compare, typename IteratorTag>
427 _FIter
428 max_element_switch(_FIter, _FIter, _Compare, IteratorTag, __gnu_parallel::parallelism);
430 template<typename _RAIter, typename _Compare>
431 _RAIter
432 max_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag, __gnu_parallel::parallelism);
434 template<typename _IIter1, typename _IIter2, typename _OIter>
435 inline _OIter
436 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, __gnu_parallel::sequential_tag);
438 template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare>
439 inline _OIter
440 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, __gnu_parallel::sequential_tag);
442 template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare>
443 inline _OIter
444 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
446 template<typename _IIter1, typename _IIter2, typename _OIter>
447 inline _OIter
448 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
450 template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare, typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
451 inline _OIter
452 merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, IteratorTag1, IteratorTag2, IteratorTag3);
454 template<typename _IIter1, typename _IIter2, typename _OIter, typename _Compare>
455 _OIter
456 merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag);
458 template<typename _FIter>
459 inline _FIter
460 min_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
462 template<typename _FIter, typename _Compare>
463 inline _FIter
464 min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
466 template<typename _FIter>
467 inline _FIter
468 min_element(_FIter, _FIter, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
470 template<typename _FIter, typename _Compare>
471 inline _FIter
472 min_element(_FIter, _FIter, _Compare, __gnu_parallel::parallelism parallelism_tag = __gnu_parallel::parallel_balanced);
474 template<typename _FIter, typename _Compare, typename IteratorTag>
475 _FIter
476 min_element_switch(_FIter, _FIter, _Compare, IteratorTag, __gnu_parallel::parallelism);
478 template<typename _RAIter, typename _Compare>
479 _RAIter
480 min_element_switch(_RAIter, _RAIter, _Compare, random_access_iterator_tag, __gnu_parallel::parallelism);
482 template<typename _RAIter>
483 inline void
484 nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
486 template<typename _RAIter, typename _Compare>
487 void
488 nth_element(_RAIter, _RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
490 template<typename _RAIter, typename _Compare>
491 inline void
492 nth_element(_RAIter, _RAIter, _RAIter, _Compare);
494 template<typename _RAIter>
495 void
496 nth_element(_RAIter, _RAIter, _RAIter);
498 template<typename _RAIter, typename _Compare>
499 void
500 partial_sort(_RAIter, _RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
502 template<typename _RAIter>
503 void
504 partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
506 template<typename _RAIter, typename _Compare>
507 void
508 partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
510 template<typename _RAIter>
511 void
512 partial_sort(_RAIter, _RAIter, _RAIter);
514 template<typename _FIter, typename Predicate>
515 inline _FIter
516 partition(_FIter, _FIter, Predicate, __gnu_parallel::sequential_tag);
518 template<typename _FIter, typename Predicate>
519 inline _FIter
520 partition(_FIter, _FIter, Predicate);
522 template<typename _FIter, typename Predicate, typename IteratorTag>
523 inline _FIter
524 partition_switch(_FIter, _FIter, Predicate, IteratorTag);
526 template<typename _RAIter, typename Predicate>
527 _RAIter
528 partition_switch(_RAIter, _RAIter, Predicate, random_access_iterator_tag);
530 template<typename _RAIter>
531 inline void
532 random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
534 template<typename _RAIter, typename RandomNumberGenerator>
535 inline void
536 random_shuffle(_RAIter, _RAIter, RandomNumberGenerator& rand, __gnu_parallel::sequential_tag);
538 template<typename _RAIter>
539 inline void
540 random_shuffle(_RAIter, _RAIter);
542 template<typename _RAIter, typename RandomNumberGenerator>
543 void
544 random_shuffle(_RAIter, _RAIter, RandomNumberGenerator& rand);
546 template<typename _IIter1, typename _IIter2, typename _OIter>
547 inline _OIter
548 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, __gnu_parallel::sequential_tag);
550 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
551 inline _OIter
552 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, __gnu_parallel::sequential_tag);
554 template<typename _IIter1, typename _IIter2, typename _OIter>
555 inline _OIter
556 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
558 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
559 inline _OIter
560 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate);
562 template<typename _IIter1, typename _IIter2, typename Predicate, typename _OIter, typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
563 inline _OIter
564 set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, IteratorTag1, IteratorTag2, IteratorTag3);
566 template<typename _RAIter1, typename _RAIter2, typename Output_RAIter, typename Predicate>
567 Output_RAIter
568 set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, Output_RAIter, Predicate, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag);
570 template<typename _IIter1, typename _IIter2, typename _OIter>
571 inline _OIter
572 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, __gnu_parallel::sequential_tag);
574 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
575 inline _OIter
576 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, __gnu_parallel::sequential_tag);
578 template<typename _IIter1, typename _IIter2, typename _OIter>
579 inline _OIter
580 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
582 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
583 inline _OIter
584 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate);
586 template<typename _IIter1, typename _IIter2, typename Predicate, typename _OIter, typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
587 inline _OIter
588 set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, IteratorTag1, IteratorTag2, IteratorTag3);
590 template<typename _RAIter1, typename _RAIter2, typename Output_RAIter, typename Predicate>
591 Output_RAIter
592 set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, Output_RAIter, Predicate, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag);
594 template<typename _IIter1, typename _IIter2, typename _OIter>
595 inline _OIter
596 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, __gnu_parallel::sequential_tag);
598 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
599 inline _OIter
600 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, __gnu_parallel::sequential_tag);
602 template<typename _IIter1, typename _IIter2, typename _OIter>
603 inline _OIter
604 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
606 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
607 inline _OIter
608 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate);
610 template<typename _IIter1, typename _IIter2, typename Predicate, typename _OIter, typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
611 inline _OIter
612 set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, IteratorTag1, IteratorTag2, IteratorTag3);
614 template<typename _RAIter1, typename _RAIter2, typename Output_RAIter, typename Predicate>
615 Output_RAIter
616 set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, Output_RAIter, Predicate, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag);
619 template<typename _IIter1, typename _IIter2, typename _OIter>
620 inline _OIter
621 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, __gnu_parallel::sequential_tag);
623 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
624 inline _OIter
625 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, __gnu_parallel::sequential_tag);
627 template<typename _IIter1, typename _IIter2, typename _OIter>
628 inline _OIter
629 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
631 template<typename _IIter1, typename _IIter2, typename _OIter, typename Predicate>
632 inline _OIter
633 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate);
635 template<typename _IIter1, typename _IIter2, typename Predicate, typename _OIter, typename IteratorTag1, typename IteratorTag2, typename IteratorTag3>
636 inline _OIter
637 set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, Predicate, IteratorTag1, IteratorTag2, IteratorTag3);
639 template<typename _RAIter1, typename _RAIter2, typename Output_RAIter, typename Predicate>
640 Output_RAIter
641 set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, Output_RAIter, Predicate, random_access_iterator_tag, random_access_iterator_tag, random_access_iterator_tag);
644 template<typename _RAIter>
645 inline void
646 sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
648 template<typename _RAIter, typename _Compare>
649 inline void
650 sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
652 template<typename _RAIter>
653 inline void
654 sort(_RAIter, _RAIter);
656 template<typename _RAIter, typename _Compare>
657 void
658 sort(_RAIter, _RAIter, _Compare);
660 template<typename _RAIter>
661 inline void
662 stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
664 template<typename _RAIter, typename _Compare>
665 inline void
666 stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
668 template<typename _RAIter>
669 void
670 stable_sort(_RAIter, _RAIter);
672 template<typename _RAIter, typename _Compare>
673 void
674 stable_sort(_RAIter, _RAIter, _Compare);
676 template<typename _IIter, typename _OIter>
677 inline _OIter
678 unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
680 template<typename _IIter, typename _OIter, typename Predicate>
681 inline _OIter
682 unique_copy(_IIter, _IIter, _OIter, Predicate, __gnu_parallel::sequential_tag);
684 template<typename _IIter, typename _OIter>
685 inline _OIter
686 unique_copy(_IIter, _IIter, _OIter);
688 template<typename _IIter, typename _OIter, typename Predicate>
689 inline _OIter
690 unique_copy(_IIter, _IIter, _OIter, Predicate);
692 template<typename _IIter, typename _OIter, typename Predicate, typename IteratorTag1, typename IteratorTag2>
693 inline _OIter
694 unique_copy_switch(_IIter, _IIter, _OIter, Predicate, IteratorTag1, IteratorTag2);
696 template<typename _RAIter, typename RandomAccess_OIter, typename Predicate>
697 RandomAccess_OIter
698 unique_copy_switch(_RAIter, _RAIter, RandomAccess_OIter, Predicate, random_access_iterator_tag, random_access_iterator_tag);
699 } // end namespace __parallel
700 } // end namespace std
702 // NB: cannot use _GLIBCXX_STD_P directly here, as it is both scoped
703 // (std::__norm) and unscoped (std::).
704 namespace __gnu_sequential
706 #ifdef _GLIBCXX_PARALLEL
707 using std::__norm::partition;
708 using std::__norm::sort;
709 using std::__norm::stable_sort;
710 using std::__norm::random_shuffle;
711 #else
712 using std::partition;
713 using std::sort;
714 using std::stable_sort;
715 using std::random_shuffle;
716 #endif
719 #endif