libstdc++
|
00001 // <algorithm> parallel extensions -*- C++ -*- 00002 00003 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 00004 // 00005 // This file is part of the GNU ISO C++ Library. This library is free 00006 // software; you can redistribute it and/or modify it under the terms 00007 // of the GNU General Public License as published by the Free Software 00008 // Foundation; either version 3, or (at your option) any later 00009 // version. 00010 00011 // This library is distributed in the hope that it will be useful, but 00012 // WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // General Public License for more details. 00015 00016 // Under Section 7 of GPL version 3, you are granted additional 00017 // permissions described in the GCC Runtime Library Exception, version 00018 // 3.1, as published by the Free Software Foundation. 00019 00020 // You should have received a copy of the GNU General Public License and 00021 // a copy of the GCC Runtime Library Exception along with this program; 00022 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00023 // <http://www.gnu.org/licenses/>. 00024 00025 /** @file parallel/algorithmfwd.h 00026 * This file is a GNU parallel extension to the Standard C++ Library. 00027 */ 00028 00029 #ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H 00030 #define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1 00031 00032 #pragma GCC system_header 00033 00034 #include <parallel/tags.h> 00035 #include <parallel/settings.h> 00036 00037 namespace std _GLIBCXX_VISIBILITY(default) 00038 { 00039 namespace __parallel 00040 { 00041 template<typename _FIter> 00042 _FIter 00043 adjacent_find(_FIter, _FIter); 00044 00045 template<typename _FIter> 00046 _FIter 00047 adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag); 00048 00049 template<typename _FIter, typename _IterTag> 00050 _FIter 00051 __adjacent_find_switch(_FIter, _FIter, _IterTag); 00052 00053 template<typename _RAIter> 00054 _RAIter 00055 __adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag); 00056 00057 00058 template<typename _FIter, typename _BiPredicate> 00059 _FIter 00060 adjacent_find(_FIter, _FIter, _BiPredicate); 00061 00062 template<typename _FIter, typename _BiPredicate> 00063 _FIter 00064 adjacent_find(_FIter, _FIter, _BiPredicate, 00065 __gnu_parallel::sequential_tag); 00066 00067 template<typename _FIter, typename _BiPredicate, typename _IterTag> 00068 _FIter 00069 __adjacent_find_switch(_FIter, _FIter, _BiPredicate, _IterTag); 00070 00071 template<typename _RAIter, typename _BiPredicate> 00072 _RAIter 00073 __adjacent_find_switch(_RAIter, _RAIter, _BiPredicate, 00074 random_access_iterator_tag); 00075 00076 00077 template<typename _IIter, typename _Tp> 00078 typename iterator_traits<_IIter>::difference_type 00079 count(_IIter, _IIter, const _Tp&); 00080 00081 template<typename _IIter, typename _Tp> 00082 typename iterator_traits<_IIter>::difference_type 00083 count(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag); 00084 00085 template<typename _IIter, typename _Tp> 00086 typename iterator_traits<_IIter>::difference_type 00087 count(_IIter, _IIter, const _Tp&, __gnu_parallel::_Parallelism); 00088 00089 template<typename _IIter, typename _Tp, typename _IterTag> 00090 typename iterator_traits<_IIter>::difference_type 00091 __count_switch(_IIter, _IIter, const _Tp&, _IterTag); 00092 00093 template<typename _RAIter, typename _Tp> 00094 typename iterator_traits<_RAIter>::difference_type 00095 __count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag, 00096 __gnu_parallel::_Parallelism __parallelism 00097 = __gnu_parallel::parallel_unbalanced); 00098 00099 00100 template<typename _IIter, typename _Predicate> 00101 typename iterator_traits<_IIter>::difference_type 00102 count_if(_IIter, _IIter, _Predicate); 00103 00104 template<typename _IIter, typename _Predicate> 00105 typename iterator_traits<_IIter>::difference_type 00106 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag); 00107 00108 template<typename _IIter, typename _Predicate> 00109 typename iterator_traits<_IIter>::difference_type 00110 count_if(_IIter, _IIter, _Predicate, __gnu_parallel::_Parallelism); 00111 00112 template<typename _IIter, typename _Predicate, typename _IterTag> 00113 typename iterator_traits<_IIter>::difference_type 00114 __count_if_switch(_IIter, _IIter, _Predicate, _IterTag); 00115 00116 template<typename _RAIter, typename _Predicate> 00117 typename iterator_traits<_RAIter>::difference_type 00118 __count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag, 00119 __gnu_parallel::_Parallelism __parallelism 00120 = __gnu_parallel::parallel_unbalanced); 00121 00122 // algobase.h 00123 template<typename _IIter1, typename _IIter2> 00124 bool 00125 equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag); 00126 00127 template<typename _IIter1, typename _IIter2, typename _Predicate> 00128 bool 00129 equal(_IIter1, _IIter1, _IIter2, _Predicate, 00130 __gnu_parallel::sequential_tag); 00131 00132 template<typename _IIter1, typename _IIter2> 00133 bool 00134 equal(_IIter1, _IIter1, _IIter2); 00135 00136 template<typename _IIter1, typename _IIter2, typename _Predicate> 00137 bool 00138 equal(_IIter1, _IIter1, _IIter2, _Predicate); 00139 00140 template<typename _IIter, typename _Tp> 00141 _IIter 00142 find(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag); 00143 00144 template<typename _IIter, typename _Tp> 00145 _IIter 00146 find(_IIter, _IIter, const _Tp& __val); 00147 00148 template<typename _IIter, typename _Tp, typename _IterTag> 00149 _IIter 00150 __find_switch(_IIter, _IIter, const _Tp&, _IterTag); 00151 00152 template<typename _RAIter, typename _Tp> 00153 _RAIter 00154 __find_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag); 00155 00156 template<typename _IIter, typename _Predicate> 00157 _IIter 00158 find_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag); 00159 00160 template<typename _IIter, typename _Predicate> 00161 _IIter 00162 find_if(_IIter, _IIter, _Predicate); 00163 00164 template<typename _IIter, typename _Predicate, typename _IterTag> 00165 _IIter 00166 __find_if_switch(_IIter, _IIter, _Predicate, _IterTag); 00167 00168 template<typename _RAIter, typename _Predicate> 00169 _RAIter 00170 __find_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag); 00171 00172 template<typename _IIter, typename _FIter> 00173 _IIter 00174 find_first_of(_IIter, _IIter, _FIter, _FIter, 00175 __gnu_parallel::sequential_tag); 00176 00177 template<typename _IIter, typename _FIter, typename _BiPredicate> 00178 _IIter 00179 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate, 00180 __gnu_parallel::sequential_tag); 00181 00182 template<typename _IIter, typename _FIter, typename _BiPredicate> 00183 _IIter 00184 find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate); 00185 00186 template<typename _IIter, typename _FIter> 00187 _IIter 00188 find_first_of(_IIter, _IIter, _FIter, _FIter); 00189 00190 template<typename _IIter, typename _FIter, 00191 typename _IterTag1, typename _IterTag2> 00192 _IIter 00193 __find_first_of_switch( 00194 _IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2); 00195 00196 template<typename _RAIter, typename _FIter, typename _BiPredicate, 00197 typename _IterTag> 00198 _RAIter 00199 __find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, _BiPredicate, 00200 random_access_iterator_tag, _IterTag); 00201 00202 template<typename _IIter, typename _FIter, typename _BiPredicate, 00203 typename _IterTag1, typename _IterTag2> 00204 _IIter 00205 __find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _BiPredicate, 00206 _IterTag1, _IterTag2); 00207 00208 00209 template<typename _IIter, typename _Function> 00210 _Function 00211 for_each(_IIter, _IIter, _Function); 00212 00213 template<typename _IIter, typename _Function> 00214 _Function 00215 for_each(_IIter, _IIter, _Function, __gnu_parallel::sequential_tag); 00216 00217 template<typename _Iterator, typename _Function> 00218 _Function 00219 for_each(_Iterator, _Iterator, _Function, __gnu_parallel::_Parallelism); 00220 00221 template<typename _IIter, typename _Function, typename _IterTag> 00222 _Function 00223 __for_each_switch(_IIter, _IIter, _Function, _IterTag); 00224 00225 template<typename _RAIter, typename _Function> 00226 _Function 00227 __for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag, 00228 __gnu_parallel::_Parallelism __parallelism 00229 = __gnu_parallel::parallel_balanced); 00230 00231 00232 template<typename _FIter, typename _Generator> 00233 void 00234 generate(_FIter, _FIter, _Generator); 00235 00236 template<typename _FIter, typename _Generator> 00237 void 00238 generate(_FIter, _FIter, _Generator, __gnu_parallel::sequential_tag); 00239 00240 template<typename _FIter, typename _Generator> 00241 void 00242 generate(_FIter, _FIter, _Generator, __gnu_parallel::_Parallelism); 00243 00244 template<typename _FIter, typename _Generator, typename _IterTag> 00245 void 00246 __generate_switch(_FIter, _FIter, _Generator, _IterTag); 00247 00248 template<typename _RAIter, typename _Generator> 00249 void 00250 __generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag, 00251 __gnu_parallel::_Parallelism __parallelism 00252 = __gnu_parallel::parallel_balanced); 00253 00254 template<typename _OIter, typename _Size, typename _Generator> 00255 _OIter 00256 generate_n(_OIter, _Size, _Generator); 00257 00258 template<typename _OIter, typename _Size, typename _Generator> 00259 _OIter 00260 generate_n(_OIter, _Size, _Generator, __gnu_parallel::sequential_tag); 00261 00262 template<typename _OIter, typename _Size, typename _Generator> 00263 _OIter 00264 generate_n(_OIter, _Size, _Generator, __gnu_parallel::_Parallelism); 00265 00266 template<typename _OIter, typename _Size, typename _Generator, 00267 typename _IterTag> 00268 _OIter 00269 __generate_n_switch(_OIter, _Size, _Generator, _IterTag); 00270 00271 template<typename _RAIter, typename _Size, typename _Generator> 00272 _RAIter 00273 __generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag, 00274 __gnu_parallel::_Parallelism __parallelism 00275 = __gnu_parallel::parallel_balanced); 00276 00277 template<typename _IIter1, typename _IIter2> 00278 bool 00279 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, 00280 __gnu_parallel::sequential_tag); 00281 00282 template<typename _IIter1, typename _IIter2, typename _Predicate> 00283 bool 00284 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate, 00285 __gnu_parallel::sequential_tag); 00286 00287 template<typename _IIter1, typename _IIter2> 00288 bool 00289 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); 00290 00291 template<typename _IIter1, typename _IIter2, typename _Predicate> 00292 bool 00293 lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate); 00294 00295 template<typename _IIter1, typename _IIter2, 00296 typename _Predicate, typename _IterTag1, typename _IterTag2> 00297 bool 00298 __lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2, 00299 _Predicate, _IterTag1, _IterTag2); 00300 00301 template<typename _RAIter1, typename _RAIter2, typename _Predicate> 00302 bool 00303 __lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, 00304 _Predicate, random_access_iterator_tag, 00305 random_access_iterator_tag); 00306 00307 // algo.h 00308 template<typename _IIter1, typename _IIter2> 00309 pair<_IIter1, _IIter2> 00310 mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag); 00311 00312 template<typename _IIter1, typename _IIter2, typename _Predicate> 00313 pair<_IIter1, _IIter2> 00314 mismatch(_IIter1, _IIter1, _IIter2, _Predicate, 00315 __gnu_parallel::sequential_tag); 00316 00317 template<typename _IIter1, typename _IIter2> 00318 pair<_IIter1, _IIter2> 00319 mismatch(_IIter1, _IIter1, _IIter2); 00320 00321 template<typename _IIter1, typename _IIter2, typename _Predicate> 00322 pair<_IIter1, _IIter2> 00323 mismatch(_IIter1, _IIter1, _IIter2, _Predicate); 00324 00325 template<typename _IIter1, typename _IIter2, typename _Predicate, 00326 typename _IterTag1, typename _IterTag2> 00327 pair<_IIter1, _IIter2> 00328 __mismatch_switch(_IIter1, _IIter1, _IIter2, _Predicate, 00329 _IterTag1, _IterTag2); 00330 00331 template<typename _RAIter1, typename _RAIter2, typename _Predicate> 00332 pair<_RAIter1, _RAIter2> 00333 __mismatch_switch(_RAIter1, _RAIter1, _RAIter2, _Predicate, 00334 random_access_iterator_tag, random_access_iterator_tag); 00335 00336 template<typename _FIter1, typename _FIter2> 00337 _FIter1 00338 search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag); 00339 00340 template<typename _FIter1, typename _FIter2> 00341 _FIter1 00342 search(_FIter1, _FIter1, _FIter2, _FIter2); 00343 00344 template<typename _FIter1, typename _FIter2, typename _BiPredicate> 00345 _FIter1 00346 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate, 00347 __gnu_parallel::sequential_tag); 00348 00349 template<typename _FIter1, typename _FIter2, typename _BiPredicate> 00350 _FIter1 00351 search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate); 00352 00353 template<typename _RAIter1, typename _RAIter2> 00354 _RAIter1 00355 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, 00356 random_access_iterator_tag, random_access_iterator_tag); 00357 00358 template<typename _FIter1, typename _FIter2, typename _IterTag1, 00359 typename _IterTag2> 00360 _FIter1 00361 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2); 00362 00363 template<typename _RAIter1, typename _RAIter2, typename _BiPredicate> 00364 _RAIter1 00365 __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _BiPredicate, 00366 random_access_iterator_tag, random_access_iterator_tag); 00367 00368 template<typename _FIter1, typename _FIter2, typename _BiPredicate, 00369 typename _IterTag1, typename _IterTag2> 00370 _FIter1 00371 __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate, 00372 _IterTag1, _IterTag2); 00373 00374 template<typename _FIter, typename _Integer, typename _Tp> 00375 _FIter 00376 search_n(_FIter, _FIter, _Integer, const _Tp&, 00377 __gnu_parallel::sequential_tag); 00378 00379 template<typename _FIter, typename _Integer, typename _Tp, 00380 typename _BiPredicate> 00381 _FIter 00382 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate, 00383 __gnu_parallel::sequential_tag); 00384 00385 template<typename _FIter, typename _Integer, typename _Tp> 00386 _FIter 00387 search_n(_FIter, _FIter, _Integer, const _Tp&); 00388 00389 template<typename _FIter, typename _Integer, typename _Tp, 00390 typename _BiPredicate> 00391 _FIter 00392 search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate); 00393 00394 template<typename _RAIter, typename _Integer, typename _Tp, 00395 typename _BiPredicate> 00396 _RAIter 00397 __search_n_switch(_RAIter, _RAIter, _Integer, const _Tp&, 00398 _BiPredicate, random_access_iterator_tag); 00399 00400 template<typename _FIter, typename _Integer, typename _Tp, 00401 typename _BiPredicate, typename _IterTag> 00402 _FIter 00403 __search_n_switch(_FIter, _FIter, _Integer, const _Tp&, 00404 _BiPredicate, _IterTag); 00405 00406 00407 template<typename _IIter, typename _OIter, typename _UnaryOperation> 00408 _OIter 00409 transform(_IIter, _IIter, _OIter, _UnaryOperation); 00410 00411 template<typename _IIter, typename _OIter, typename _UnaryOperation> 00412 _OIter 00413 transform(_IIter, _IIter, _OIter, _UnaryOperation, 00414 __gnu_parallel::sequential_tag); 00415 00416 template<typename _IIter, typename _OIter, typename _UnaryOperation> 00417 _OIter 00418 transform(_IIter, _IIter, _OIter, _UnaryOperation, 00419 __gnu_parallel::_Parallelism); 00420 00421 template<typename _IIter, typename _OIter, typename _UnaryOperation, 00422 typename _IterTag1, typename _IterTag2> 00423 _OIter 00424 __transform1_switch(_IIter, _IIter, _OIter, _UnaryOperation, 00425 _IterTag1, _IterTag2); 00426 00427 00428 template<typename _RAIIter, typename _RAOIter, typename _UnaryOperation> 00429 _RAOIter 00430 __transform1_switch(_RAIIter, _RAIIter, _RAOIter, _UnaryOperation, 00431 random_access_iterator_tag, random_access_iterator_tag, 00432 __gnu_parallel::_Parallelism __parallelism 00433 = __gnu_parallel::parallel_balanced); 00434 00435 00436 template<typename _IIter1, typename _IIter2, typename _OIter, 00437 typename _BiOperation> 00438 _OIter 00439 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation); 00440 00441 template<typename _IIter1, typename _IIter2, typename _OIter, 00442 typename _BiOperation> 00443 _OIter 00444 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation, 00445 __gnu_parallel::sequential_tag); 00446 00447 template<typename _IIter1, typename _IIter2, typename _OIter, 00448 typename _BiOperation> 00449 _OIter 00450 transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation, 00451 __gnu_parallel::_Parallelism); 00452 00453 template<typename _RAIter1, typename _RAIter2, typename _RAIter3, 00454 typename _BiOperation> 00455 _RAIter3 00456 __transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation, 00457 random_access_iterator_tag, random_access_iterator_tag, 00458 random_access_iterator_tag, 00459 __gnu_parallel::_Parallelism __parallelism 00460 = __gnu_parallel::parallel_balanced); 00461 00462 template<typename _IIter1, typename _IIter2, typename _OIter, 00463 typename _BiOperation, typename _Tag1, 00464 typename _Tag2, typename _Tag3> 00465 _OIter 00466 __transform2_switch(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation, 00467 _Tag1, _Tag2, _Tag3); 00468 00469 00470 template<typename _FIter, typename _Tp> 00471 void 00472 replace(_FIter, _FIter, const _Tp&, const _Tp&); 00473 00474 template<typename _FIter, typename _Tp> 00475 void 00476 replace(_FIter, _FIter, const _Tp&, const _Tp&, 00477 __gnu_parallel::sequential_tag); 00478 00479 template<typename _FIter, typename _Tp> 00480 void 00481 replace(_FIter, _FIter, const _Tp&, const _Tp&, 00482 __gnu_parallel::_Parallelism); 00483 00484 template<typename _FIter, typename _Tp, typename _IterTag> 00485 void 00486 __replace_switch(_FIter, _FIter, const _Tp&, const _Tp&, _IterTag); 00487 00488 template<typename _RAIter, typename _Tp> 00489 void 00490 __replace_switch(_RAIter, _RAIter, const _Tp&, const _Tp&, 00491 random_access_iterator_tag, __gnu_parallel::_Parallelism); 00492 00493 00494 template<typename _FIter, typename _Predicate, typename _Tp> 00495 void 00496 replace_if(_FIter, _FIter, _Predicate, const _Tp&); 00497 00498 template<typename _FIter, typename _Predicate, typename _Tp> 00499 void 00500 replace_if(_FIter, _FIter, _Predicate, const _Tp&, 00501 __gnu_parallel::sequential_tag); 00502 00503 template<typename _FIter, typename _Predicate, typename _Tp> 00504 void 00505 replace_if(_FIter, _FIter, _Predicate, const _Tp&, 00506 __gnu_parallel::_Parallelism); 00507 00508 template<typename _FIter, typename _Predicate, typename _Tp, 00509 typename _IterTag> 00510 void 00511 __replace_if_switch(_FIter, _FIter, _Predicate, const _Tp&, _IterTag); 00512 00513 template<typename _RAIter, typename _Predicate, typename _Tp> 00514 void 00515 __replace_if_switch(_RAIter, _RAIter, _Predicate, const _Tp&, 00516 random_access_iterator_tag, 00517 __gnu_parallel::_Parallelism); 00518 00519 00520 template<typename _FIter> 00521 _FIter 00522 max_element(_FIter, _FIter); 00523 00524 template<typename _FIter> 00525 _FIter 00526 max_element(_FIter, _FIter, __gnu_parallel::sequential_tag); 00527 00528 template<typename _FIter> 00529 _FIter 00530 max_element(_FIter, _FIter, __gnu_parallel::_Parallelism); 00531 00532 template<typename _FIter, typename _Compare> 00533 _FIter 00534 max_element(_FIter, _FIter, _Compare); 00535 00536 template<typename _FIter, typename _Compare> 00537 _FIter 00538 max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag); 00539 00540 template<typename _FIter, typename _Compare> 00541 _FIter 00542 max_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism); 00543 00544 template<typename _FIter, typename _Compare, typename _IterTag> 00545 _FIter 00546 __max_element_switch(_FIter, _FIter, _Compare, _IterTag); 00547 00548 template<typename _RAIter, typename _Compare> 00549 _RAIter 00550 __max_element_switch( 00551 _RAIter, _RAIter, _Compare, random_access_iterator_tag, 00552 __gnu_parallel::_Parallelism __parallelism 00553 = __gnu_parallel::parallel_balanced); 00554 00555 00556 template<typename _IIter1, typename _IIter2, typename _OIter> 00557 _OIter 00558 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00559 __gnu_parallel::sequential_tag); 00560 00561 template<typename _IIter1, typename _IIter2, typename _OIter, 00562 typename _Compare> 00563 _OIter 00564 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, 00565 __gnu_parallel::sequential_tag); 00566 00567 template<typename _IIter1, typename _IIter2, typename _OIter, 00568 typename _Compare> 00569 _OIter 00570 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 00571 00572 template<typename _IIter1, typename _IIter2, typename _OIter> 00573 _OIter 00574 merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 00575 00576 template<typename _IIter1, typename _IIter2, typename _OIter, 00577 typename _Compare, typename _IterTag1, typename _IterTag2, 00578 typename _IterTag3> 00579 _OIter 00580 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, 00581 _IterTag1, _IterTag2, _IterTag3); 00582 00583 template<typename _IIter1, typename _IIter2, typename _OIter, 00584 typename _Compare> 00585 _OIter 00586 __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare, 00587 random_access_iterator_tag, random_access_iterator_tag, 00588 random_access_iterator_tag); 00589 00590 00591 template<typename _FIter> 00592 _FIter 00593 min_element(_FIter, _FIter); 00594 00595 template<typename _FIter> 00596 _FIter 00597 min_element(_FIter, _FIter, __gnu_parallel::sequential_tag); 00598 00599 template<typename _FIter> 00600 _FIter 00601 min_element(_FIter, _FIter, 00602 __gnu_parallel::_Parallelism __parallelism_tag); 00603 00604 template<typename _FIter, typename _Compare> 00605 _FIter 00606 min_element(_FIter, _FIter, _Compare); 00607 00608 template<typename _FIter, typename _Compare> 00609 _FIter 00610 min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag); 00611 00612 template<typename _FIter, typename _Compare> 00613 _FIter 00614 min_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism); 00615 00616 template<typename _FIter, typename _Compare, typename _IterTag> 00617 _FIter 00618 __min_element_switch(_FIter, _FIter, _Compare, _IterTag); 00619 00620 template<typename _RAIter, typename _Compare> 00621 _RAIter 00622 __min_element_switch( 00623 _RAIter, _RAIter, _Compare, random_access_iterator_tag, 00624 __gnu_parallel::_Parallelism __parallelism 00625 = __gnu_parallel::parallel_balanced); 00626 00627 template<typename _RAIter> 00628 void 00629 nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag); 00630 00631 template<typename _RAIter, typename _Compare> 00632 void 00633 nth_element(_RAIter, _RAIter, _RAIter, _Compare, 00634 __gnu_parallel::sequential_tag); 00635 00636 template<typename _RAIter, typename _Compare> 00637 void 00638 nth_element(_RAIter, _RAIter, _RAIter, _Compare); 00639 00640 template<typename _RAIter> 00641 void 00642 nth_element(_RAIter, _RAIter, _RAIter); 00643 00644 template<typename _RAIter, typename _Compare> 00645 void 00646 partial_sort(_RAIter, _RAIter, _RAIter, _Compare, 00647 __gnu_parallel::sequential_tag); 00648 00649 template<typename _RAIter> 00650 void 00651 partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag); 00652 00653 template<typename _RAIter, typename _Compare> 00654 void 00655 partial_sort(_RAIter, _RAIter, _RAIter, _Compare); 00656 00657 template<typename _RAIter> 00658 void 00659 partial_sort(_RAIter, _RAIter, _RAIter); 00660 00661 template<typename _FIter, typename _Predicate> 00662 _FIter 00663 partition(_FIter, _FIter, _Predicate, __gnu_parallel::sequential_tag); 00664 00665 template<typename _FIter, typename _Predicate> 00666 _FIter 00667 partition(_FIter, _FIter, _Predicate); 00668 00669 template<typename _FIter, typename _Predicate, typename _IterTag> 00670 _FIter 00671 __partition_switch(_FIter, _FIter, _Predicate, _IterTag); 00672 00673 template<typename _RAIter, typename _Predicate> 00674 _RAIter 00675 __partition_switch( 00676 _RAIter, _RAIter, _Predicate, random_access_iterator_tag); 00677 00678 template<typename _RAIter> 00679 void 00680 random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag); 00681 00682 template<typename _RAIter, typename _RandomNumberGenerator> 00683 void 00684 random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&, 00685 __gnu_parallel::sequential_tag); 00686 00687 template<typename _RAIter> 00688 void 00689 random_shuffle(_RAIter, _RAIter); 00690 00691 template<typename _RAIter, typename _RandomNumberGenerator> 00692 void 00693 random_shuffle(_RAIter, _RAIter, 00694 #ifdef __GXX_EXPERIMENTAL_CXX0X__ 00695 _RandomNumberGenerator&&); 00696 #else 00697 _RandomNumberGenerator&); 00698 #endif 00699 00700 template<typename _IIter1, typename _IIter2, typename _OIter> 00701 _OIter 00702 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00703 __gnu_parallel::sequential_tag); 00704 00705 template<typename _IIter1, typename _IIter2, typename _OIter, 00706 typename _Predicate> 00707 _OIter 00708 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate, 00709 __gnu_parallel::sequential_tag); 00710 00711 template<typename _IIter1, typename _IIter2, typename _OIter> 00712 _OIter 00713 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 00714 00715 template<typename _IIter1, typename _IIter2, typename _OIter, 00716 typename _Predicate> 00717 _OIter 00718 set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate); 00719 00720 template<typename _IIter1, typename _IIter2, typename _Predicate, 00721 typename _OIter, typename _IterTag1, typename _IterTag2, 00722 typename _IterTag3> 00723 _OIter 00724 __set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00725 _Predicate, _IterTag1, _IterTag2, _IterTag3); 00726 00727 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter, 00728 typename _Predicate> 00729 _Output_RAIter 00730 __set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _Output_RAIter, 00731 _Predicate, random_access_iterator_tag, 00732 random_access_iterator_tag, random_access_iterator_tag); 00733 00734 template<typename _IIter1, typename _IIter2, typename _OIter> 00735 _OIter 00736 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00737 __gnu_parallel::sequential_tag); 00738 00739 template<typename _IIter1, typename _IIter2, typename _OIter, 00740 typename _Predicate> 00741 _OIter 00742 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate, 00743 __gnu_parallel::sequential_tag); 00744 00745 template<typename _IIter1, typename _IIter2, typename _OIter> 00746 _OIter 00747 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 00748 00749 template<typename _IIter1, typename _IIter2, typename _OIter, 00750 typename _Predicate> 00751 _OIter 00752 set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate); 00753 00754 template<typename _IIter1, typename _IIter2, typename _Predicate, 00755 typename _OIter, typename _IterTag1, typename _IterTag2, 00756 typename _IterTag3> 00757 _OIter 00758 __set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00759 _Predicate, _IterTag1, _IterTag2, _IterTag3); 00760 00761 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter, 00762 typename _Predicate> 00763 _Output_RAIter 00764 __set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, 00765 _Output_RAIter, _Predicate, 00766 random_access_iterator_tag, 00767 random_access_iterator_tag, 00768 random_access_iterator_tag); 00769 00770 template<typename _IIter1, typename _IIter2, typename _OIter> 00771 _OIter 00772 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00773 __gnu_parallel::sequential_tag); 00774 00775 template<typename _IIter1, typename _IIter2, typename _OIter, 00776 typename _Predicate> 00777 _OIter 00778 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00779 _Predicate, __gnu_parallel::sequential_tag); 00780 00781 template<typename _IIter1, typename _IIter2, typename _OIter> 00782 _OIter 00783 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 00784 00785 template<typename _IIter1, typename _IIter2, typename _OIter, 00786 typename _Predicate> 00787 _OIter 00788 set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00789 _Predicate); 00790 00791 template<typename _IIter1, typename _IIter2, typename _Predicate, 00792 typename _OIter, typename _IterTag1, typename _IterTag2, 00793 typename _IterTag3> 00794 _OIter 00795 __set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, 00796 _OIter, _Predicate, _IterTag1, _IterTag2, 00797 _IterTag3); 00798 00799 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter, 00800 typename _Predicate> 00801 _Output_RAIter 00802 __set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, 00803 _Output_RAIter, _Predicate, 00804 random_access_iterator_tag, 00805 random_access_iterator_tag, 00806 random_access_iterator_tag); 00807 00808 00809 template<typename _IIter1, typename _IIter2, typename _OIter> 00810 _OIter 00811 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00812 __gnu_parallel::sequential_tag); 00813 00814 template<typename _IIter1, typename _IIter2, typename _OIter, 00815 typename _Predicate> 00816 _OIter 00817 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate, 00818 __gnu_parallel::sequential_tag); 00819 00820 template<typename _IIter1, typename _IIter2, typename _OIter> 00821 _OIter 00822 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 00823 00824 template<typename _IIter1, typename _IIter2, typename _OIter, 00825 typename _Predicate> 00826 _OIter 00827 set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate); 00828 00829 template<typename _IIter1, typename _IIter2, typename _Predicate, 00830 typename _OIter, typename _IterTag1, typename _IterTag2, 00831 typename _IterTag3> 00832 _OIter 00833 __set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, 00834 _Predicate, _IterTag1, _IterTag2, _IterTag3); 00835 00836 template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter, 00837 typename _Predicate> 00838 _Output_RAIter 00839 __set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, 00840 _Output_RAIter, _Predicate, 00841 random_access_iterator_tag, 00842 random_access_iterator_tag, 00843 random_access_iterator_tag); 00844 00845 00846 template<typename _RAIter> 00847 void 00848 sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag); 00849 00850 template<typename _RAIter, typename _Compare> 00851 void 00852 sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag); 00853 00854 template<typename _RAIter> 00855 void 00856 sort(_RAIter, _RAIter); 00857 00858 template<typename _RAIter, typename _Compare> 00859 void 00860 sort(_RAIter, _RAIter, _Compare); 00861 00862 template<typename _RAIter> 00863 void 00864 stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag); 00865 00866 template<typename _RAIter, typename _Compare> 00867 void 00868 stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag); 00869 00870 template<typename _RAIter> 00871 void 00872 stable_sort(_RAIter, _RAIter); 00873 00874 template<typename _RAIter, typename _Compare> 00875 void 00876 stable_sort(_RAIter, _RAIter, _Compare); 00877 00878 template<typename _IIter, typename _OIter> 00879 _OIter 00880 unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag); 00881 00882 template<typename _IIter, typename _OIter, typename _Predicate> 00883 _OIter 00884 unique_copy(_IIter, _IIter, _OIter, _Predicate, 00885 __gnu_parallel::sequential_tag); 00886 00887 template<typename _IIter, typename _OIter> 00888 _OIter 00889 unique_copy(_IIter, _IIter, _OIter); 00890 00891 template<typename _IIter, typename _OIter, typename _Predicate> 00892 _OIter 00893 unique_copy(_IIter, _IIter, _OIter, _Predicate); 00894 00895 template<typename _IIter, typename _OIter, typename _Predicate, 00896 typename _IterTag1, typename _IterTag2> 00897 _OIter 00898 __unique_copy_switch(_IIter, _IIter, _OIter, _Predicate, 00899 _IterTag1, _IterTag2); 00900 00901 template<typename _RAIter, typename _RandomAccess_OIter, typename _Predicate> 00902 _RandomAccess_OIter 00903 __unique_copy_switch(_RAIter, _RAIter, _RandomAccess_OIter, _Predicate, 00904 random_access_iterator_tag, random_access_iterator_tag); 00905 } // end namespace __parallel 00906 } // end namespace std 00907 00908 #endif /* _GLIBCXX_PARALLEL_ALGORITHMFWD_H */