libstdc++: algorithmfwd.h Source File

libstdc++

parallel/algorithmfwd.h
Go to the documentation of this file.
1// <parallel/algorithm> Forward declarations -*- C++ -*-
2
3// Copyright (C) 2007-2026 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.
10
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.
15
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.
19
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/>.
24
25/** @file parallel/algorithmfwd.h
26 * This file is a GNU parallel extension to the Standard C++ Library.
27 */
28
29#ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H
30#define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1
31
32#ifdef _GLIBCXX_SYSHDR
33#pragma GCC system_header
34#endif
35
36#include <parallel/tags.h>
37#include <parallel/settings.h>
38
39namespace std _GLIBCXX_VISIBILITY(default)
40{
41namespace __parallel
42{
43 template<typename _FIter>
44 _FIter
45 adjacent_find(_FIter, _FIter);
46
47 template<typename _FIter>
48 _FIter
49 adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag);
50
51 template<typename _FIter, typename _IterTag>
52 _FIter
53 __adjacent_find_switch(_FIter, _FIter, _IterTag);
54
55 template<typename _RAIter>
56 _RAIter
57 __adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag);
58
59
60 template<typename _FIter, typename _BiPredicate>
61 _FIter
62 adjacent_find(_FIter, _FIter, _BiPredicate);
63
64 template<typename _FIter, typename _BiPredicate>
65 _FIter
66 adjacent_find(_FIter, _FIter, _BiPredicate,
67 __gnu_parallel::sequential_tag);
68
69 template<typename _FIter, typename _BiPredicate, typename _IterTag>
70 _FIter
71 __adjacent_find_switch(_FIter, _FIter, _BiPredicate, _IterTag);
72
73 template<typename _RAIter, typename _BiPredicate>
74 _RAIter
75 __adjacent_find_switch(_RAIter, _RAIter, _BiPredicate,
76 random_access_iterator_tag);
77
78
79 template<typename _IIter, typename _Tp>
80 typename iterator_traits<_IIter>::difference_type
81 count(_IIter, _IIter, const _Tp&);
82
83 template<typename _IIter, typename _Tp>
84 typename iterator_traits<_IIter>::difference_type
85 count(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
86
87 template<typename _IIter, typename _Tp>
88 typename iterator_traits<_IIter>::difference_type
89 count(_IIter, _IIter, const _Tp&, __gnu_parallel::_Parallelism);
90
91 template<typename _IIter, typename _Tp, typename _IterTag>
92 typename iterator_traits<_IIter>::difference_type
93 __count_switch(_IIter, _IIter, const _Tp&, _IterTag);
94
95 template<typename _RAIter, typename _Tp>
96 typename iterator_traits<_RAIter>::difference_type
97 __count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag,
98 __gnu_parallel::_Parallelism __parallelism
99 = __gnu_parallel::parallel_unbalanced);
100
101
102 template<typename _IIter, typename _Predicate>
103 typename iterator_traits<_IIter>::difference_type
104 count_if(_IIter, _IIter, _Predicate);
105
106 template<typename _IIter, typename _Predicate>
107 typename iterator_traits<_IIter>::difference_type
108 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
109
110 template<typename _IIter, typename _Predicate>
111 typename iterator_traits<_IIter>::difference_type
112 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::_Parallelism);
113
114 template<typename _IIter, typename _Predicate, typename _IterTag>
115 typename iterator_traits<_IIter>::difference_type
116 __count_if_switch(_IIter, _IIter, _Predicate, _IterTag);
117
118 template<typename _RAIter, typename _Predicate>
119 typename iterator_traits<_RAIter>::difference_type
120 __count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag,
121 __gnu_parallel::_Parallelism __parallelism
122 = __gnu_parallel::parallel_unbalanced);
123
124 // algobase.h
125 template<typename _IIter1, typename _IIter2>
126 bool
127 equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
128
129 template<typename _IIter1, typename _IIter2, typename _Predicate>
130 bool
131 equal(_IIter1, _IIter1, _IIter2, _Predicate,
132 __gnu_parallel::sequential_tag);
133
134 template<typename _IIter1, typename _IIter2>
135 _GLIBCXX20_CONSTEXPR
136 bool
137 equal(_IIter1, _IIter1, _IIter2);
138
139 template<typename _IIter1, typename _IIter2, typename _Predicate>
140 _GLIBCXX20_CONSTEXPR
141 bool
142 equal(_IIter1, _IIter1, _IIter2, _Predicate);
143
144 template<typename _IIter, typename _Tp>
145 _IIter
146 find(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
147
148 template<typename _IIter, typename _Tp>
149 _IIter
150 find(_IIter, _IIter, const _Tp& __val);
151
152 template<typename _IIter, typename _Tp, typename _IterTag>
153 _IIter
154 __find_switch(_IIter, _IIter, const _Tp&, _IterTag);
155
156 template<typename _RAIter, typename _Tp>
157 _RAIter
158 __find_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag);
159
160 template<typename _IIter, typename _Predicate>
161 _IIter
162 find_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
163
164 template<typename _IIter, typename _Predicate>
165 _IIter
166 find_if(_IIter, _IIter, _Predicate);
167
168 template<typename _IIter, typename _Predicate, typename _IterTag>
169 _IIter
170 __find_if_switch(_IIter, _IIter, _Predicate, _IterTag);
171
172 template<typename _RAIter, typename _Predicate>
173 _RAIter
174 __find_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag);
175
176 template<typename _IIter, typename _FIter>
177 _IIter
178 find_first_of(_IIter, _IIter, _FIter, _FIter,
179 __gnu_parallel::sequential_tag);
180
181 template<typename _IIter, typename _FIter, typename _BiPredicate>
182 _IIter
183 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
184 __gnu_parallel::sequential_tag);
185
186 template<typename _IIter, typename _FIter, typename _BiPredicate>
187 _IIter
188 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate);
189
190 template<typename _IIter, typename _FIter>
191 _IIter
192 find_first_of(_IIter, _IIter, _FIter, _FIter);
193
194 template<typename _IIter, typename _FIter,
195 typename _IterTag1, typename _IterTag2>
196 _IIter
197 __find_first_of_switch(
198 _IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2);
199
200 template<typename _RAIter, typename _FIter, typename _BiPredicate,
201 typename _IterTag>
202 _RAIter
203 __find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, _BiPredicate,
204 random_access_iterator_tag, _IterTag);
205
206 template<typename _IIter, typename _FIter, typename _BiPredicate,
207 typename _IterTag1, typename _IterTag2>
208 _IIter
209 __find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
210 _IterTag1, _IterTag2);
211
212
213 template<typename _IIter, typename _Function>
214 _Function
215 for_each(_IIter, _IIter, _Function);
216
217 template<typename _IIter, typename _Function>
218 _Function
219 for_each(_IIter, _IIter, _Function, __gnu_parallel::sequential_tag);
220
221 template<typename _Iterator, typename _Function>
222 _Function
223 for_each(_Iterator, _Iterator, _Function, __gnu_parallel::_Parallelism);
224
225 template<typename _IIter, typename _Function, typename _IterTag>
226 _Function
227 __for_each_switch(_IIter, _IIter, _Function, _IterTag);
228
229 template<typename _RAIter, typename _Function>
230 _Function
231 __for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag,
232 __gnu_parallel::_Parallelism __parallelism
233 = __gnu_parallel::parallel_balanced);
234
235
236 template<typename _FIter, typename _Generator>
237 void
238 generate(_FIter, _FIter, _Generator);
239
240 template<typename _FIter, typename _Generator>
241 void
242 generate(_FIter, _FIter, _Generator, __gnu_parallel::sequential_tag);
243
244 template<typename _FIter, typename _Generator>
245 void
246 generate(_FIter, _FIter, _Generator, __gnu_parallel::_Parallelism);
247
248 template<typename _FIter, typename _Generator, typename _IterTag>
249 void
250 __generate_switch(_FIter, _FIter, _Generator, _IterTag);
251
252 template<typename _RAIter, typename _Generator>
253 void
254 __generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag,
255 __gnu_parallel::_Parallelism __parallelism
256 = __gnu_parallel::parallel_balanced);
257
258 template<typename _OIter, typename _Size, typename _Generator>
259 _OIter
260 generate_n(_OIter, _Size, _Generator);
261
262 template<typename _OIter, typename _Size, typename _Generator>
263 _OIter
264 generate_n(_OIter, _Size, _Generator, __gnu_parallel::sequential_tag);
265
266 template<typename _OIter, typename _Size, typename _Generator>
267 _OIter
268 generate_n(_OIter, _Size, _Generator, __gnu_parallel::_Parallelism);
269
270 template<typename _OIter, typename _Size, typename _Generator,
271 typename _IterTag>
272 _OIter
273 __generate_n_switch(_OIter, _Size, _Generator, _IterTag);
274
275 template<typename _RAIter, typename _Size, typename _Generator>
276 _RAIter
277 __generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag,
278 __gnu_parallel::_Parallelism __parallelism
279 = __gnu_parallel::parallel_balanced);
280
281 template<typename _IIter1, typename _IIter2>
282 bool
283 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2,
284 __gnu_parallel::sequential_tag);
285
286 template<typename _IIter1, typename _IIter2, typename _Predicate>
287 bool
288 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate,
289 __gnu_parallel::sequential_tag);
290
291 template<typename _IIter1, typename _IIter2>
292 _GLIBCXX20_CONSTEXPR
293 bool
294 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
295
296 template<typename _IIter1, typename _IIter2, typename _Predicate>
297 _GLIBCXX20_CONSTEXPR
298 bool
299 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate);
300
301 template<typename _IIter1, typename _IIter2,
302 typename _Predicate, typename _IterTag1, typename _IterTag2>
303 bool
304 __lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2,
305 _Predicate, _IterTag1, _IterTag2);
306
307 template<typename _RAIter1, typename _RAIter2, typename _Predicate>
308 bool
309 __lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
310 _Predicate, random_access_iterator_tag,
311 random_access_iterator_tag);
312
313 // algo.h
314 template<typename _IIter1, typename _IIter2>
315 pair<_IIter1, _IIter2>
316 mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
317
318 template<typename _IIter1, typename _IIter2, typename _Predicate>
319 pair<_IIter1, _IIter2>
320 mismatch(_IIter1, _IIter1, _IIter2, _Predicate,
321 __gnu_parallel::sequential_tag);
322
323 template<typename _IIter1, typename _IIter2>
324 pair<_IIter1, _IIter2>
325 mismatch(_IIter1, _IIter1, _IIter2);
326
327 template<typename _IIter1, typename _IIter2, typename _Predicate>
328 pair<_IIter1, _IIter2>
329 mismatch(_IIter1, _IIter1, _IIter2, _Predicate);
330
331 template<typename _IIter1, typename _IIter2, typename _Predicate,
332 typename _IterTag1, typename _IterTag2>
333 pair<_IIter1, _IIter2>
334 __mismatch_switch(_IIter1, _IIter1, _IIter2, _Predicate,
335 _IterTag1, _IterTag2);
336
337 template<typename _RAIter1, typename _RAIter2, typename _Predicate>
338 pair<_RAIter1, _RAIter2>
339 __mismatch_switch(_RAIter1, _RAIter1, _RAIter2, _Predicate,
340 random_access_iterator_tag, random_access_iterator_tag);
341
342 template<typename _FIter1, typename _FIter2>
343 _FIter1
344 search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag);
345
346 template<typename _FIter1, typename _FIter2>
347 _FIter1
348 search(_FIter1, _FIter1, _FIter2, _FIter2);
349
350 template<typename _FIter1, typename _FIter2, typename _BiPredicate>
351 _FIter1
352 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
353 __gnu_parallel::sequential_tag);
354
355 template<typename _FIter1, typename _FIter2, typename _BiPredicate>
356 _GLIBCXX20_CONSTEXPR
357 _FIter1
358 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate);
359
360 template<typename _RAIter1, typename _RAIter2>
361 _RAIter1
362 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
363 random_access_iterator_tag, random_access_iterator_tag);
364
365 template<typename _FIter1, typename _FIter2, typename _IterTag1,
366 typename _IterTag2>
367 _FIter1
368 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2);
369
370 template<typename _RAIter1, typename _RAIter2, typename _BiPredicate>
371 _RAIter1
372 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _BiPredicate,
373 random_access_iterator_tag, random_access_iterator_tag);
374
375 template<typename _FIter1, typename _FIter2, typename _BiPredicate,
376 typename _IterTag1, typename _IterTag2>
377 _FIter1
378 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
379 _IterTag1, _IterTag2);
380
381 template<typename _FIter, typename _Integer, typename _Tp>
382 _FIter
383 search_n(_FIter, _FIter, _Integer, const _Tp&,
384 __gnu_parallel::sequential_tag);
385
386 template<typename _FIter, typename _Integer, typename _Tp,
387 typename _BiPredicate>
388 _FIter
389 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate,
390 __gnu_parallel::sequential_tag);
391
392 template<typename _FIter, typename _Integer, typename _Tp>
393 _FIter
394 search_n(_FIter, _FIter, _Integer, const _Tp&);
395
396 template<typename _FIter, typename _Integer, typename _Tp,
397 typename _BiPredicate>
398 _FIter
399 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate);
400
401 template<typename _RAIter, typename _Integer, typename _Tp,
402 typename _BiPredicate>
403 _RAIter
404 __search_n_switch(_RAIter, _RAIter, _Integer, const _Tp&,
405 _BiPredicate, random_access_iterator_tag);
406
407 template<typename _FIter, typename _Integer, typename _Tp,
408 typename _BiPredicate, typename _IterTag>
409 _FIter
410 __search_n_switch(_FIter, _FIter, _Integer, const _Tp&,
411 _BiPredicate, _IterTag);
412
413
414 template<typename _IIter, typename _OIter, typename _UnaryOperation>
415 _OIter
416 transform(_IIter, _IIter, _OIter, _UnaryOperation);
417
418 template<typename _IIter, typename _OIter, typename _UnaryOperation>
419 _OIter
420 transform(_IIter, _IIter, _OIter, _UnaryOperation,
421 __gnu_parallel::sequential_tag);
422
423 template<typename _IIter, typename _OIter, typename _UnaryOperation>
424 _OIter
425 transform(_IIter, _IIter, _OIter, _UnaryOperation,
426 __gnu_parallel::_Parallelism);
427
428 template<typename _IIter, typename _OIter, typename _UnaryOperation,
429 typename _IterTag1, typename _IterTag2>
430 _OIter
431 __transform1_switch(_IIter, _IIter, _OIter, _UnaryOperation,
432 _IterTag1, _IterTag2);
433
434
435 template<typename _RAIIter, typename _RAOIter, typename _UnaryOperation>
436 _RAOIter
437 __transform1_switch(_RAIIter, _RAIIter, _RAOIter, _UnaryOperation,
438 random_access_iterator_tag, random_access_iterator_tag,
439 __gnu_parallel::_Parallelism __parallelism
440 = __gnu_parallel::parallel_balanced);
441
442
443 template<typename _IIter1, typename _IIter2, typename _OIter,
444 typename _BiOperation>
445 _OIter
446 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation);
447
448 template<typename _IIter1, typename _IIter2, typename _OIter,
449 typename _BiOperation>
450 _OIter
451 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
452 __gnu_parallel::sequential_tag);
453
454 template<typename _IIter1, typename _IIter2, typename _OIter,
455 typename _BiOperation>
456 _OIter
457 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
458 __gnu_parallel::_Parallelism);
459
460 template<typename _RAIter1, typename _RAIter2, typename _RAIter3,
461 typename _BiOperation>
462 _RAIter3
463 __transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation,
464 random_access_iterator_tag, random_access_iterator_tag,
465 random_access_iterator_tag,
466 __gnu_parallel::_Parallelism __parallelism
467 = __gnu_parallel::parallel_balanced);
468
469 template<typename _IIter1, typename _IIter2, typename _OIter,
470 typename _BiOperation, typename _Tag1,
471 typename _Tag2, typename _Tag3>
472 _OIter
473 __transform2_switch(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
474 _Tag1, _Tag2, _Tag3);
475
476
477 template<typename _FIter, typename _Tp>
478 void
479 replace(_FIter, _FIter, const _Tp&, const _Tp&);
480
481 template<typename _FIter, typename _Tp>
482 void
483 replace(_FIter, _FIter, const _Tp&, const _Tp&,
484 __gnu_parallel::sequential_tag);
485
486 template<typename _FIter, typename _Tp>
487 void
488 replace(_FIter, _FIter, const _Tp&, const _Tp&,
489 __gnu_parallel::_Parallelism);
490
491 template<typename _FIter, typename _Tp, typename _IterTag>
492 void
493 __replace_switch(_FIter, _FIter, const _Tp&, const _Tp&, _IterTag);
494
495 template<typename _RAIter, typename _Tp>
496 void
497 __replace_switch(_RAIter, _RAIter, const _Tp&, const _Tp&,
498 random_access_iterator_tag, __gnu_parallel::_Parallelism);
499
500
501 template<typename _FIter, typename _Predicate, typename _Tp>
502 void
503 replace_if(_FIter, _FIter, _Predicate, const _Tp&);
504
505 template<typename _FIter, typename _Predicate, typename _Tp>
506 void
507 replace_if(_FIter, _FIter, _Predicate, const _Tp&,
508 __gnu_parallel::sequential_tag);
509
510 template<typename _FIter, typename _Predicate, typename _Tp>
511 void
512 replace_if(_FIter, _FIter, _Predicate, const _Tp&,
513 __gnu_parallel::_Parallelism);
514
515 template<typename _FIter, typename _Predicate, typename _Tp,
516 typename _IterTag>
517 void
518 __replace_if_switch(_FIter, _FIter, _Predicate, const _Tp&, _IterTag);
519
520 template<typename _RAIter, typename _Predicate, typename _Tp>
521 void
522 __replace_if_switch(_RAIter, _RAIter, _Predicate, const _Tp&,
523 random_access_iterator_tag,
524 __gnu_parallel::_Parallelism);
525
526
527 template<typename _FIter>
528 _FIter
529 max_element(_FIter, _FIter);
530
531 template<typename _FIter>
532 _FIter
533 max_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
534
535 template<typename _FIter>
536 _FIter
537 max_element(_FIter, _FIter, __gnu_parallel::_Parallelism);
538
539 template<typename _FIter, typename _Compare>
540 _FIter
541 max_element(_FIter, _FIter, _Compare);
542
543 template<typename _FIter, typename _Compare>
544 _FIter
545 max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
546
547 template<typename _FIter, typename _Compare>
548 _FIter
549 max_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
550
551 template<typename _FIter, typename _Compare, typename _IterTag>
552 _FIter
553 __max_element_switch(_FIter, _FIter, _Compare, _IterTag);
554
555 template<typename _RAIter, typename _Compare>
556 _RAIter
557 __max_element_switch(
558 _RAIter, _RAIter, _Compare, random_access_iterator_tag,
559 __gnu_parallel::_Parallelism __parallelism
560 = __gnu_parallel::parallel_balanced);
561
562
563 template<typename _IIter1, typename _IIter2, typename _OIter>
564 _OIter
565 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
566 __gnu_parallel::sequential_tag);
567
568 template<typename _IIter1, typename _IIter2, typename _OIter,
569 typename _Compare>
570 _OIter
571 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
572 __gnu_parallel::sequential_tag);
573
574 template<typename _IIter1, typename _IIter2, typename _OIter,
575 typename _Compare>
576 _OIter
577 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
578
579 template<typename _IIter1, typename _IIter2, typename _OIter>
580 _OIter
581 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
582
583 template<typename _IIter1, typename _IIter2, typename _OIter,
584 typename _Compare, typename _IterTag1, typename _IterTag2,
585 typename _IterTag3>
586 _OIter
587 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
588 _IterTag1, _IterTag2, _IterTag3);
589
590 template<typename _IIter1, typename _IIter2, typename _OIter,
591 typename _Compare>
592 _OIter
593 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
594 random_access_iterator_tag, random_access_iterator_tag,
595 random_access_iterator_tag);
596
597
598 template<typename _FIter>
599 _FIter
600 min_element(_FIter, _FIter);
601
602 template<typename _FIter>
603 _FIter
604 min_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
605
606 template<typename _FIter>
607 _FIter
608 min_element(_FIter, _FIter,
609 __gnu_parallel::_Parallelism __parallelism_tag);
610
611 template<typename _FIter, typename _Compare>
612 _FIter
613 min_element(_FIter, _FIter, _Compare);
614
615 template<typename _FIter, typename _Compare>
616 _FIter
617 min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
618
619 template<typename _FIter, typename _Compare>
620 _FIter
621 min_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
622
623 template<typename _FIter, typename _Compare, typename _IterTag>
624 _FIter
625 __min_element_switch(_FIter, _FIter, _Compare, _IterTag);
626
627 template<typename _RAIter, typename _Compare>
628 _RAIter
629 __min_element_switch(
630 _RAIter, _RAIter, _Compare, random_access_iterator_tag,
631 __gnu_parallel::_Parallelism __parallelism
632 = __gnu_parallel::parallel_balanced);
633
634 template<typename _RAIter>
635 void
636 nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
637
638 template<typename _RAIter, typename _Compare>
639 void
640 nth_element(_RAIter, _RAIter, _RAIter, _Compare,
641 __gnu_parallel::sequential_tag);
642
643 template<typename _RAIter, typename _Compare>
644 void
645 nth_element(_RAIter, _RAIter, _RAIter, _Compare);
646
647 template<typename _RAIter>
648 void
649 nth_element(_RAIter, _RAIter, _RAIter);
650
651 template<typename _RAIter, typename _Compare>
652 void
653 partial_sort(_RAIter, _RAIter, _RAIter, _Compare,
654 __gnu_parallel::sequential_tag);
655
656 template<typename _RAIter>
657 void
658 partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
659
660 template<typename _RAIter, typename _Compare>
661 void
662 partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
663
664 template<typename _RAIter>
665 void
666 partial_sort(_RAIter, _RAIter, _RAIter);
667
668 template<typename _FIter, typename _Predicate>
669 _FIter
670 partition(_FIter, _FIter, _Predicate, __gnu_parallel::sequential_tag);
671
672 template<typename _FIter, typename _Predicate>
673 _FIter
674 partition(_FIter, _FIter, _Predicate);
675
676 template<typename _FIter, typename _Predicate, typename _IterTag>
677 _FIter
678 __partition_switch(_FIter, _FIter, _Predicate, _IterTag);
679
680 template<typename _RAIter, typename _Predicate>
681 _RAIter
682 __partition_switch(
683 _RAIter, _RAIter, _Predicate, random_access_iterator_tag);
684
685 template<typename _RAIter>
686 void
687 random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
688
689 template<typename _RAIter, typename _RandomNumberGenerator>
690 void
691 random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&,
692 __gnu_parallel::sequential_tag);
693
694 template<typename _RAIter>
695 void
696 random_shuffle(_RAIter, _RAIter);
697
698 template<typename _RAIter, typename _RandomNumberGenerator>
699 void
700 random_shuffle(_RAIter, _RAIter,
701#if __cplusplus >= 201103L
702 _RandomNumberGenerator&&);
703#else
704 _RandomNumberGenerator&);
705#endif
706
707 template<typename _IIter1, typename _IIter2, typename _OIter>
708 _OIter
709 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
710 __gnu_parallel::sequential_tag);
711
712 template<typename _IIter1, typename _IIter2, typename _OIter,
713 typename _Predicate>
714 _OIter
715 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
716 __gnu_parallel::sequential_tag);
717
718 template<typename _IIter1, typename _IIter2, typename _OIter>
719 _OIter
720 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
721
722 template<typename _IIter1, typename _IIter2, typename _OIter,
723 typename _Predicate>
724 _OIter
725 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
726
727 template<typename _IIter1, typename _IIter2, typename _Predicate,
728 typename _OIter, typename _IterTag1, typename _IterTag2,
729 typename _IterTag3>
730 _OIter
731 __set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
732 _Predicate, _IterTag1, _IterTag2, _IterTag3);
733
734 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
735 typename _Predicate>
736 _Output_RAIter
737 __set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _Output_RAIter,
738 _Predicate, random_access_iterator_tag,
739 random_access_iterator_tag, random_access_iterator_tag);
740
741 template<typename _IIter1, typename _IIter2, typename _OIter>
742 _OIter
743 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
744 __gnu_parallel::sequential_tag);
745
746 template<typename _IIter1, typename _IIter2, typename _OIter,
747 typename _Predicate>
748 _OIter
749 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
750 __gnu_parallel::sequential_tag);
751
752 template<typename _IIter1, typename _IIter2, typename _OIter>
753 _OIter
754 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
755
756 template<typename _IIter1, typename _IIter2, typename _OIter,
757 typename _Predicate>
758 _OIter
759 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
760
761 template<typename _IIter1, typename _IIter2, typename _Predicate,
762 typename _OIter, typename _IterTag1, typename _IterTag2,
763 typename _IterTag3>
764 _OIter
765 __set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
766 _Predicate, _IterTag1, _IterTag2, _IterTag3);
767
768 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
769 typename _Predicate>
770 _Output_RAIter
771 __set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
772 _Output_RAIter, _Predicate,
773 random_access_iterator_tag,
774 random_access_iterator_tag,
775 random_access_iterator_tag);
776
777 template<typename _IIter1, typename _IIter2, typename _OIter>
778 _OIter
779 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
780 __gnu_parallel::sequential_tag);
781
782 template<typename _IIter1, typename _IIter2, typename _OIter,
783 typename _Predicate>
784 _OIter
785 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
786 _Predicate, __gnu_parallel::sequential_tag);
787
788 template<typename _IIter1, typename _IIter2, typename _OIter>
789 _OIter
790 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
791
792 template<typename _IIter1, typename _IIter2, typename _OIter,
793 typename _Predicate>
794 _OIter
795 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
796 _Predicate);
797
798 template<typename _IIter1, typename _IIter2, typename _Predicate,
799 typename _OIter, typename _IterTag1, typename _IterTag2,
800 typename _IterTag3>
801 _OIter
802 __set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2,
803 _OIter, _Predicate, _IterTag1, _IterTag2,
804 _IterTag3);
805
806 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
807 typename _Predicate>
808 _Output_RAIter
809 __set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
810 _Output_RAIter, _Predicate,
811 random_access_iterator_tag,
812 random_access_iterator_tag,
813 random_access_iterator_tag);
814
815
816 template<typename _IIter1, typename _IIter2, typename _OIter>
817 _OIter
818 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
819 __gnu_parallel::sequential_tag);
820
821 template<typename _IIter1, typename _IIter2, typename _OIter,
822 typename _Predicate>
823 _OIter
824 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
825 __gnu_parallel::sequential_tag);
826
827 template<typename _IIter1, typename _IIter2, typename _OIter>
828 _OIter
829 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
830
831 template<typename _IIter1, typename _IIter2, typename _OIter,
832 typename _Predicate>
833 _OIter
834 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
835
836 template<typename _IIter1, typename _IIter2, typename _Predicate,
837 typename _OIter, typename _IterTag1, typename _IterTag2,
838 typename _IterTag3>
839 _OIter
840 __set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
841 _Predicate, _IterTag1, _IterTag2, _IterTag3);
842
843 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
844 typename _Predicate>
845 _Output_RAIter
846 __set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
847 _Output_RAIter, _Predicate,
848 random_access_iterator_tag,
849 random_access_iterator_tag,
850 random_access_iterator_tag);
851
852
853 template<typename _RAIter>
854 void
855 sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
856
857 template<typename _RAIter, typename _Compare>
858 void
859 sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
860
861 template<typename _RAIter>
862 void
863 sort(_RAIter, _RAIter);
864
865 template<typename _RAIter, typename _Compare>
866 void
867 sort(_RAIter, _RAIter, _Compare);
868
869 template<typename _RAIter>
870 void
871 stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
872
873 template<typename _RAIter, typename _Compare>
874 void
875 stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
876
877 template<typename _RAIter>
878 void
879 stable_sort(_RAIter, _RAIter);
880
881 template<typename _RAIter, typename _Compare>
882 void
883 stable_sort(_RAIter, _RAIter, _Compare);
884
885 template<typename _IIter, typename _OIter>
886 _OIter
887 unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
888
889 template<typename _IIter, typename _OIter, typename _Predicate>
890 _OIter
891 unique_copy(_IIter, _IIter, _OIter, _Predicate,
892 __gnu_parallel::sequential_tag);
893
894 template<typename _IIter, typename _OIter>
895 _OIter
896 unique_copy(_IIter, _IIter, _OIter);
897
898 template<typename _IIter, typename _OIter, typename _Predicate>
899 _OIter
900 unique_copy(_IIter, _IIter, _OIter, _Predicate);
901
902 template<typename _IIter, typename _OIter, typename _Predicate,
903 typename _IterTag1, typename _IterTag2>
904 _OIter
905 __unique_copy_switch(_IIter, _IIter, _OIter, _Predicate,
906 _IterTag1, _IterTag2);
907
908 template<typename _RAIter, typename _RandomAccess_OIter, typename _Predicate>
909 _RandomAccess_OIter
910 __unique_copy_switch(_RAIter, _RAIter, _RandomAccess_OIter, _Predicate,
911 random_access_iterator_tag, random_access_iterator_tag);
912} // end namespace __parallel
913} // end namespace std
914
915#endif /* _GLIBCXX_PARALLEL_ALGORITHMFWD_H */
settings.h
Runtime settings and tuning parameters, heuristics to decide whether to use parallelized algorithms.
tags.h
Tags for compile-time selection. This file is a GNU parallel extension to the Standard C++ Library.
std::pair::pair
pair(_T1, _T2) -> pair< _T1, _T2 >
Two pairs are equal iff their members are equal.
std
ISO C++ entities toplevel namespace is std.
std::__parallel
GNU parallel code, replaces standard behavior with parallel behavior.
Definition algo.h:64
__gnu_parallel::_Parallelism
_Parallelism
Run-time equivalents for the compile-time tags.
Definition types.h:45
__gnu_parallel::parallel_balanced
@ parallel_balanced
Parallel balanced (work-stealing).
Definition types.h:53
__gnu_parallel::parallel_unbalanced
@ parallel_unbalanced
Parallel unbalanced (equal-sized chunks).
Definition types.h:50