Update copyright in libstdc++-v3.
[official-gcc.git] / libstdc++-v3 / include / parallel / algorithmfwd.h
blob9706185447a06eea7783997bd23fed2a9e6d38e7
1 // <algorithm> parallel extensions -*- C++ -*-
3 // Copyright (C) 2007-2013 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 3, 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 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 /** @file parallel/algorithmfwd.h
26 * This file is a GNU parallel extension to the Standard C++ Library.
29 #ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H
30 #define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1
32 #pragma GCC system_header
34 #include <parallel/tags.h>
35 #include <parallel/settings.h>
37 namespace std _GLIBCXX_VISIBILITY(default)
39 namespace __parallel
41 template<typename _FIter>
42 _FIter
43 adjacent_find(_FIter, _FIter);
45 template<typename _FIter>
46 _FIter
47 adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag);
49 template<typename _FIter, typename _IterTag>
50 _FIter
51 __adjacent_find_switch(_FIter, _FIter, _IterTag);
53 template<typename _RAIter>
54 _RAIter
55 __adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag);
58 template<typename _FIter, typename _BiPredicate>
59 _FIter
60 adjacent_find(_FIter, _FIter, _BiPredicate);
62 template<typename _FIter, typename _BiPredicate>
63 _FIter
64 adjacent_find(_FIter, _FIter, _BiPredicate,
65 __gnu_parallel::sequential_tag);
67 template<typename _FIter, typename _BiPredicate, typename _IterTag>
68 _FIter
69 __adjacent_find_switch(_FIter, _FIter, _BiPredicate, _IterTag);
71 template<typename _RAIter, typename _BiPredicate>
72 _RAIter
73 __adjacent_find_switch(_RAIter, _RAIter, _BiPredicate,
74 random_access_iterator_tag);
77 template<typename _IIter, typename _Tp>
78 typename iterator_traits<_IIter>::difference_type
79 count(_IIter, _IIter, const _Tp&);
81 template<typename _IIter, typename _Tp>
82 typename iterator_traits<_IIter>::difference_type
83 count(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
85 template<typename _IIter, typename _Tp>
86 typename iterator_traits<_IIter>::difference_type
87 count(_IIter, _IIter, const _Tp&, __gnu_parallel::_Parallelism);
89 template<typename _IIter, typename _Tp, typename _IterTag>
90 typename iterator_traits<_IIter>::difference_type
91 __count_switch(_IIter, _IIter, const _Tp&, _IterTag);
93 template<typename _RAIter, typename _Tp>
94 typename iterator_traits<_RAIter>::difference_type
95 __count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag,
96 __gnu_parallel::_Parallelism __parallelism
97 = __gnu_parallel::parallel_unbalanced);
100 template<typename _IIter, typename _Predicate>
101 typename iterator_traits<_IIter>::difference_type
102 count_if(_IIter, _IIter, _Predicate);
104 template<typename _IIter, typename _Predicate>
105 typename iterator_traits<_IIter>::difference_type
106 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
108 template<typename _IIter, typename _Predicate>
109 typename iterator_traits<_IIter>::difference_type
110 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::_Parallelism);
112 template<typename _IIter, typename _Predicate, typename _IterTag>
113 typename iterator_traits<_IIter>::difference_type
114 __count_if_switch(_IIter, _IIter, _Predicate, _IterTag);
116 template<typename _RAIter, typename _Predicate>
117 typename iterator_traits<_RAIter>::difference_type
118 __count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag,
119 __gnu_parallel::_Parallelism __parallelism
120 = __gnu_parallel::parallel_unbalanced);
122 // algobase.h
123 template<typename _IIter1, typename _IIter2>
124 bool
125 equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
127 template<typename _IIter1, typename _IIter2, typename _Predicate>
128 bool
129 equal(_IIter1, _IIter1, _IIter2, _Predicate,
130 __gnu_parallel::sequential_tag);
132 template<typename _IIter1, typename _IIter2>
133 bool
134 equal(_IIter1, _IIter1, _IIter2);
136 template<typename _IIter1, typename _IIter2, typename _Predicate>
137 bool
138 equal(_IIter1, _IIter1, _IIter2, _Predicate);
140 template<typename _IIter, typename _Tp>
141 _IIter
142 find(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
144 template<typename _IIter, typename _Tp>
145 _IIter
146 find(_IIter, _IIter, const _Tp& __val);
148 template<typename _IIter, typename _Tp, typename _IterTag>
149 _IIter
150 __find_switch(_IIter, _IIter, const _Tp&, _IterTag);
152 template<typename _RAIter, typename _Tp>
153 _RAIter
154 __find_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag);
156 template<typename _IIter, typename _Predicate>
157 _IIter
158 find_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
160 template<typename _IIter, typename _Predicate>
161 _IIter
162 find_if(_IIter, _IIter, _Predicate);
164 template<typename _IIter, typename _Predicate, typename _IterTag>
165 _IIter
166 __find_if_switch(_IIter, _IIter, _Predicate, _IterTag);
168 template<typename _RAIter, typename _Predicate>
169 _RAIter
170 __find_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag);
172 template<typename _IIter, typename _FIter>
173 _IIter
174 find_first_of(_IIter, _IIter, _FIter, _FIter,
175 __gnu_parallel::sequential_tag);
177 template<typename _IIter, typename _FIter, typename _BiPredicate>
178 _IIter
179 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
180 __gnu_parallel::sequential_tag);
182 template<typename _IIter, typename _FIter, typename _BiPredicate>
183 _IIter
184 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate);
186 template<typename _IIter, typename _FIter>
187 _IIter
188 find_first_of(_IIter, _IIter, _FIter, _FIter);
190 template<typename _IIter, typename _FIter,
191 typename _IterTag1, typename _IterTag2>
192 _IIter
193 __find_first_of_switch(
194 _IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2);
196 template<typename _RAIter, typename _FIter, typename _BiPredicate,
197 typename _IterTag>
198 _RAIter
199 __find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, _BiPredicate,
200 random_access_iterator_tag, _IterTag);
202 template<typename _IIter, typename _FIter, typename _BiPredicate,
203 typename _IterTag1, typename _IterTag2>
204 _IIter
205 __find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
206 _IterTag1, _IterTag2);
209 template<typename _IIter, typename _Function>
210 _Function
211 for_each(_IIter, _IIter, _Function);
213 template<typename _IIter, typename _Function>
214 _Function
215 for_each(_IIter, _IIter, _Function, __gnu_parallel::sequential_tag);
217 template<typename _Iterator, typename _Function>
218 _Function
219 for_each(_Iterator, _Iterator, _Function, __gnu_parallel::_Parallelism);
221 template<typename _IIter, typename _Function, typename _IterTag>
222 _Function
223 __for_each_switch(_IIter, _IIter, _Function, _IterTag);
225 template<typename _RAIter, typename _Function>
226 _Function
227 __for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag,
228 __gnu_parallel::_Parallelism __parallelism
229 = __gnu_parallel::parallel_balanced);
232 template<typename _FIter, typename _Generator>
233 void
234 generate(_FIter, _FIter, _Generator);
236 template<typename _FIter, typename _Generator>
237 void
238 generate(_FIter, _FIter, _Generator, __gnu_parallel::sequential_tag);
240 template<typename _FIter, typename _Generator>
241 void
242 generate(_FIter, _FIter, _Generator, __gnu_parallel::_Parallelism);
244 template<typename _FIter, typename _Generator, typename _IterTag>
245 void
246 __generate_switch(_FIter, _FIter, _Generator, _IterTag);
248 template<typename _RAIter, typename _Generator>
249 void
250 __generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag,
251 __gnu_parallel::_Parallelism __parallelism
252 = __gnu_parallel::parallel_balanced);
254 template<typename _OIter, typename _Size, typename _Generator>
255 _OIter
256 generate_n(_OIter, _Size, _Generator);
258 template<typename _OIter, typename _Size, typename _Generator>
259 _OIter
260 generate_n(_OIter, _Size, _Generator, __gnu_parallel::sequential_tag);
262 template<typename _OIter, typename _Size, typename _Generator>
263 _OIter
264 generate_n(_OIter, _Size, _Generator, __gnu_parallel::_Parallelism);
266 template<typename _OIter, typename _Size, typename _Generator,
267 typename _IterTag>
268 _OIter
269 __generate_n_switch(_OIter, _Size, _Generator, _IterTag);
271 template<typename _RAIter, typename _Size, typename _Generator>
272 _RAIter
273 __generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag,
274 __gnu_parallel::_Parallelism __parallelism
275 = __gnu_parallel::parallel_balanced);
277 template<typename _IIter1, typename _IIter2>
278 bool
279 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2,
280 __gnu_parallel::sequential_tag);
282 template<typename _IIter1, typename _IIter2, typename _Predicate>
283 bool
284 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate,
285 __gnu_parallel::sequential_tag);
287 template<typename _IIter1, typename _IIter2>
288 bool
289 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
291 template<typename _IIter1, typename _IIter2, typename _Predicate>
292 bool
293 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate);
295 template<typename _IIter1, typename _IIter2,
296 typename _Predicate, typename _IterTag1, typename _IterTag2>
297 bool
298 __lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2,
299 _Predicate, _IterTag1, _IterTag2);
301 template<typename _RAIter1, typename _RAIter2, typename _Predicate>
302 bool
303 __lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
304 _Predicate, random_access_iterator_tag,
305 random_access_iterator_tag);
307 // algo.h
308 template<typename _IIter1, typename _IIter2>
309 pair<_IIter1, _IIter2>
310 mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
312 template<typename _IIter1, typename _IIter2, typename _Predicate>
313 pair<_IIter1, _IIter2>
314 mismatch(_IIter1, _IIter1, _IIter2, _Predicate,
315 __gnu_parallel::sequential_tag);
317 template<typename _IIter1, typename _IIter2>
318 pair<_IIter1, _IIter2>
319 mismatch(_IIter1, _IIter1, _IIter2);
321 template<typename _IIter1, typename _IIter2, typename _Predicate>
322 pair<_IIter1, _IIter2>
323 mismatch(_IIter1, _IIter1, _IIter2, _Predicate);
325 template<typename _IIter1, typename _IIter2, typename _Predicate,
326 typename _IterTag1, typename _IterTag2>
327 pair<_IIter1, _IIter2>
328 __mismatch_switch(_IIter1, _IIter1, _IIter2, _Predicate,
329 _IterTag1, _IterTag2);
331 template<typename _RAIter1, typename _RAIter2, typename _Predicate>
332 pair<_RAIter1, _RAIter2>
333 __mismatch_switch(_RAIter1, _RAIter1, _RAIter2, _Predicate,
334 random_access_iterator_tag, random_access_iterator_tag);
336 template<typename _FIter1, typename _FIter2>
337 _FIter1
338 search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag);
340 template<typename _FIter1, typename _FIter2>
341 _FIter1
342 search(_FIter1, _FIter1, _FIter2, _FIter2);
344 template<typename _FIter1, typename _FIter2, typename _BiPredicate>
345 _FIter1
346 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
347 __gnu_parallel::sequential_tag);
349 template<typename _FIter1, typename _FIter2, typename _BiPredicate>
350 _FIter1
351 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate);
353 template<typename _RAIter1, typename _RAIter2>
354 _RAIter1
355 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
356 random_access_iterator_tag, random_access_iterator_tag);
358 template<typename _FIter1, typename _FIter2, typename _IterTag1,
359 typename _IterTag2>
360 _FIter1
361 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2);
363 template<typename _RAIter1, typename _RAIter2, typename _BiPredicate>
364 _RAIter1
365 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _BiPredicate,
366 random_access_iterator_tag, random_access_iterator_tag);
368 template<typename _FIter1, typename _FIter2, typename _BiPredicate,
369 typename _IterTag1, typename _IterTag2>
370 _FIter1
371 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
372 _IterTag1, _IterTag2);
374 template<typename _FIter, typename _Integer, typename _Tp>
375 _FIter
376 search_n(_FIter, _FIter, _Integer, const _Tp&,
377 __gnu_parallel::sequential_tag);
379 template<typename _FIter, typename _Integer, typename _Tp,
380 typename _BiPredicate>
381 _FIter
382 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate,
383 __gnu_parallel::sequential_tag);
385 template<typename _FIter, typename _Integer, typename _Tp>
386 _FIter
387 search_n(_FIter, _FIter, _Integer, const _Tp&);
389 template<typename _FIter, typename _Integer, typename _Tp,
390 typename _BiPredicate>
391 _FIter
392 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate);
394 template<typename _RAIter, typename _Integer, typename _Tp,
395 typename _BiPredicate>
396 _RAIter
397 __search_n_switch(_RAIter, _RAIter, _Integer, const _Tp&,
398 _BiPredicate, random_access_iterator_tag);
400 template<typename _FIter, typename _Integer, typename _Tp,
401 typename _BiPredicate, typename _IterTag>
402 _FIter
403 __search_n_switch(_FIter, _FIter, _Integer, const _Tp&,
404 _BiPredicate, _IterTag);
407 template<typename _IIter, typename _OIter, typename _UnaryOperation>
408 _OIter
409 transform(_IIter, _IIter, _OIter, _UnaryOperation);
411 template<typename _IIter, typename _OIter, typename _UnaryOperation>
412 _OIter
413 transform(_IIter, _IIter, _OIter, _UnaryOperation,
414 __gnu_parallel::sequential_tag);
416 template<typename _IIter, typename _OIter, typename _UnaryOperation>
417 _OIter
418 transform(_IIter, _IIter, _OIter, _UnaryOperation,
419 __gnu_parallel::_Parallelism);
421 template<typename _IIter, typename _OIter, typename _UnaryOperation,
422 typename _IterTag1, typename _IterTag2>
423 _OIter
424 __transform1_switch(_IIter, _IIter, _OIter, _UnaryOperation,
425 _IterTag1, _IterTag2);
428 template<typename _RAIIter, typename _RAOIter, typename _UnaryOperation>
429 _RAOIter
430 __transform1_switch(_RAIIter, _RAIIter, _RAOIter, _UnaryOperation,
431 random_access_iterator_tag, random_access_iterator_tag,
432 __gnu_parallel::_Parallelism __parallelism
433 = __gnu_parallel::parallel_balanced);
436 template<typename _IIter1, typename _IIter2, typename _OIter,
437 typename _BiOperation>
438 _OIter
439 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation);
441 template<typename _IIter1, typename _IIter2, typename _OIter,
442 typename _BiOperation>
443 _OIter
444 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
445 __gnu_parallel::sequential_tag);
447 template<typename _IIter1, typename _IIter2, typename _OIter,
448 typename _BiOperation>
449 _OIter
450 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
451 __gnu_parallel::_Parallelism);
453 template<typename _RAIter1, typename _RAIter2, typename _RAIter3,
454 typename _BiOperation>
455 _RAIter3
456 __transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation,
457 random_access_iterator_tag, random_access_iterator_tag,
458 random_access_iterator_tag,
459 __gnu_parallel::_Parallelism __parallelism
460 = __gnu_parallel::parallel_balanced);
462 template<typename _IIter1, typename _IIter2, typename _OIter,
463 typename _BiOperation, typename _Tag1,
464 typename _Tag2, typename _Tag3>
465 _OIter
466 __transform2_switch(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
467 _Tag1, _Tag2, _Tag3);
470 template<typename _FIter, typename _Tp>
471 void
472 replace(_FIter, _FIter, const _Tp&, const _Tp&);
474 template<typename _FIter, typename _Tp>
475 void
476 replace(_FIter, _FIter, const _Tp&, const _Tp&,
477 __gnu_parallel::sequential_tag);
479 template<typename _FIter, typename _Tp>
480 void
481 replace(_FIter, _FIter, const _Tp&, const _Tp&,
482 __gnu_parallel::_Parallelism);
484 template<typename _FIter, typename _Tp, typename _IterTag>
485 void
486 __replace_switch(_FIter, _FIter, const _Tp&, const _Tp&, _IterTag);
488 template<typename _RAIter, typename _Tp>
489 void
490 __replace_switch(_RAIter, _RAIter, const _Tp&, const _Tp&,
491 random_access_iterator_tag, __gnu_parallel::_Parallelism);
494 template<typename _FIter, typename _Predicate, typename _Tp>
495 void
496 replace_if(_FIter, _FIter, _Predicate, const _Tp&);
498 template<typename _FIter, typename _Predicate, typename _Tp>
499 void
500 replace_if(_FIter, _FIter, _Predicate, const _Tp&,
501 __gnu_parallel::sequential_tag);
503 template<typename _FIter, typename _Predicate, typename _Tp>
504 void
505 replace_if(_FIter, _FIter, _Predicate, const _Tp&,
506 __gnu_parallel::_Parallelism);
508 template<typename _FIter, typename _Predicate, typename _Tp,
509 typename _IterTag>
510 void
511 __replace_if_switch(_FIter, _FIter, _Predicate, const _Tp&, _IterTag);
513 template<typename _RAIter, typename _Predicate, typename _Tp>
514 void
515 __replace_if_switch(_RAIter, _RAIter, _Predicate, const _Tp&,
516 random_access_iterator_tag,
517 __gnu_parallel::_Parallelism);
520 template<typename _FIter>
521 _FIter
522 max_element(_FIter, _FIter);
524 template<typename _FIter>
525 _FIter
526 max_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
528 template<typename _FIter>
529 _FIter
530 max_element(_FIter, _FIter, __gnu_parallel::_Parallelism);
532 template<typename _FIter, typename _Compare>
533 _FIter
534 max_element(_FIter, _FIter, _Compare);
536 template<typename _FIter, typename _Compare>
537 _FIter
538 max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
540 template<typename _FIter, typename _Compare>
541 _FIter
542 max_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
544 template<typename _FIter, typename _Compare, typename _IterTag>
545 _FIter
546 __max_element_switch(_FIter, _FIter, _Compare, _IterTag);
548 template<typename _RAIter, typename _Compare>
549 _RAIter
550 __max_element_switch(
551 _RAIter, _RAIter, _Compare, random_access_iterator_tag,
552 __gnu_parallel::_Parallelism __parallelism
553 = __gnu_parallel::parallel_balanced);
556 template<typename _IIter1, typename _IIter2, typename _OIter>
557 _OIter
558 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
559 __gnu_parallel::sequential_tag);
561 template<typename _IIter1, typename _IIter2, typename _OIter,
562 typename _Compare>
563 _OIter
564 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
565 __gnu_parallel::sequential_tag);
567 template<typename _IIter1, typename _IIter2, typename _OIter,
568 typename _Compare>
569 _OIter
570 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
572 template<typename _IIter1, typename _IIter2, typename _OIter>
573 _OIter
574 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
576 template<typename _IIter1, typename _IIter2, typename _OIter,
577 typename _Compare, typename _IterTag1, typename _IterTag2,
578 typename _IterTag3>
579 _OIter
580 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
581 _IterTag1, _IterTag2, _IterTag3);
583 template<typename _IIter1, typename _IIter2, typename _OIter,
584 typename _Compare>
585 _OIter
586 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
587 random_access_iterator_tag, random_access_iterator_tag,
588 random_access_iterator_tag);
591 template<typename _FIter>
592 _FIter
593 min_element(_FIter, _FIter);
595 template<typename _FIter>
596 _FIter
597 min_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
599 template<typename _FIter>
600 _FIter
601 min_element(_FIter, _FIter,
602 __gnu_parallel::_Parallelism __parallelism_tag);
604 template<typename _FIter, typename _Compare>
605 _FIter
606 min_element(_FIter, _FIter, _Compare);
608 template<typename _FIter, typename _Compare>
609 _FIter
610 min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
612 template<typename _FIter, typename _Compare>
613 _FIter
614 min_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
616 template<typename _FIter, typename _Compare, typename _IterTag>
617 _FIter
618 __min_element_switch(_FIter, _FIter, _Compare, _IterTag);
620 template<typename _RAIter, typename _Compare>
621 _RAIter
622 __min_element_switch(
623 _RAIter, _RAIter, _Compare, random_access_iterator_tag,
624 __gnu_parallel::_Parallelism __parallelism
625 = __gnu_parallel::parallel_balanced);
627 template<typename _RAIter>
628 void
629 nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
631 template<typename _RAIter, typename _Compare>
632 void
633 nth_element(_RAIter, _RAIter, _RAIter, _Compare,
634 __gnu_parallel::sequential_tag);
636 template<typename _RAIter, typename _Compare>
637 void
638 nth_element(_RAIter, _RAIter, _RAIter, _Compare);
640 template<typename _RAIter>
641 void
642 nth_element(_RAIter, _RAIter, _RAIter);
644 template<typename _RAIter, typename _Compare>
645 void
646 partial_sort(_RAIter, _RAIter, _RAIter, _Compare,
647 __gnu_parallel::sequential_tag);
649 template<typename _RAIter>
650 void
651 partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
653 template<typename _RAIter, typename _Compare>
654 void
655 partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
657 template<typename _RAIter>
658 void
659 partial_sort(_RAIter, _RAIter, _RAIter);
661 template<typename _FIter, typename _Predicate>
662 _FIter
663 partition(_FIter, _FIter, _Predicate, __gnu_parallel::sequential_tag);
665 template<typename _FIter, typename _Predicate>
666 _FIter
667 partition(_FIter, _FIter, _Predicate);
669 template<typename _FIter, typename _Predicate, typename _IterTag>
670 _FIter
671 __partition_switch(_FIter, _FIter, _Predicate, _IterTag);
673 template<typename _RAIter, typename _Predicate>
674 _RAIter
675 __partition_switch(
676 _RAIter, _RAIter, _Predicate, random_access_iterator_tag);
678 template<typename _RAIter>
679 void
680 random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
682 template<typename _RAIter, typename _RandomNumberGenerator>
683 void
684 random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&,
685 __gnu_parallel::sequential_tag);
687 template<typename _RAIter>
688 void
689 random_shuffle(_RAIter, _RAIter);
691 template<typename _RAIter, typename _RandomNumberGenerator>
692 void
693 random_shuffle(_RAIter, _RAIter,
694 #if __cplusplus >= 201103L
695 _RandomNumberGenerator&&);
696 #else
697 _RandomNumberGenerator&);
698 #endif
700 template<typename _IIter1, typename _IIter2, typename _OIter>
701 _OIter
702 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
703 __gnu_parallel::sequential_tag);
705 template<typename _IIter1, typename _IIter2, typename _OIter,
706 typename _Predicate>
707 _OIter
708 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
709 __gnu_parallel::sequential_tag);
711 template<typename _IIter1, typename _IIter2, typename _OIter>
712 _OIter
713 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
715 template<typename _IIter1, typename _IIter2, typename _OIter,
716 typename _Predicate>
717 _OIter
718 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
720 template<typename _IIter1, typename _IIter2, typename _Predicate,
721 typename _OIter, typename _IterTag1, typename _IterTag2,
722 typename _IterTag3>
723 _OIter
724 __set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
725 _Predicate, _IterTag1, _IterTag2, _IterTag3);
727 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
728 typename _Predicate>
729 _Output_RAIter
730 __set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _Output_RAIter,
731 _Predicate, random_access_iterator_tag,
732 random_access_iterator_tag, random_access_iterator_tag);
734 template<typename _IIter1, typename _IIter2, typename _OIter>
735 _OIter
736 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
737 __gnu_parallel::sequential_tag);
739 template<typename _IIter1, typename _IIter2, typename _OIter,
740 typename _Predicate>
741 _OIter
742 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
743 __gnu_parallel::sequential_tag);
745 template<typename _IIter1, typename _IIter2, typename _OIter>
746 _OIter
747 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
749 template<typename _IIter1, typename _IIter2, typename _OIter,
750 typename _Predicate>
751 _OIter
752 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
754 template<typename _IIter1, typename _IIter2, typename _Predicate,
755 typename _OIter, typename _IterTag1, typename _IterTag2,
756 typename _IterTag3>
757 _OIter
758 __set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
759 _Predicate, _IterTag1, _IterTag2, _IterTag3);
761 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
762 typename _Predicate>
763 _Output_RAIter
764 __set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
765 _Output_RAIter, _Predicate,
766 random_access_iterator_tag,
767 random_access_iterator_tag,
768 random_access_iterator_tag);
770 template<typename _IIter1, typename _IIter2, typename _OIter>
771 _OIter
772 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
773 __gnu_parallel::sequential_tag);
775 template<typename _IIter1, typename _IIter2, typename _OIter,
776 typename _Predicate>
777 _OIter
778 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
779 _Predicate, __gnu_parallel::sequential_tag);
781 template<typename _IIter1, typename _IIter2, typename _OIter>
782 _OIter
783 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
785 template<typename _IIter1, typename _IIter2, typename _OIter,
786 typename _Predicate>
787 _OIter
788 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
789 _Predicate);
791 template<typename _IIter1, typename _IIter2, typename _Predicate,
792 typename _OIter, typename _IterTag1, typename _IterTag2,
793 typename _IterTag3>
794 _OIter
795 __set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2,
796 _OIter, _Predicate, _IterTag1, _IterTag2,
797 _IterTag3);
799 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
800 typename _Predicate>
801 _Output_RAIter
802 __set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
803 _Output_RAIter, _Predicate,
804 random_access_iterator_tag,
805 random_access_iterator_tag,
806 random_access_iterator_tag);
809 template<typename _IIter1, typename _IIter2, typename _OIter>
810 _OIter
811 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
812 __gnu_parallel::sequential_tag);
814 template<typename _IIter1, typename _IIter2, typename _OIter,
815 typename _Predicate>
816 _OIter
817 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
818 __gnu_parallel::sequential_tag);
820 template<typename _IIter1, typename _IIter2, typename _OIter>
821 _OIter
822 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
824 template<typename _IIter1, typename _IIter2, typename _OIter,
825 typename _Predicate>
826 _OIter
827 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
829 template<typename _IIter1, typename _IIter2, typename _Predicate,
830 typename _OIter, typename _IterTag1, typename _IterTag2,
831 typename _IterTag3>
832 _OIter
833 __set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
834 _Predicate, _IterTag1, _IterTag2, _IterTag3);
836 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
837 typename _Predicate>
838 _Output_RAIter
839 __set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
840 _Output_RAIter, _Predicate,
841 random_access_iterator_tag,
842 random_access_iterator_tag,
843 random_access_iterator_tag);
846 template<typename _RAIter>
847 void
848 sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
850 template<typename _RAIter, typename _Compare>
851 void
852 sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
854 template<typename _RAIter>
855 void
856 sort(_RAIter, _RAIter);
858 template<typename _RAIter, typename _Compare>
859 void
860 sort(_RAIter, _RAIter, _Compare);
862 template<typename _RAIter>
863 void
864 stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
866 template<typename _RAIter, typename _Compare>
867 void
868 stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
870 template<typename _RAIter>
871 void
872 stable_sort(_RAIter, _RAIter);
874 template<typename _RAIter, typename _Compare>
875 void
876 stable_sort(_RAIter, _RAIter, _Compare);
878 template<typename _IIter, typename _OIter>
879 _OIter
880 unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
882 template<typename _IIter, typename _OIter, typename _Predicate>
883 _OIter
884 unique_copy(_IIter, _IIter, _OIter, _Predicate,
885 __gnu_parallel::sequential_tag);
887 template<typename _IIter, typename _OIter>
888 _OIter
889 unique_copy(_IIter, _IIter, _OIter);
891 template<typename _IIter, typename _OIter, typename _Predicate>
892 _OIter
893 unique_copy(_IIter, _IIter, _OIter, _Predicate);
895 template<typename _IIter, typename _OIter, typename _Predicate,
896 typename _IterTag1, typename _IterTag2>
897 _OIter
898 __unique_copy_switch(_IIter, _IIter, _OIter, _Predicate,
899 _IterTag1, _IterTag2);
901 template<typename _RAIter, typename _RandomAccess_OIter, typename _Predicate>
902 _RandomAccess_OIter
903 __unique_copy_switch(_RAIter, _RAIter, _RandomAccess_OIter, _Predicate,
904 random_access_iterator_tag, random_access_iterator_tag);
905 } // end namespace __parallel
906 } // end namespace std
908 #endif /* _GLIBCXX_PARALLEL_ALGORITHMFWD_H */