You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

913 lines
32KB

  1. // <parallel/algorithm> Forward declarations -*- C++ -*-
  2. // Copyright (C) 2007-2020 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the terms
  6. // of the GNU General Public License as published by the Free Software
  7. // Foundation; either version 3, or (at your option) any later
  8. // version.
  9. // This library is distributed in the hope that it will be useful, but
  10. // WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. // General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file parallel/algorithmfwd.h
  21. * This file is a GNU parallel extension to the Standard C++ Library.
  22. */
  23. #ifndef _GLIBCXX_PARALLEL_ALGORITHMFWD_H
  24. #define _GLIBCXX_PARALLEL_ALGORITHMFWD_H 1
  25. #pragma GCC system_header
  26. #include <parallel/tags.h>
  27. #include <parallel/settings.h>
  28. namespace std _GLIBCXX_VISIBILITY(default)
  29. {
  30. namespace __parallel
  31. {
  32. template<typename _FIter>
  33. _FIter
  34. adjacent_find(_FIter, _FIter);
  35. template<typename _FIter>
  36. _FIter
  37. adjacent_find(_FIter, _FIter, __gnu_parallel::sequential_tag);
  38. template<typename _FIter, typename _IterTag>
  39. _FIter
  40. __adjacent_find_switch(_FIter, _FIter, _IterTag);
  41. template<typename _RAIter>
  42. _RAIter
  43. __adjacent_find_switch(_RAIter, _RAIter, random_access_iterator_tag);
  44. template<typename _FIter, typename _BiPredicate>
  45. _FIter
  46. adjacent_find(_FIter, _FIter, _BiPredicate);
  47. template<typename _FIter, typename _BiPredicate>
  48. _FIter
  49. adjacent_find(_FIter, _FIter, _BiPredicate,
  50. __gnu_parallel::sequential_tag);
  51. template<typename _FIter, typename _BiPredicate, typename _IterTag>
  52. _FIter
  53. __adjacent_find_switch(_FIter, _FIter, _BiPredicate, _IterTag);
  54. template<typename _RAIter, typename _BiPredicate>
  55. _RAIter
  56. __adjacent_find_switch(_RAIter, _RAIter, _BiPredicate,
  57. random_access_iterator_tag);
  58. template<typename _IIter, typename _Tp>
  59. typename iterator_traits<_IIter>::difference_type
  60. count(_IIter, _IIter, const _Tp&);
  61. template<typename _IIter, typename _Tp>
  62. typename iterator_traits<_IIter>::difference_type
  63. count(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
  64. template<typename _IIter, typename _Tp>
  65. typename iterator_traits<_IIter>::difference_type
  66. count(_IIter, _IIter, const _Tp&, __gnu_parallel::_Parallelism);
  67. template<typename _IIter, typename _Tp, typename _IterTag>
  68. typename iterator_traits<_IIter>::difference_type
  69. __count_switch(_IIter, _IIter, const _Tp&, _IterTag);
  70. template<typename _RAIter, typename _Tp>
  71. typename iterator_traits<_RAIter>::difference_type
  72. __count_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag,
  73. __gnu_parallel::_Parallelism __parallelism
  74. = __gnu_parallel::parallel_unbalanced);
  75. template<typename _IIter, typename _Predicate>
  76. typename iterator_traits<_IIter>::difference_type
  77. count_if(_IIter, _IIter, _Predicate);
  78. template<typename _IIter, typename _Predicate>
  79. typename iterator_traits<_IIter>::difference_type
  80. count_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
  81. template<typename _IIter, typename _Predicate>
  82. typename iterator_traits<_IIter>::difference_type
  83. count_if(_IIter, _IIter, _Predicate, __gnu_parallel::_Parallelism);
  84. template<typename _IIter, typename _Predicate, typename _IterTag>
  85. typename iterator_traits<_IIter>::difference_type
  86. __count_if_switch(_IIter, _IIter, _Predicate, _IterTag);
  87. template<typename _RAIter, typename _Predicate>
  88. typename iterator_traits<_RAIter>::difference_type
  89. __count_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag,
  90. __gnu_parallel::_Parallelism __parallelism
  91. = __gnu_parallel::parallel_unbalanced);
  92. // algobase.h
  93. template<typename _IIter1, typename _IIter2>
  94. bool
  95. equal(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
  96. template<typename _IIter1, typename _IIter2, typename _Predicate>
  97. bool
  98. equal(_IIter1, _IIter1, _IIter2, _Predicate,
  99. __gnu_parallel::sequential_tag);
  100. template<typename _IIter1, typename _IIter2>
  101. _GLIBCXX20_CONSTEXPR
  102. bool
  103. equal(_IIter1, _IIter1, _IIter2);
  104. template<typename _IIter1, typename _IIter2, typename _Predicate>
  105. _GLIBCXX20_CONSTEXPR
  106. bool
  107. equal(_IIter1, _IIter1, _IIter2, _Predicate);
  108. template<typename _IIter, typename _Tp>
  109. _IIter
  110. find(_IIter, _IIter, const _Tp&, __gnu_parallel::sequential_tag);
  111. template<typename _IIter, typename _Tp>
  112. _IIter
  113. find(_IIter, _IIter, const _Tp& __val);
  114. template<typename _IIter, typename _Tp, typename _IterTag>
  115. _IIter
  116. __find_switch(_IIter, _IIter, const _Tp&, _IterTag);
  117. template<typename _RAIter, typename _Tp>
  118. _RAIter
  119. __find_switch(_RAIter, _RAIter, const _Tp&, random_access_iterator_tag);
  120. template<typename _IIter, typename _Predicate>
  121. _IIter
  122. find_if(_IIter, _IIter, _Predicate, __gnu_parallel::sequential_tag);
  123. template<typename _IIter, typename _Predicate>
  124. _IIter
  125. find_if(_IIter, _IIter, _Predicate);
  126. template<typename _IIter, typename _Predicate, typename _IterTag>
  127. _IIter
  128. __find_if_switch(_IIter, _IIter, _Predicate, _IterTag);
  129. template<typename _RAIter, typename _Predicate>
  130. _RAIter
  131. __find_if_switch(_RAIter, _RAIter, _Predicate, random_access_iterator_tag);
  132. template<typename _IIter, typename _FIter>
  133. _IIter
  134. find_first_of(_IIter, _IIter, _FIter, _FIter,
  135. __gnu_parallel::sequential_tag);
  136. template<typename _IIter, typename _FIter, typename _BiPredicate>
  137. _IIter
  138. find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
  139. __gnu_parallel::sequential_tag);
  140. template<typename _IIter, typename _FIter, typename _BiPredicate>
  141. _IIter
  142. find_first_of(_IIter, _IIter, _FIter, _FIter, _BiPredicate);
  143. template<typename _IIter, typename _FIter>
  144. _IIter
  145. find_first_of(_IIter, _IIter, _FIter, _FIter);
  146. template<typename _IIter, typename _FIter,
  147. typename _IterTag1, typename _IterTag2>
  148. _IIter
  149. __find_first_of_switch(
  150. _IIter, _IIter, _FIter, _FIter, _IterTag1, _IterTag2);
  151. template<typename _RAIter, typename _FIter, typename _BiPredicate,
  152. typename _IterTag>
  153. _RAIter
  154. __find_first_of_switch(_RAIter, _RAIter, _FIter, _FIter, _BiPredicate,
  155. random_access_iterator_tag, _IterTag);
  156. template<typename _IIter, typename _FIter, typename _BiPredicate,
  157. typename _IterTag1, typename _IterTag2>
  158. _IIter
  159. __find_first_of_switch(_IIter, _IIter, _FIter, _FIter, _BiPredicate,
  160. _IterTag1, _IterTag2);
  161. template<typename _IIter, typename _Function>
  162. _Function
  163. for_each(_IIter, _IIter, _Function);
  164. template<typename _IIter, typename _Function>
  165. _Function
  166. for_each(_IIter, _IIter, _Function, __gnu_parallel::sequential_tag);
  167. template<typename _Iterator, typename _Function>
  168. _Function
  169. for_each(_Iterator, _Iterator, _Function, __gnu_parallel::_Parallelism);
  170. template<typename _IIter, typename _Function, typename _IterTag>
  171. _Function
  172. __for_each_switch(_IIter, _IIter, _Function, _IterTag);
  173. template<typename _RAIter, typename _Function>
  174. _Function
  175. __for_each_switch(_RAIter, _RAIter, _Function, random_access_iterator_tag,
  176. __gnu_parallel::_Parallelism __parallelism
  177. = __gnu_parallel::parallel_balanced);
  178. template<typename _FIter, typename _Generator>
  179. void
  180. generate(_FIter, _FIter, _Generator);
  181. template<typename _FIter, typename _Generator>
  182. void
  183. generate(_FIter, _FIter, _Generator, __gnu_parallel::sequential_tag);
  184. template<typename _FIter, typename _Generator>
  185. void
  186. generate(_FIter, _FIter, _Generator, __gnu_parallel::_Parallelism);
  187. template<typename _FIter, typename _Generator, typename _IterTag>
  188. void
  189. __generate_switch(_FIter, _FIter, _Generator, _IterTag);
  190. template<typename _RAIter, typename _Generator>
  191. void
  192. __generate_switch(_RAIter, _RAIter, _Generator, random_access_iterator_tag,
  193. __gnu_parallel::_Parallelism __parallelism
  194. = __gnu_parallel::parallel_balanced);
  195. template<typename _OIter, typename _Size, typename _Generator>
  196. _OIter
  197. generate_n(_OIter, _Size, _Generator);
  198. template<typename _OIter, typename _Size, typename _Generator>
  199. _OIter
  200. generate_n(_OIter, _Size, _Generator, __gnu_parallel::sequential_tag);
  201. template<typename _OIter, typename _Size, typename _Generator>
  202. _OIter
  203. generate_n(_OIter, _Size, _Generator, __gnu_parallel::_Parallelism);
  204. template<typename _OIter, typename _Size, typename _Generator,
  205. typename _IterTag>
  206. _OIter
  207. __generate_n_switch(_OIter, _Size, _Generator, _IterTag);
  208. template<typename _RAIter, typename _Size, typename _Generator>
  209. _RAIter
  210. __generate_n_switch(_RAIter, _Size, _Generator, random_access_iterator_tag,
  211. __gnu_parallel::_Parallelism __parallelism
  212. = __gnu_parallel::parallel_balanced);
  213. template<typename _IIter1, typename _IIter2>
  214. bool
  215. lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2,
  216. __gnu_parallel::sequential_tag);
  217. template<typename _IIter1, typename _IIter2, typename _Predicate>
  218. bool
  219. lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate,
  220. __gnu_parallel::sequential_tag);
  221. template<typename _IIter1, typename _IIter2>
  222. _GLIBCXX20_CONSTEXPR
  223. bool
  224. lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
  225. template<typename _IIter1, typename _IIter2, typename _Predicate>
  226. _GLIBCXX20_CONSTEXPR
  227. bool
  228. lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Predicate);
  229. template<typename _IIter1, typename _IIter2,
  230. typename _Predicate, typename _IterTag1, typename _IterTag2>
  231. bool
  232. __lexicographical_compare_switch(_IIter1, _IIter1, _IIter2, _IIter2,
  233. _Predicate, _IterTag1, _IterTag2);
  234. template<typename _RAIter1, typename _RAIter2, typename _Predicate>
  235. bool
  236. __lexicographical_compare_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
  237. _Predicate, random_access_iterator_tag,
  238. random_access_iterator_tag);
  239. // algo.h
  240. template<typename _IIter1, typename _IIter2>
  241. pair<_IIter1, _IIter2>
  242. mismatch(_IIter1, _IIter1, _IIter2, __gnu_parallel::sequential_tag);
  243. template<typename _IIter1, typename _IIter2, typename _Predicate>
  244. pair<_IIter1, _IIter2>
  245. mismatch(_IIter1, _IIter1, _IIter2, _Predicate,
  246. __gnu_parallel::sequential_tag);
  247. template<typename _IIter1, typename _IIter2>
  248. pair<_IIter1, _IIter2>
  249. mismatch(_IIter1, _IIter1, _IIter2);
  250. template<typename _IIter1, typename _IIter2, typename _Predicate>
  251. pair<_IIter1, _IIter2>
  252. mismatch(_IIter1, _IIter1, _IIter2, _Predicate);
  253. template<typename _IIter1, typename _IIter2, typename _Predicate,
  254. typename _IterTag1, typename _IterTag2>
  255. pair<_IIter1, _IIter2>
  256. __mismatch_switch(_IIter1, _IIter1, _IIter2, _Predicate,
  257. _IterTag1, _IterTag2);
  258. template<typename _RAIter1, typename _RAIter2, typename _Predicate>
  259. pair<_RAIter1, _RAIter2>
  260. __mismatch_switch(_RAIter1, _RAIter1, _RAIter2, _Predicate,
  261. random_access_iterator_tag, random_access_iterator_tag);
  262. template<typename _FIter1, typename _FIter2>
  263. _FIter1
  264. search(_FIter1, _FIter1, _FIter2, _FIter2, __gnu_parallel::sequential_tag);
  265. template<typename _FIter1, typename _FIter2>
  266. _FIter1
  267. search(_FIter1, _FIter1, _FIter2, _FIter2);
  268. template<typename _FIter1, typename _FIter2, typename _BiPredicate>
  269. _FIter1
  270. search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
  271. __gnu_parallel::sequential_tag);
  272. template<typename _FIter1, typename _FIter2, typename _BiPredicate>
  273. _FIter1
  274. search(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate);
  275. template<typename _RAIter1, typename _RAIter2>
  276. _RAIter1
  277. __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
  278. random_access_iterator_tag, random_access_iterator_tag);
  279. template<typename _FIter1, typename _FIter2, typename _IterTag1,
  280. typename _IterTag2>
  281. _FIter1
  282. __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _IterTag1, _IterTag2);
  283. template<typename _RAIter1, typename _RAIter2, typename _BiPredicate>
  284. _RAIter1
  285. __search_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _BiPredicate,
  286. random_access_iterator_tag, random_access_iterator_tag);
  287. template<typename _FIter1, typename _FIter2, typename _BiPredicate,
  288. typename _IterTag1, typename _IterTag2>
  289. _FIter1
  290. __search_switch(_FIter1, _FIter1, _FIter2, _FIter2, _BiPredicate,
  291. _IterTag1, _IterTag2);
  292. template<typename _FIter, typename _Integer, typename _Tp>
  293. _FIter
  294. search_n(_FIter, _FIter, _Integer, const _Tp&,
  295. __gnu_parallel::sequential_tag);
  296. template<typename _FIter, typename _Integer, typename _Tp,
  297. typename _BiPredicate>
  298. _FIter
  299. search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate,
  300. __gnu_parallel::sequential_tag);
  301. template<typename _FIter, typename _Integer, typename _Tp>
  302. _FIter
  303. search_n(_FIter, _FIter, _Integer, const _Tp&);
  304. template<typename _FIter, typename _Integer, typename _Tp,
  305. typename _BiPredicate>
  306. _FIter
  307. search_n(_FIter, _FIter, _Integer, const _Tp&, _BiPredicate);
  308. template<typename _RAIter, typename _Integer, typename _Tp,
  309. typename _BiPredicate>
  310. _RAIter
  311. __search_n_switch(_RAIter, _RAIter, _Integer, const _Tp&,
  312. _BiPredicate, random_access_iterator_tag);
  313. template<typename _FIter, typename _Integer, typename _Tp,
  314. typename _BiPredicate, typename _IterTag>
  315. _FIter
  316. __search_n_switch(_FIter, _FIter, _Integer, const _Tp&,
  317. _BiPredicate, _IterTag);
  318. template<typename _IIter, typename _OIter, typename _UnaryOperation>
  319. _OIter
  320. transform(_IIter, _IIter, _OIter, _UnaryOperation);
  321. template<typename _IIter, typename _OIter, typename _UnaryOperation>
  322. _OIter
  323. transform(_IIter, _IIter, _OIter, _UnaryOperation,
  324. __gnu_parallel::sequential_tag);
  325. template<typename _IIter, typename _OIter, typename _UnaryOperation>
  326. _OIter
  327. transform(_IIter, _IIter, _OIter, _UnaryOperation,
  328. __gnu_parallel::_Parallelism);
  329. template<typename _IIter, typename _OIter, typename _UnaryOperation,
  330. typename _IterTag1, typename _IterTag2>
  331. _OIter
  332. __transform1_switch(_IIter, _IIter, _OIter, _UnaryOperation,
  333. _IterTag1, _IterTag2);
  334. template<typename _RAIIter, typename _RAOIter, typename _UnaryOperation>
  335. _RAOIter
  336. __transform1_switch(_RAIIter, _RAIIter, _RAOIter, _UnaryOperation,
  337. random_access_iterator_tag, random_access_iterator_tag,
  338. __gnu_parallel::_Parallelism __parallelism
  339. = __gnu_parallel::parallel_balanced);
  340. template<typename _IIter1, typename _IIter2, typename _OIter,
  341. typename _BiOperation>
  342. _OIter
  343. transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation);
  344. template<typename _IIter1, typename _IIter2, typename _OIter,
  345. typename _BiOperation>
  346. _OIter
  347. transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
  348. __gnu_parallel::sequential_tag);
  349. template<typename _IIter1, typename _IIter2, typename _OIter,
  350. typename _BiOperation>
  351. _OIter
  352. transform(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
  353. __gnu_parallel::_Parallelism);
  354. template<typename _RAIter1, typename _RAIter2, typename _RAIter3,
  355. typename _BiOperation>
  356. _RAIter3
  357. __transform2_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter3, _BiOperation,
  358. random_access_iterator_tag, random_access_iterator_tag,
  359. random_access_iterator_tag,
  360. __gnu_parallel::_Parallelism __parallelism
  361. = __gnu_parallel::parallel_balanced);
  362. template<typename _IIter1, typename _IIter2, typename _OIter,
  363. typename _BiOperation, typename _Tag1,
  364. typename _Tag2, typename _Tag3>
  365. _OIter
  366. __transform2_switch(_IIter1, _IIter1, _IIter2, _OIter, _BiOperation,
  367. _Tag1, _Tag2, _Tag3);
  368. template<typename _FIter, typename _Tp>
  369. void
  370. replace(_FIter, _FIter, const _Tp&, const _Tp&);
  371. template<typename _FIter, typename _Tp>
  372. void
  373. replace(_FIter, _FIter, const _Tp&, const _Tp&,
  374. __gnu_parallel::sequential_tag);
  375. template<typename _FIter, typename _Tp>
  376. void
  377. replace(_FIter, _FIter, const _Tp&, const _Tp&,
  378. __gnu_parallel::_Parallelism);
  379. template<typename _FIter, typename _Tp, typename _IterTag>
  380. void
  381. __replace_switch(_FIter, _FIter, const _Tp&, const _Tp&, _IterTag);
  382. template<typename _RAIter, typename _Tp>
  383. void
  384. __replace_switch(_RAIter, _RAIter, const _Tp&, const _Tp&,
  385. random_access_iterator_tag, __gnu_parallel::_Parallelism);
  386. template<typename _FIter, typename _Predicate, typename _Tp>
  387. void
  388. replace_if(_FIter, _FIter, _Predicate, const _Tp&);
  389. template<typename _FIter, typename _Predicate, typename _Tp>
  390. void
  391. replace_if(_FIter, _FIter, _Predicate, const _Tp&,
  392. __gnu_parallel::sequential_tag);
  393. template<typename _FIter, typename _Predicate, typename _Tp>
  394. void
  395. replace_if(_FIter, _FIter, _Predicate, const _Tp&,
  396. __gnu_parallel::_Parallelism);
  397. template<typename _FIter, typename _Predicate, typename _Tp,
  398. typename _IterTag>
  399. void
  400. __replace_if_switch(_FIter, _FIter, _Predicate, const _Tp&, _IterTag);
  401. template<typename _RAIter, typename _Predicate, typename _Tp>
  402. void
  403. __replace_if_switch(_RAIter, _RAIter, _Predicate, const _Tp&,
  404. random_access_iterator_tag,
  405. __gnu_parallel::_Parallelism);
  406. template<typename _FIter>
  407. _FIter
  408. max_element(_FIter, _FIter);
  409. template<typename _FIter>
  410. _FIter
  411. max_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
  412. template<typename _FIter>
  413. _FIter
  414. max_element(_FIter, _FIter, __gnu_parallel::_Parallelism);
  415. template<typename _FIter, typename _Compare>
  416. _FIter
  417. max_element(_FIter, _FIter, _Compare);
  418. template<typename _FIter, typename _Compare>
  419. _FIter
  420. max_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
  421. template<typename _FIter, typename _Compare>
  422. _FIter
  423. max_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
  424. template<typename _FIter, typename _Compare, typename _IterTag>
  425. _FIter
  426. __max_element_switch(_FIter, _FIter, _Compare, _IterTag);
  427. template<typename _RAIter, typename _Compare>
  428. _RAIter
  429. __max_element_switch(
  430. _RAIter, _RAIter, _Compare, random_access_iterator_tag,
  431. __gnu_parallel::_Parallelism __parallelism
  432. = __gnu_parallel::parallel_balanced);
  433. template<typename _IIter1, typename _IIter2, typename _OIter>
  434. _OIter
  435. merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  436. __gnu_parallel::sequential_tag);
  437. template<typename _IIter1, typename _IIter2, typename _OIter,
  438. typename _Compare>
  439. _OIter
  440. merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
  441. __gnu_parallel::sequential_tag);
  442. template<typename _IIter1, typename _IIter2, typename _OIter,
  443. typename _Compare>
  444. _OIter
  445. merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
  446. template<typename _IIter1, typename _IIter2, typename _OIter>
  447. _OIter
  448. merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
  449. template<typename _IIter1, typename _IIter2, typename _OIter,
  450. typename _Compare, typename _IterTag1, typename _IterTag2,
  451. typename _IterTag3>
  452. _OIter
  453. __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
  454. _IterTag1, _IterTag2, _IterTag3);
  455. template<typename _IIter1, typename _IIter2, typename _OIter,
  456. typename _Compare>
  457. _OIter
  458. __merge_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare,
  459. random_access_iterator_tag, random_access_iterator_tag,
  460. random_access_iterator_tag);
  461. template<typename _FIter>
  462. _FIter
  463. min_element(_FIter, _FIter);
  464. template<typename _FIter>
  465. _FIter
  466. min_element(_FIter, _FIter, __gnu_parallel::sequential_tag);
  467. template<typename _FIter>
  468. _FIter
  469. min_element(_FIter, _FIter,
  470. __gnu_parallel::_Parallelism __parallelism_tag);
  471. template<typename _FIter, typename _Compare>
  472. _FIter
  473. min_element(_FIter, _FIter, _Compare);
  474. template<typename _FIter, typename _Compare>
  475. _FIter
  476. min_element(_FIter, _FIter, _Compare, __gnu_parallel::sequential_tag);
  477. template<typename _FIter, typename _Compare>
  478. _FIter
  479. min_element(_FIter, _FIter, _Compare, __gnu_parallel::_Parallelism);
  480. template<typename _FIter, typename _Compare, typename _IterTag>
  481. _FIter
  482. __min_element_switch(_FIter, _FIter, _Compare, _IterTag);
  483. template<typename _RAIter, typename _Compare>
  484. _RAIter
  485. __min_element_switch(
  486. _RAIter, _RAIter, _Compare, random_access_iterator_tag,
  487. __gnu_parallel::_Parallelism __parallelism
  488. = __gnu_parallel::parallel_balanced);
  489. template<typename _RAIter>
  490. void
  491. nth_element(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
  492. template<typename _RAIter, typename _Compare>
  493. void
  494. nth_element(_RAIter, _RAIter, _RAIter, _Compare,
  495. __gnu_parallel::sequential_tag);
  496. template<typename _RAIter, typename _Compare>
  497. void
  498. nth_element(_RAIter, _RAIter, _RAIter, _Compare);
  499. template<typename _RAIter>
  500. void
  501. nth_element(_RAIter, _RAIter, _RAIter);
  502. template<typename _RAIter, typename _Compare>
  503. void
  504. partial_sort(_RAIter, _RAIter, _RAIter, _Compare,
  505. __gnu_parallel::sequential_tag);
  506. template<typename _RAIter>
  507. void
  508. partial_sort(_RAIter, _RAIter, _RAIter, __gnu_parallel::sequential_tag);
  509. template<typename _RAIter, typename _Compare>
  510. void
  511. partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
  512. template<typename _RAIter>
  513. void
  514. partial_sort(_RAIter, _RAIter, _RAIter);
  515. template<typename _FIter, typename _Predicate>
  516. _FIter
  517. partition(_FIter, _FIter, _Predicate, __gnu_parallel::sequential_tag);
  518. template<typename _FIter, typename _Predicate>
  519. _FIter
  520. partition(_FIter, _FIter, _Predicate);
  521. template<typename _FIter, typename _Predicate, typename _IterTag>
  522. _FIter
  523. __partition_switch(_FIter, _FIter, _Predicate, _IterTag);
  524. template<typename _RAIter, typename _Predicate>
  525. _RAIter
  526. __partition_switch(
  527. _RAIter, _RAIter, _Predicate, random_access_iterator_tag);
  528. template<typename _RAIter>
  529. void
  530. random_shuffle(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
  531. template<typename _RAIter, typename _RandomNumberGenerator>
  532. void
  533. random_shuffle(_RAIter, _RAIter, _RandomNumberGenerator&,
  534. __gnu_parallel::sequential_tag);
  535. template<typename _RAIter>
  536. void
  537. random_shuffle(_RAIter, _RAIter);
  538. template<typename _RAIter, typename _RandomNumberGenerator>
  539. void
  540. random_shuffle(_RAIter, _RAIter,
  541. #if __cplusplus >= 201103L
  542. _RandomNumberGenerator&&);
  543. #else
  544. _RandomNumberGenerator&);
  545. #endif
  546. template<typename _IIter1, typename _IIter2, typename _OIter>
  547. _OIter
  548. set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  549. __gnu_parallel::sequential_tag);
  550. template<typename _IIter1, typename _IIter2, typename _OIter,
  551. typename _Predicate>
  552. _OIter
  553. set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
  554. __gnu_parallel::sequential_tag);
  555. template<typename _IIter1, typename _IIter2, typename _OIter>
  556. _OIter
  557. set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
  558. template<typename _IIter1, typename _IIter2, typename _OIter,
  559. typename _Predicate>
  560. _OIter
  561. set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
  562. template<typename _IIter1, typename _IIter2, typename _Predicate,
  563. typename _OIter, typename _IterTag1, typename _IterTag2,
  564. typename _IterTag3>
  565. _OIter
  566. __set_union_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  567. _Predicate, _IterTag1, _IterTag2, _IterTag3);
  568. template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
  569. typename _Predicate>
  570. _Output_RAIter
  571. __set_union_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2, _Output_RAIter,
  572. _Predicate, random_access_iterator_tag,
  573. random_access_iterator_tag, random_access_iterator_tag);
  574. template<typename _IIter1, typename _IIter2, typename _OIter>
  575. _OIter
  576. set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  577. __gnu_parallel::sequential_tag);
  578. template<typename _IIter1, typename _IIter2, typename _OIter,
  579. typename _Predicate>
  580. _OIter
  581. set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
  582. __gnu_parallel::sequential_tag);
  583. template<typename _IIter1, typename _IIter2, typename _OIter>
  584. _OIter
  585. set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
  586. template<typename _IIter1, typename _IIter2, typename _OIter,
  587. typename _Predicate>
  588. _OIter
  589. set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
  590. template<typename _IIter1, typename _IIter2, typename _Predicate,
  591. typename _OIter, typename _IterTag1, typename _IterTag2,
  592. typename _IterTag3>
  593. _OIter
  594. __set_intersection_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  595. _Predicate, _IterTag1, _IterTag2, _IterTag3);
  596. template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
  597. typename _Predicate>
  598. _Output_RAIter
  599. __set_intersection_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
  600. _Output_RAIter, _Predicate,
  601. random_access_iterator_tag,
  602. random_access_iterator_tag,
  603. random_access_iterator_tag);
  604. template<typename _IIter1, typename _IIter2, typename _OIter>
  605. _OIter
  606. set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  607. __gnu_parallel::sequential_tag);
  608. template<typename _IIter1, typename _IIter2, typename _OIter,
  609. typename _Predicate>
  610. _OIter
  611. set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  612. _Predicate, __gnu_parallel::sequential_tag);
  613. template<typename _IIter1, typename _IIter2, typename _OIter>
  614. _OIter
  615. set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
  616. template<typename _IIter1, typename _IIter2, typename _OIter,
  617. typename _Predicate>
  618. _OIter
  619. set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  620. _Predicate);
  621. template<typename _IIter1, typename _IIter2, typename _Predicate,
  622. typename _OIter, typename _IterTag1, typename _IterTag2,
  623. typename _IterTag3>
  624. _OIter
  625. __set_symmetric_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2,
  626. _OIter, _Predicate, _IterTag1, _IterTag2,
  627. _IterTag3);
  628. template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
  629. typename _Predicate>
  630. _Output_RAIter
  631. __set_symmetric_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
  632. _Output_RAIter, _Predicate,
  633. random_access_iterator_tag,
  634. random_access_iterator_tag,
  635. random_access_iterator_tag);
  636. template<typename _IIter1, typename _IIter2, typename _OIter>
  637. _OIter
  638. set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  639. __gnu_parallel::sequential_tag);
  640. template<typename _IIter1, typename _IIter2, typename _OIter,
  641. typename _Predicate>
  642. _OIter
  643. set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate,
  644. __gnu_parallel::sequential_tag);
  645. template<typename _IIter1, typename _IIter2, typename _OIter>
  646. _OIter
  647. set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
  648. template<typename _IIter1, typename _IIter2, typename _OIter,
  649. typename _Predicate>
  650. _OIter
  651. set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Predicate);
  652. template<typename _IIter1, typename _IIter2, typename _Predicate,
  653. typename _OIter, typename _IterTag1, typename _IterTag2,
  654. typename _IterTag3>
  655. _OIter
  656. __set_difference_switch(_IIter1, _IIter1, _IIter2, _IIter2, _OIter,
  657. _Predicate, _IterTag1, _IterTag2, _IterTag3);
  658. template<typename _RAIter1, typename _RAIter2, typename _Output_RAIter,
  659. typename _Predicate>
  660. _Output_RAIter
  661. __set_difference_switch(_RAIter1, _RAIter1, _RAIter2, _RAIter2,
  662. _Output_RAIter, _Predicate,
  663. random_access_iterator_tag,
  664. random_access_iterator_tag,
  665. random_access_iterator_tag);
  666. template<typename _RAIter>
  667. void
  668. sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
  669. template<typename _RAIter, typename _Compare>
  670. void
  671. sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
  672. template<typename _RAIter>
  673. void
  674. sort(_RAIter, _RAIter);
  675. template<typename _RAIter, typename _Compare>
  676. void
  677. sort(_RAIter, _RAIter, _Compare);
  678. template<typename _RAIter>
  679. void
  680. stable_sort(_RAIter, _RAIter, __gnu_parallel::sequential_tag);
  681. template<typename _RAIter, typename _Compare>
  682. void
  683. stable_sort(_RAIter, _RAIter, _Compare, __gnu_parallel::sequential_tag);
  684. template<typename _RAIter>
  685. void
  686. stable_sort(_RAIter, _RAIter);
  687. template<typename _RAIter, typename _Compare>
  688. void
  689. stable_sort(_RAIter, _RAIter, _Compare);
  690. template<typename _IIter, typename _OIter>
  691. _OIter
  692. unique_copy(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
  693. template<typename _IIter, typename _OIter, typename _Predicate>
  694. _OIter
  695. unique_copy(_IIter, _IIter, _OIter, _Predicate,
  696. __gnu_parallel::sequential_tag);
  697. template<typename _IIter, typename _OIter>
  698. _OIter
  699. unique_copy(_IIter, _IIter, _OIter);
  700. template<typename _IIter, typename _OIter, typename _Predicate>
  701. _OIter
  702. unique_copy(_IIter, _IIter, _OIter, _Predicate);
  703. template<typename _IIter, typename _OIter, typename _Predicate,
  704. typename _IterTag1, typename _IterTag2>
  705. _OIter
  706. __unique_copy_switch(_IIter, _IIter, _OIter, _Predicate,
  707. _IterTag1, _IterTag2);
  708. template<typename _RAIter, typename _RandomAccess_OIter, typename _Predicate>
  709. _RandomAccess_OIter
  710. __unique_copy_switch(_RAIter, _RAIter, _RandomAccess_OIter, _Predicate,
  711. random_access_iterator_tag, random_access_iterator_tag);
  712. } // end namespace __parallel
  713. } // end namespace std
  714. #endif /* _GLIBCXX_PARALLEL_ALGORITHMFWD_H */