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