[1166] | 1 | // -*- C++ -*-
|
---|
| 2 | //===-- algorithm_fwd.h --------------------------------------------------===//
|
---|
| 3 | //
|
---|
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
---|
| 5 | // See https://llvm.org/LICENSE.txt for license information.
|
---|
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
---|
| 7 | //
|
---|
| 8 | //===----------------------------------------------------------------------===//
|
---|
| 9 |
|
---|
| 10 | #ifndef _PSTL_ALGORITHM_FWD_H
|
---|
| 11 | #define _PSTL_ALGORITHM_FWD_H
|
---|
| 12 |
|
---|
| 13 | #include <type_traits>
|
---|
| 14 | #include <utility>
|
---|
| 15 |
|
---|
| 16 | namespace __pstl
|
---|
| 17 | {
|
---|
| 18 | namespace __internal
|
---|
| 19 | {
|
---|
| 20 |
|
---|
| 21 | //------------------------------------------------------------------------
|
---|
| 22 | // any_of
|
---|
| 23 | //------------------------------------------------------------------------
|
---|
| 24 |
|
---|
| 25 | template <class _ForwardIterator, class _Pred>
|
---|
| 26 | bool
|
---|
| 27 | __brick_any_of(const _ForwardIterator, const _ForwardIterator, _Pred,
|
---|
| 28 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 29 |
|
---|
| 30 | template <class _ForwardIterator, class _Pred>
|
---|
| 31 | bool
|
---|
| 32 | __brick_any_of(const _ForwardIterator, const _ForwardIterator, _Pred,
|
---|
| 33 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 34 |
|
---|
| 35 | template <class _ExecutionPolicy, class _ForwardIterator, class _Pred, class _IsVector>
|
---|
| 36 | bool
|
---|
| 37 | __pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector,
|
---|
| 38 | /*parallel=*/std::false_type) noexcept;
|
---|
| 39 |
|
---|
| 40 | template <class _ExecutionPolicy, class _ForwardIterator, class _Pred, class _IsVector>
|
---|
| 41 | bool
|
---|
| 42 | __pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector,
|
---|
| 43 | /*parallel=*/std::true_type);
|
---|
| 44 |
|
---|
| 45 | //------------------------------------------------------------------------
|
---|
| 46 | // walk1 (pseudo)
|
---|
| 47 | //
|
---|
| 48 | // walk1 evaluates f(x) for each dereferenced value x drawn from [first,last)
|
---|
| 49 | //------------------------------------------------------------------------
|
---|
| 50 |
|
---|
| 51 | template <class _ForwardIterator, class _Function>
|
---|
| 52 | void __brick_walk1(_ForwardIterator, _ForwardIterator, _Function,
|
---|
| 53 | /*vector=*/std::false_type) noexcept;
|
---|
| 54 |
|
---|
| 55 | template <class _RandomAccessIterator, class _Function>
|
---|
| 56 | void __brick_walk1(_RandomAccessIterator, _RandomAccessIterator, _Function,
|
---|
| 57 | /*vector=*/std::true_type) noexcept;
|
---|
| 58 |
|
---|
| 59 | template <class _ExecutionPolicy, class _ForwardIterator, class _Function, class _IsVector>
|
---|
| 60 | void
|
---|
| 61 | __pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector,
|
---|
| 62 | /*parallel=*/std::false_type) noexcept;
|
---|
| 63 |
|
---|
| 64 | template <class _ExecutionPolicy, class _ForwardIterator, class _Function, class _IsVector>
|
---|
| 65 | void
|
---|
| 66 | __pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector,
|
---|
| 67 | /*parallel=*/std::true_type);
|
---|
| 68 |
|
---|
| 69 | template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
|
---|
| 70 | void
|
---|
| 71 | __pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick,
|
---|
| 72 | /*parallel=*/std::false_type) noexcept;
|
---|
| 73 |
|
---|
| 74 | template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
|
---|
| 75 | void
|
---|
| 76 | __pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick,
|
---|
| 77 | /*parallel=*/std::true_type);
|
---|
| 78 |
|
---|
| 79 | //------------------------------------------------------------------------
|
---|
| 80 | // walk1_n
|
---|
| 81 | //------------------------------------------------------------------------
|
---|
| 82 |
|
---|
| 83 | template <class _ForwardIterator, class _Size, class _Function>
|
---|
| 84 | _ForwardIterator __brick_walk1_n(_ForwardIterator, _Size, _Function,
|
---|
| 85 | /*_IsVectorTag=*/std::false_type);
|
---|
| 86 |
|
---|
| 87 | template <class _RandomAccessIterator, class _DifferenceType, class _Function>
|
---|
| 88 | _RandomAccessIterator __brick_walk1_n(_RandomAccessIterator, _DifferenceType, _Function,
|
---|
| 89 | /*vectorTag=*/std::true_type) noexcept;
|
---|
| 90 |
|
---|
| 91 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Function, class _IsVector>
|
---|
| 92 | _ForwardIterator
|
---|
| 93 | __pattern_walk1_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Function, _IsVector,
|
---|
| 94 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 95 |
|
---|
| 96 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Function, class _IsVector>
|
---|
| 97 | _RandomAccessIterator
|
---|
| 98 | __pattern_walk1_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Function, _IsVector,
|
---|
| 99 | /*is_parallel=*/std::true_type);
|
---|
| 100 |
|
---|
| 101 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Brick>
|
---|
| 102 | _ForwardIterator
|
---|
| 103 | __pattern_walk_brick_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Brick,
|
---|
| 104 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 105 |
|
---|
| 106 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Brick>
|
---|
| 107 | _RandomAccessIterator
|
---|
| 108 | __pattern_walk_brick_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Brick,
|
---|
| 109 | /*is_parallel=*/std::true_type);
|
---|
| 110 |
|
---|
| 111 | //------------------------------------------------------------------------
|
---|
| 112 | // walk2 (pseudo)
|
---|
| 113 | //
|
---|
| 114 | // walk2 evaluates f(x,y) for deferenced values (x,y) drawn from [first1,last1) and [first2,...)
|
---|
| 115 | //------------------------------------------------------------------------
|
---|
| 116 |
|
---|
| 117 | template <class _ForwardIterator1, class _ForwardIterator2, class _Function>
|
---|
| 118 | _ForwardIterator2 __brick_walk2(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function,
|
---|
| 119 | /*vector=*/std::false_type) noexcept;
|
---|
| 120 |
|
---|
| 121 | template <class _ForwardIterator1, class _ForwardIterator2, class _Function>
|
---|
| 122 | _ForwardIterator2 __brick_walk2(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function,
|
---|
| 123 | /*vector=*/std::true_type) noexcept;
|
---|
| 124 |
|
---|
| 125 | template <class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function>
|
---|
| 126 | _ForwardIterator2 __brick_walk2_n(_ForwardIterator1, _Size, _ForwardIterator2, _Function,
|
---|
| 127 | /*vector=*/std::false_type) noexcept;
|
---|
| 128 |
|
---|
| 129 | template <class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function>
|
---|
| 130 | _ForwardIterator2 __brick_walk2_n(_ForwardIterator1, _Size, _ForwardIterator2, _Function,
|
---|
| 131 | /*vector=*/std::true_type) noexcept;
|
---|
| 132 |
|
---|
| 133 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Function, class _IsVector>
|
---|
| 134 | _ForwardIterator2
|
---|
| 135 | __pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector,
|
---|
| 136 | /*parallel=*/std::false_type) noexcept;
|
---|
| 137 |
|
---|
| 138 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Function, class _IsVector>
|
---|
| 139 | _ForwardIterator2
|
---|
| 140 | __pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector,
|
---|
| 141 | /*parallel=*/std::true_type);
|
---|
| 142 |
|
---|
| 143 | template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function,
|
---|
| 144 | class _IsVector>
|
---|
| 145 | _ForwardIterator2
|
---|
| 146 | __pattern_walk2_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Function, _IsVector,
|
---|
| 147 | /*parallel=*/std::false_type) noexcept;
|
---|
| 148 |
|
---|
| 149 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _Size, class _RandomAccessIterator2,
|
---|
| 150 | class _Function, class _IsVector>
|
---|
| 151 | _RandomAccessIterator2
|
---|
| 152 | __pattern_walk2_n(_ExecutionPolicy&&, _RandomAccessIterator1, _Size, _RandomAccessIterator2, _Function, _IsVector,
|
---|
| 153 | /*parallel=*/std::true_type);
|
---|
| 154 |
|
---|
| 155 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Brick>
|
---|
| 156 | _ForwardIterator2
|
---|
| 157 | __pattern_walk2_brick(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Brick,
|
---|
| 158 | /*parallel=*/std::false_type) noexcept;
|
---|
| 159 |
|
---|
| 160 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Brick>
|
---|
| 161 | _RandomAccessIterator2
|
---|
| 162 | __pattern_walk2_brick(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 163 | _Brick,
|
---|
| 164 | /*parallel=*/std::true_type);
|
---|
| 165 |
|
---|
| 166 | template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Brick>
|
---|
| 167 | _ForwardIterator2
|
---|
| 168 | __pattern_walk2_brick_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Brick,
|
---|
| 169 | /*parallel=*/std::false_type) noexcept;
|
---|
| 170 |
|
---|
| 171 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _Size, class _RandomAccessIterator2, class _Brick>
|
---|
| 172 | _RandomAccessIterator2
|
---|
| 173 | __pattern_walk2_brick_n(_ExecutionPolicy&&, _RandomAccessIterator1, _Size, _RandomAccessIterator2, _Brick,
|
---|
| 174 | /*parallel=*/std::true_type);
|
---|
| 175 |
|
---|
| 176 | //------------------------------------------------------------------------
|
---|
| 177 | // walk3 (pseudo)
|
---|
| 178 | //
|
---|
| 179 | // walk3 evaluates f(x,y,z) for (x,y,z) drawn from [first1,last1), [first2,...), [first3,...)
|
---|
| 180 | //------------------------------------------------------------------------
|
---|
| 181 |
|
---|
| 182 | template <class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator3, class _Function>
|
---|
| 183 | _ForwardIterator3 __brick_walk3(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator3, _Function,
|
---|
| 184 | /*vector=*/std::false_type) noexcept;
|
---|
| 185 |
|
---|
| 186 | template <class _RandomAccessIterator1, class _RandomAccessIterator2, class _RandomAccessIterator3, class _Function>
|
---|
| 187 | _RandomAccessIterator3 __brick_walk3(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 188 | _RandomAccessIterator3, _Function,
|
---|
| 189 | /*vector=*/std::true_type) noexcept;
|
---|
| 190 |
|
---|
| 191 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator3,
|
---|
| 192 | class _Function, class _IsVector>
|
---|
| 193 | _ForwardIterator3
|
---|
| 194 | __pattern_walk3(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator3,
|
---|
| 195 | _Function, _IsVector,
|
---|
| 196 | /*parallel=*/std::false_type) noexcept;
|
---|
| 197 |
|
---|
| 198 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2,
|
---|
| 199 | class _RandomAccessIterator3, class _Function, class _IsVector>
|
---|
| 200 | _RandomAccessIterator3
|
---|
| 201 | __pattern_walk3(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 202 | _RandomAccessIterator3, _Function, _IsVector, /*parallel=*/std::true_type);
|
---|
| 203 |
|
---|
| 204 | //------------------------------------------------------------------------
|
---|
| 205 | // equal
|
---|
| 206 | //------------------------------------------------------------------------
|
---|
| 207 |
|
---|
| 208 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 209 | bool __brick_equal(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate,
|
---|
| 210 | /* is_vector = */ std::false_type) noexcept;
|
---|
| 211 |
|
---|
| 212 | template <class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate>
|
---|
| 213 | bool __brick_equal(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _BinaryPredicate,
|
---|
| 214 | /* is_vector = */ std::true_type) noexcept;
|
---|
| 215 |
|
---|
| 216 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 217 | class _IsVector>
|
---|
| 218 | bool
|
---|
| 219 | __pattern_equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate,
|
---|
| 220 | _IsVector, /* is_parallel = */ std::false_type) noexcept;
|
---|
| 221 |
|
---|
| 222 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate,
|
---|
| 223 | class _IsVector>
|
---|
| 224 | bool
|
---|
| 225 | __pattern_equal(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 226 | _BinaryPredicate, _IsVector, /* is_parallel = */ std::true_type);
|
---|
| 227 |
|
---|
| 228 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 229 | bool __brick_equal(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate,
|
---|
| 230 | /* is_vector = */ std::false_type) noexcept;
|
---|
| 231 |
|
---|
| 232 | template <class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate>
|
---|
| 233 | bool __brick_equal(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _RandomAccessIterator2,
|
---|
| 234 | _BinaryPredicate, /* is_vector = */ std::true_type) noexcept;
|
---|
| 235 |
|
---|
| 236 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 237 | class _IsVector>
|
---|
| 238 | bool
|
---|
| 239 | __pattern_equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 240 | _BinaryPredicate, _IsVector, /* is_parallel = */ std::false_type) noexcept;
|
---|
| 241 |
|
---|
| 242 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate,
|
---|
| 243 | class _IsVector>
|
---|
| 244 | bool
|
---|
| 245 | __pattern_equal(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 246 | _RandomAccessIterator2, _BinaryPredicate, _IsVector, /* is_parallel = */ std::true_type);
|
---|
| 247 |
|
---|
| 248 | //------------------------------------------------------------------------
|
---|
| 249 | // find_if
|
---|
| 250 | //------------------------------------------------------------------------
|
---|
| 251 |
|
---|
| 252 | template <class _ForwardIterator, class _Predicate>
|
---|
| 253 | _ForwardIterator __brick_find_if(_ForwardIterator, _ForwardIterator, _Predicate,
|
---|
| 254 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 255 |
|
---|
| 256 | template <class _RandomAccessIterator, class _Predicate>
|
---|
| 257 | _RandomAccessIterator __brick_find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate,
|
---|
| 258 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 259 |
|
---|
| 260 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
---|
| 261 | _ForwardIterator
|
---|
| 262 | __pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector,
|
---|
| 263 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 264 |
|
---|
| 265 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
---|
| 266 | _ForwardIterator
|
---|
| 267 | __pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector,
|
---|
| 268 | /*is_parallel=*/std::true_type);
|
---|
| 269 |
|
---|
| 270 | //------------------------------------------------------------------------
|
---|
| 271 | // find_end
|
---|
| 272 | //------------------------------------------------------------------------
|
---|
| 273 |
|
---|
| 274 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 275 | _ForwardIterator1 __brick_find_end(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 276 | _BinaryPredicate,
|
---|
| 277 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 278 |
|
---|
| 279 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 280 | _ForwardIterator1 __brick_find_end(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 281 | _BinaryPredicate,
|
---|
| 282 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 283 |
|
---|
| 284 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 285 | class _IsVector>
|
---|
| 286 | _ForwardIterator1
|
---|
| 287 | __pattern_find_end(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 288 | _BinaryPredicate, _IsVector,
|
---|
| 289 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 290 |
|
---|
| 291 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 292 | class _IsVector>
|
---|
| 293 | _ForwardIterator1
|
---|
| 294 | __pattern_find_end(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 295 | _BinaryPredicate, _IsVector,
|
---|
| 296 | /*is_parallel=*/std::true_type) noexcept;
|
---|
| 297 |
|
---|
| 298 | //------------------------------------------------------------------------
|
---|
| 299 | // find_first_of
|
---|
| 300 | //------------------------------------------------------------------------
|
---|
| 301 |
|
---|
| 302 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 303 | _ForwardIterator1 __brick_find_first_of(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 304 | _BinaryPredicate,
|
---|
| 305 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 306 |
|
---|
| 307 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 308 | _ForwardIterator1 __brick_find_first_of(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 309 | _BinaryPredicate,
|
---|
| 310 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 311 |
|
---|
| 312 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 313 | class _IsVector>
|
---|
| 314 | _ForwardIterator1
|
---|
| 315 | __pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 316 | _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept;
|
---|
| 317 |
|
---|
| 318 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 319 | class _IsVector>
|
---|
| 320 | _ForwardIterator1
|
---|
| 321 | __pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 322 | _BinaryPredicate, _IsVector, /*is_parallel=*/std::true_type) noexcept;
|
---|
| 323 |
|
---|
| 324 | //------------------------------------------------------------------------
|
---|
| 325 | // search
|
---|
| 326 | //------------------------------------------------------------------------
|
---|
| 327 |
|
---|
| 328 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 329 | _ForwardIterator1 __brick_search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 330 | _BinaryPredicate,
|
---|
| 331 | /*vector=*/std::false_type) noexcept;
|
---|
| 332 |
|
---|
| 333 | template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
---|
| 334 | _ForwardIterator1 __brick_search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 335 | _BinaryPredicate,
|
---|
| 336 | /*vector=*/std::true_type) noexcept;
|
---|
| 337 |
|
---|
| 338 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 339 | class _IsVector>
|
---|
| 340 | _ForwardIterator1
|
---|
| 341 | __pattern_search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 342 | _BinaryPredicate, _IsVector,
|
---|
| 343 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 344 |
|
---|
| 345 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
---|
| 346 | class _IsVector>
|
---|
| 347 | _ForwardIterator1
|
---|
| 348 | __pattern_search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 349 | _BinaryPredicate, _IsVector,
|
---|
| 350 | /*is_parallel=*/std::true_type) noexcept;
|
---|
| 351 |
|
---|
| 352 | //------------------------------------------------------------------------
|
---|
| 353 | // search_n
|
---|
| 354 | //------------------------------------------------------------------------
|
---|
| 355 |
|
---|
| 356 | template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
|
---|
| 357 | _ForwardIterator
|
---|
| 358 | __brick_search_n(_ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate,
|
---|
| 359 | /*vector=*/std::false_type) noexcept;
|
---|
| 360 |
|
---|
| 361 | template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
|
---|
| 362 | _ForwardIterator
|
---|
| 363 | __brick_search_n(_ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate,
|
---|
| 364 | /*vector=*/std::true_type) noexcept;
|
---|
| 365 |
|
---|
| 366 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate,
|
---|
| 367 | class IsVector>
|
---|
| 368 | _ForwardIterator
|
---|
| 369 | __pattern_search_n(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate,
|
---|
| 370 | IsVector,
|
---|
| 371 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 372 |
|
---|
| 373 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Tp, class _BinaryPredicate,
|
---|
| 374 | class IsVector>
|
---|
| 375 | _RandomAccessIterator
|
---|
| 376 | __pattern_search_n(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Size, const _Tp&,
|
---|
| 377 | _BinaryPredicate, IsVector,
|
---|
| 378 | /*is_parallel=*/std::true_type) noexcept;
|
---|
| 379 |
|
---|
| 380 | //------------------------------------------------------------------------
|
---|
| 381 | // copy_n
|
---|
| 382 | //------------------------------------------------------------------------
|
---|
| 383 |
|
---|
| 384 | template <class _ForwardIterator, class _Size, class _OutputIterator>
|
---|
| 385 | _OutputIterator __brick_copy_n(_ForwardIterator, _Size, _OutputIterator,
|
---|
| 386 | /*vector=*/std::false_type) noexcept;
|
---|
| 387 |
|
---|
| 388 | template <class _ForwardIterator, class _Size, class _OutputIterator>
|
---|
| 389 | _OutputIterator __brick_copy_n(_ForwardIterator, _Size, _OutputIterator,
|
---|
| 390 | /*vector=*/std::true_type) noexcept;
|
---|
| 391 |
|
---|
| 392 | //------------------------------------------------------------------------
|
---|
| 393 | // copy
|
---|
| 394 | //------------------------------------------------------------------------
|
---|
| 395 |
|
---|
| 396 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 397 | _OutputIterator __brick_copy(_ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 398 | /*vector=*/std::false_type) noexcept;
|
---|
| 399 |
|
---|
| 400 | template <class _RandomAccessIterator, class _OutputIterator>
|
---|
| 401 | _OutputIterator __brick_copy(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator,
|
---|
| 402 | /*vector=*/std::true_type) noexcept;
|
---|
| 403 |
|
---|
| 404 | //------------------------------------------------------------------------
|
---|
| 405 | // move
|
---|
| 406 | //------------------------------------------------------------------------
|
---|
| 407 |
|
---|
| 408 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 409 | _OutputIterator __brick_move(_ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 410 | /*vector=*/std::false_type) noexcept;
|
---|
| 411 |
|
---|
| 412 | template <class _RandomAccessIterator, class _OutputIterator>
|
---|
| 413 | _OutputIterator __brick_move(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator,
|
---|
| 414 | /*vector=*/std::true_type) noexcept;
|
---|
| 415 |
|
---|
| 416 | //------------------------------------------------------------------------
|
---|
| 417 | // swap_ranges
|
---|
| 418 | //------------------------------------------------------------------------
|
---|
| 419 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 420 | _OutputIterator
|
---|
| 421 | __brick_swap_ranges(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,
|
---|
| 422 | /*vector=*/std::false_type) noexcept;
|
---|
| 423 |
|
---|
| 424 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 425 | _OutputIterator
|
---|
| 426 | __brick_swap_ranges(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,
|
---|
| 427 | /*vector=*/std::true_type) noexcept;
|
---|
| 428 |
|
---|
| 429 | //------------------------------------------------------------------------
|
---|
| 430 | // copy_if
|
---|
| 431 | //------------------------------------------------------------------------
|
---|
| 432 |
|
---|
| 433 | template <class _ForwardIterator, class _OutputIterator, class _UnaryPredicate>
|
---|
| 434 | _OutputIterator __brick_copy_if(_ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate,
|
---|
| 435 | /*vector=*/std::false_type) noexcept;
|
---|
| 436 |
|
---|
| 437 | template <class _ForwardIterator, class _OutputIterator, class _UnaryPredicate>
|
---|
| 438 | _OutputIterator __brick_copy_if(_ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate,
|
---|
| 439 | /*vector=*/std::true_type) noexcept;
|
---|
| 440 |
|
---|
| 441 | template <class _DifferenceType, class _ForwardIterator, class _UnaryPredicate>
|
---|
| 442 | std::pair<_DifferenceType, _DifferenceType>
|
---|
| 443 | __brick_calc_mask_1(_ForwardIterator, _ForwardIterator, bool* __restrict, _UnaryPredicate,
|
---|
| 444 | /*vector=*/std::false_type) noexcept;
|
---|
| 445 | template <class _DifferenceType, class _RandomAccessIterator, class _UnaryPredicate>
|
---|
| 446 | std::pair<_DifferenceType, _DifferenceType>
|
---|
| 447 | __brick_calc_mask_1(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _UnaryPredicate,
|
---|
| 448 | /*vector=*/std::true_type) noexcept;
|
---|
| 449 |
|
---|
| 450 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 451 | void
|
---|
| 452 | __brick_copy_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator, bool*,
|
---|
| 453 | /*vector=*/std::false_type) noexcept;
|
---|
| 454 |
|
---|
| 455 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 456 | void
|
---|
| 457 | __brick_copy_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator, bool* __restrict,
|
---|
| 458 | /*vector=*/std::true_type) noexcept;
|
---|
| 459 |
|
---|
| 460 | template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2>
|
---|
| 461 | void
|
---|
| 462 | __brick_partition_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator1, _OutputIterator2, bool*,
|
---|
| 463 | /*vector=*/std::false_type) noexcept;
|
---|
| 464 |
|
---|
| 465 | template <class _RandomAccessIterator, class _OutputIterator1, class _OutputIterator2>
|
---|
| 466 | void
|
---|
| 467 | __brick_partition_by_mask(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator1, _OutputIterator2, bool*,
|
---|
| 468 | /*vector=*/std::true_type) noexcept;
|
---|
| 469 |
|
---|
| 470 | template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 471 | _OutputIterator
|
---|
| 472 | __pattern_copy_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate, _IsVector,
|
---|
| 473 | /*parallel=*/std::false_type) noexcept;
|
---|
| 474 |
|
---|
| 475 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _UnaryPredicate,
|
---|
| 476 | class _IsVector>
|
---|
| 477 | _OutputIterator
|
---|
| 478 | __pattern_copy_if(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _OutputIterator, _UnaryPredicate,
|
---|
| 479 | _IsVector, /*parallel=*/std::true_type);
|
---|
| 480 |
|
---|
| 481 | //------------------------------------------------------------------------
|
---|
| 482 | // count
|
---|
| 483 | //------------------------------------------------------------------------
|
---|
| 484 |
|
---|
| 485 | template <class _ForwardIterator, class _Predicate>
|
---|
| 486 | typename std::iterator_traits<_ForwardIterator>::difference_type
|
---|
| 487 | __brick_count(_ForwardIterator, _ForwardIterator, _Predicate,
|
---|
| 488 | /* is_vector = */ std::true_type) noexcept;
|
---|
| 489 |
|
---|
| 490 | template <class _ForwardIterator, class _Predicate>
|
---|
| 491 | typename std::iterator_traits<_ForwardIterator>::difference_type
|
---|
| 492 | __brick_count(_ForwardIterator, _ForwardIterator, _Predicate,
|
---|
| 493 | /* is_vector = */ std::false_type) noexcept;
|
---|
| 494 |
|
---|
| 495 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
---|
| 496 | typename std::iterator_traits<_ForwardIterator>::difference_type
|
---|
| 497 | __pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate,
|
---|
| 498 | /* is_parallel */ std::false_type, _IsVector) noexcept;
|
---|
| 499 |
|
---|
| 500 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
---|
| 501 | typename std::iterator_traits<_ForwardIterator>::difference_type
|
---|
| 502 | __pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate,
|
---|
| 503 | /* is_parallel */ std::true_type, _IsVector);
|
---|
| 504 |
|
---|
| 505 | //------------------------------------------------------------------------
|
---|
| 506 | // unique
|
---|
| 507 | //------------------------------------------------------------------------
|
---|
| 508 |
|
---|
| 509 | template <class _ForwardIterator, class _BinaryPredicate>
|
---|
| 510 | _ForwardIterator __brick_unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
|
---|
| 511 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 512 |
|
---|
| 513 | template <class _ForwardIterator, class _BinaryPredicate>
|
---|
| 514 | _ForwardIterator __brick_unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
|
---|
| 515 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 516 |
|
---|
| 517 | template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
|
---|
| 518 | _ForwardIterator
|
---|
| 519 | __pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector,
|
---|
| 520 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 521 |
|
---|
| 522 | template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
|
---|
| 523 | _ForwardIterator
|
---|
| 524 | __pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector,
|
---|
| 525 | /*is_parallel=*/std::true_type) noexcept;
|
---|
| 526 |
|
---|
| 527 | //------------------------------------------------------------------------
|
---|
| 528 | // unique_copy
|
---|
| 529 | //------------------------------------------------------------------------
|
---|
| 530 |
|
---|
| 531 | template <class _ForwardIterator, class OutputIterator, class _BinaryPredicate>
|
---|
| 532 | OutputIterator __brick_unique_copy(_ForwardIterator, _ForwardIterator, OutputIterator, _BinaryPredicate,
|
---|
| 533 | /*vector=*/std::false_type) noexcept;
|
---|
| 534 |
|
---|
| 535 | template <class _RandomAccessIterator, class _OutputIterator, class _BinaryPredicate>
|
---|
| 536 | _OutputIterator __brick_unique_copy(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator, _BinaryPredicate,
|
---|
| 537 | /*vector=*/std::true_type) noexcept;
|
---|
| 538 |
|
---|
| 539 | template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _BinaryPredicate,
|
---|
| 540 | class _IsVector>
|
---|
| 541 | _OutputIterator
|
---|
| 542 | __pattern_unique_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryPredicate,
|
---|
| 543 | _IsVector, /*parallel=*/std::false_type) noexcept;
|
---|
| 544 |
|
---|
| 545 | template <class _ExecutionPolicy, class _DifferenceType, class _RandomAccessIterator, class _BinaryPredicate>
|
---|
| 546 | _DifferenceType
|
---|
| 547 | __brick_calc_mask_2(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _BinaryPredicate,
|
---|
| 548 | /*vector=*/std::false_type) noexcept;
|
---|
| 549 |
|
---|
| 550 | template <class _DifferenceType, class _RandomAccessIterator, class _BinaryPredicate>
|
---|
| 551 | _DifferenceType
|
---|
| 552 | __brick_calc_mask_2(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _BinaryPredicate,
|
---|
| 553 | /*vector=*/std::true_type) noexcept;
|
---|
| 554 |
|
---|
| 555 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _BinaryPredicate,
|
---|
| 556 | class _IsVector>
|
---|
| 557 | _OutputIterator
|
---|
| 558 | __pattern_unique_copy(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _OutputIterator,
|
---|
| 559 | _BinaryPredicate, _IsVector, /*parallel=*/std::true_type);
|
---|
| 560 |
|
---|
| 561 | //------------------------------------------------------------------------
|
---|
| 562 | // reverse
|
---|
| 563 | //------------------------------------------------------------------------
|
---|
| 564 |
|
---|
| 565 | template <class _BidirectionalIterator>
|
---|
| 566 | void __brick_reverse(_BidirectionalIterator, _BidirectionalIterator,
|
---|
| 567 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 568 |
|
---|
| 569 | template <class _BidirectionalIterator>
|
---|
| 570 | void __brick_reverse(_BidirectionalIterator, _BidirectionalIterator,
|
---|
| 571 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 572 |
|
---|
| 573 | template <class _BidirectionalIterator>
|
---|
| 574 | void __brick_reverse(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
|
---|
| 575 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 576 |
|
---|
| 577 | template <class _BidirectionalIterator>
|
---|
| 578 | void __brick_reverse(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
|
---|
| 579 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 580 |
|
---|
| 581 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _IsVector>
|
---|
| 582 | void
|
---|
| 583 | __pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector,
|
---|
| 584 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 585 |
|
---|
| 586 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _IsVector>
|
---|
| 587 | void
|
---|
| 588 | __pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector,
|
---|
| 589 | /*is_parallel=*/std::true_type);
|
---|
| 590 |
|
---|
| 591 | //------------------------------------------------------------------------
|
---|
| 592 | // reverse_copy
|
---|
| 593 | //------------------------------------------------------------------------
|
---|
| 594 |
|
---|
| 595 | template <class _BidirectionalIterator, class _OutputIterator>
|
---|
| 596 | _OutputIterator __brick_reverse_copy(_BidirectionalIterator, _BidirectionalIterator, _OutputIterator,
|
---|
| 597 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 598 |
|
---|
| 599 | template <class _BidirectionalIterator, class _OutputIterator>
|
---|
| 600 | _OutputIterator __brick_reverse_copy(_BidirectionalIterator, _BidirectionalIterator, _OutputIterator,
|
---|
| 601 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 602 |
|
---|
| 603 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _OutputIterator, class _IsVector>
|
---|
| 604 | _OutputIterator
|
---|
| 605 | __pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector,
|
---|
| 606 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 607 |
|
---|
| 608 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _OutputIterator, class _IsVector>
|
---|
| 609 | _OutputIterator
|
---|
| 610 | __pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector,
|
---|
| 611 | /*is_parallel=*/std::true_type);
|
---|
| 612 |
|
---|
| 613 | //------------------------------------------------------------------------
|
---|
| 614 | // rotate
|
---|
| 615 | //------------------------------------------------------------------------
|
---|
| 616 |
|
---|
| 617 | template <class _ForwardIterator>
|
---|
| 618 | _ForwardIterator __brick_rotate(_ForwardIterator, _ForwardIterator, _ForwardIterator,
|
---|
| 619 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 620 |
|
---|
| 621 | template <class _ForwardIterator>
|
---|
| 622 | _ForwardIterator __brick_rotate(_ForwardIterator, _ForwardIterator, _ForwardIterator,
|
---|
| 623 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 624 |
|
---|
| 625 | template <class _ExecutionPolicy, class _ForwardIterator, class _IsVector>
|
---|
| 626 | _ForwardIterator
|
---|
| 627 | __pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector,
|
---|
| 628 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 629 |
|
---|
| 630 | template <class _ExecutionPolicy, class _ForwardIterator, class _IsVector>
|
---|
| 631 | _ForwardIterator
|
---|
| 632 | __pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector,
|
---|
| 633 | /*is_parallel=*/std::true_type);
|
---|
| 634 |
|
---|
| 635 | //------------------------------------------------------------------------
|
---|
| 636 | // rotate_copy
|
---|
| 637 | //------------------------------------------------------------------------
|
---|
| 638 |
|
---|
| 639 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 640 | _OutputIterator __brick_rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 641 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 642 |
|
---|
| 643 | template <class _ForwardIterator, class _OutputIterator>
|
---|
| 644 | _OutputIterator __brick_rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 645 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 646 |
|
---|
| 647 | template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _IsVector>
|
---|
| 648 | _OutputIterator
|
---|
| 649 | __pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 650 | _IsVector,
|
---|
| 651 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 652 |
|
---|
| 653 | template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _IsVector>
|
---|
| 654 | _OutputIterator
|
---|
| 655 | __pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
|
---|
| 656 | _IsVector,
|
---|
| 657 | /*is_parallel=*/std::true_type);
|
---|
| 658 |
|
---|
| 659 | //------------------------------------------------------------------------
|
---|
| 660 | // is_partitioned
|
---|
| 661 | //------------------------------------------------------------------------
|
---|
| 662 |
|
---|
| 663 | template <class _ForwardIterator, class _UnaryPredicate>
|
---|
| 664 | bool __brick_is_partitioned(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
|
---|
| 665 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 666 |
|
---|
| 667 | template <class _ForwardIterator, class _UnaryPredicate>
|
---|
| 668 | bool __brick_is_partitioned(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
|
---|
| 669 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 670 |
|
---|
| 671 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 672 | bool
|
---|
| 673 | __pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 674 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 675 |
|
---|
| 676 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 677 | bool
|
---|
| 678 | __pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 679 | /*is_parallel=*/std::true_type);
|
---|
| 680 |
|
---|
| 681 | //------------------------------------------------------------------------
|
---|
| 682 | // partition
|
---|
| 683 | //------------------------------------------------------------------------
|
---|
| 684 |
|
---|
| 685 | template <class _ForwardIterator, class _UnaryPredicate>
|
---|
| 686 | _ForwardIterator __brick_partition(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
|
---|
| 687 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 688 |
|
---|
| 689 | template <class _ForwardIterator, class _UnaryPredicate>
|
---|
| 690 | _ForwardIterator __brick_partition(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
|
---|
| 691 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 692 |
|
---|
| 693 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 694 | _ForwardIterator
|
---|
| 695 | __pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 696 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 697 |
|
---|
| 698 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 699 | _ForwardIterator
|
---|
| 700 | __pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 701 | /*is_parallel=*/std::true_type);
|
---|
| 702 |
|
---|
| 703 | //------------------------------------------------------------------------
|
---|
| 704 | // stable_partition
|
---|
| 705 | //------------------------------------------------------------------------
|
---|
| 706 |
|
---|
| 707 | template <class _BidirectionalIterator, class _UnaryPredicate>
|
---|
| 708 | _BidirectionalIterator __brick_stable_partition(_BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
|
---|
| 709 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 710 |
|
---|
| 711 | template <class _BidirectionalIterator, class _UnaryPredicate>
|
---|
| 712 | _BidirectionalIterator __brick_stable_partition(_BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
|
---|
| 713 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 714 |
|
---|
| 715 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 716 | _BidirectionalIterator
|
---|
| 717 | __pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
|
---|
| 718 | _IsVector,
|
---|
| 719 | /*is_parallelization=*/std::false_type) noexcept;
|
---|
| 720 |
|
---|
| 721 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 722 | _BidirectionalIterator
|
---|
| 723 | __pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
|
---|
| 724 | _IsVector,
|
---|
| 725 | /*is_parallelization=*/std::true_type) noexcept;
|
---|
| 726 |
|
---|
| 727 | //------------------------------------------------------------------------
|
---|
| 728 | // partition_copy
|
---|
| 729 | //------------------------------------------------------------------------
|
---|
| 730 |
|
---|
| 731 | template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate>
|
---|
| 732 | std::pair<_OutputIterator1, _OutputIterator2>
|
---|
| 733 | __brick_partition_copy(_ForwardIterator, _ForwardIterator, _OutputIterator1, _OutputIterator2, _UnaryPredicate,
|
---|
| 734 | /*is_vector=*/std::false_type) noexcept;
|
---|
| 735 |
|
---|
| 736 | template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate>
|
---|
| 737 | std::pair<_OutputIterator1, _OutputIterator2>
|
---|
| 738 | __brick_partition_copy(_ForwardIterator, _ForwardIterator, _OutputIterator1, _OutputIterator2, _UnaryPredicate,
|
---|
| 739 | /*is_vector=*/std::true_type) noexcept;
|
---|
| 740 |
|
---|
| 741 | template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator1, class _OutputIterator2,
|
---|
| 742 | class _UnaryPredicate, class _IsVector>
|
---|
| 743 | std::pair<_OutputIterator1, _OutputIterator2>
|
---|
| 744 | __pattern_partition_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator1, _OutputIterator2,
|
---|
| 745 | _UnaryPredicate, _IsVector,
|
---|
| 746 | /*is_parallelization=*/std::false_type) noexcept;
|
---|
| 747 |
|
---|
| 748 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator1, class _OutputIterator2,
|
---|
| 749 | class _UnaryPredicate, class _IsVector>
|
---|
| 750 | std::pair<_OutputIterator1, _OutputIterator2>
|
---|
| 751 | __pattern_partition_copy(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _OutputIterator1,
|
---|
| 752 | _OutputIterator2, _UnaryPredicate, _IsVector,
|
---|
| 753 | /*is_parallelization=*/std::true_type);
|
---|
| 754 |
|
---|
| 755 | //------------------------------------------------------------------------
|
---|
| 756 | // sort
|
---|
| 757 | //------------------------------------------------------------------------
|
---|
| 758 |
|
---|
| 759 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector,
|
---|
| 760 | class _IsMoveConstructible>
|
---|
| 761 | void
|
---|
| 762 | __pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
|
---|
| 763 | /*is_parallel=*/std::false_type, _IsMoveConstructible) noexcept;
|
---|
| 764 |
|
---|
| 765 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 766 | void
|
---|
| 767 | __pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
|
---|
| 768 | /*is_parallel=*/std::true_type,
|
---|
| 769 | /*is_move_constructible=*/std::true_type);
|
---|
| 770 |
|
---|
| 771 | //------------------------------------------------------------------------
|
---|
| 772 | // stable_sort
|
---|
| 773 | //------------------------------------------------------------------------
|
---|
| 774 |
|
---|
| 775 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 776 | void
|
---|
| 777 | __pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 778 | _IsVector /*is_vector*/,
|
---|
| 779 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 780 |
|
---|
| 781 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 782 | void
|
---|
| 783 | __pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 784 | _IsVector /*is_vector*/,
|
---|
| 785 | /*is_parallel=*/std::true_type);
|
---|
| 786 |
|
---|
| 787 | //------------------------------------------------------------------------
|
---|
| 788 | // partial_sort
|
---|
| 789 | //------------------------------------------------------------------------
|
---|
| 790 |
|
---|
| 791 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 792 | void
|
---|
| 793 | __pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator,
|
---|
| 794 | _Compare, _IsVector,
|
---|
| 795 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 796 |
|
---|
| 797 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 798 | void
|
---|
| 799 | __pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator,
|
---|
| 800 | _Compare, _IsVector,
|
---|
| 801 | /*is_parallel=*/std::true_type);
|
---|
| 802 |
|
---|
| 803 | //------------------------------------------------------------------------
|
---|
| 804 | // partial_sort_copy
|
---|
| 805 | //------------------------------------------------------------------------
|
---|
| 806 |
|
---|
| 807 | template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 808 | _RandomAccessIterator
|
---|
| 809 | __pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _RandomAccessIterator,
|
---|
| 810 | _RandomAccessIterator, _Compare, _IsVector,
|
---|
| 811 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 812 |
|
---|
| 813 | template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 814 | _RandomAccessIterator
|
---|
| 815 | __pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _RandomAccessIterator,
|
---|
| 816 | _RandomAccessIterator, _Compare, _IsVector,
|
---|
| 817 | /*is_parallel=*/std::true_type);
|
---|
| 818 |
|
---|
| 819 | //------------------------------------------------------------------------
|
---|
| 820 | // adjacent_find
|
---|
| 821 | //------------------------------------------------------------------------
|
---|
| 822 |
|
---|
| 823 | template <class _ForwardIterator, class _BinaryPredicate>
|
---|
| 824 | _ForwardIterator
|
---|
| 825 | __brick_adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
|
---|
| 826 | /* IsVector = */ std::true_type, bool) noexcept;
|
---|
| 827 |
|
---|
| 828 | template <class _ForwardIterator, class _BinaryPredicate>
|
---|
| 829 | _ForwardIterator
|
---|
| 830 | __brick_adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
|
---|
| 831 | /* IsVector = */ std::false_type, bool) noexcept;
|
---|
| 832 |
|
---|
| 833 | template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
|
---|
| 834 | _ForwardIterator
|
---|
| 835 | __pattern_adjacent_find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate,
|
---|
| 836 | /* is_parallel */ std::false_type, _IsVector, bool) noexcept;
|
---|
| 837 |
|
---|
| 838 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _BinaryPredicate, class _IsVector>
|
---|
| 839 | _RandomAccessIterator
|
---|
| 840 | __pattern_adjacent_find(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _BinaryPredicate,
|
---|
| 841 | /* is_parallel */ std::true_type, _IsVector, bool);
|
---|
| 842 |
|
---|
| 843 | //------------------------------------------------------------------------
|
---|
| 844 | // nth_element
|
---|
| 845 | //------------------------------------------------------------------------
|
---|
| 846 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 847 | void
|
---|
| 848 | __pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 849 | _IsVector,
|
---|
| 850 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 851 |
|
---|
| 852 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 853 | void
|
---|
| 854 | __pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 855 | _IsVector,
|
---|
| 856 | /*is_parallel=*/std::true_type) noexcept;
|
---|
| 857 |
|
---|
| 858 | //------------------------------------------------------------------------
|
---|
| 859 | // fill, fill_n
|
---|
| 860 | //------------------------------------------------------------------------
|
---|
| 861 | template <class _ForwardIterator, class _Tp>
|
---|
| 862 | void
|
---|
| 863 | __brick_fill(_ForwardIterator, _ForwardIterator, const _Tp&,
|
---|
| 864 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 865 |
|
---|
| 866 | template <class _ForwardIterator, class _Tp>
|
---|
| 867 | void
|
---|
| 868 | __brick_fill(_ForwardIterator, _ForwardIterator, const _Tp&,
|
---|
| 869 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 870 |
|
---|
| 871 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _IsVector>
|
---|
| 872 | void
|
---|
| 873 | __pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&,
|
---|
| 874 | /*is_parallel=*/std::false_type, _IsVector) noexcept;
|
---|
| 875 |
|
---|
| 876 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _IsVector>
|
---|
| 877 | _ForwardIterator
|
---|
| 878 | __pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&,
|
---|
| 879 | /*is_parallel=*/std::true_type, _IsVector);
|
---|
| 880 |
|
---|
| 881 | template <class _OutputIterator, class _Size, class _Tp>
|
---|
| 882 | _OutputIterator
|
---|
| 883 | __brick_fill_n(_OutputIterator, _Size, const _Tp&,
|
---|
| 884 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 885 |
|
---|
| 886 | template <class _OutputIterator, class _Size, class _Tp>
|
---|
| 887 | _OutputIterator
|
---|
| 888 | __brick_fill_n(_OutputIterator, _Size, const _Tp&,
|
---|
| 889 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 890 |
|
---|
| 891 | template <class _ExecutionPolicy, class _OutputIterator, class _Size, class _Tp, class _IsVector>
|
---|
| 892 | _OutputIterator
|
---|
| 893 | __pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&,
|
---|
| 894 | /*is_parallel=*/std::false_type, _IsVector) noexcept;
|
---|
| 895 |
|
---|
| 896 | template <class _ExecutionPolicy, class _OutputIterator, class _Size, class _Tp, class _IsVector>
|
---|
| 897 | _OutputIterator
|
---|
| 898 | __pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&,
|
---|
| 899 | /*is_parallel=*/std::true_type, _IsVector);
|
---|
| 900 |
|
---|
| 901 | //------------------------------------------------------------------------
|
---|
| 902 | // generate, generate_n
|
---|
| 903 | //------------------------------------------------------------------------
|
---|
| 904 |
|
---|
| 905 | template <class _RandomAccessIterator, class _Generator>
|
---|
| 906 | void __brick_generate(_RandomAccessIterator, _RandomAccessIterator, _Generator,
|
---|
| 907 | /* is_vector = */ std::true_type) noexcept;
|
---|
| 908 |
|
---|
| 909 | template <class _ForwardIterator, class _Generator>
|
---|
| 910 | void __brick_generate(_ForwardIterator, _ForwardIterator, _Generator,
|
---|
| 911 | /* is_vector = */ std::false_type) noexcept;
|
---|
| 912 |
|
---|
| 913 | template <class _ExecutionPolicy, class _ForwardIterator, class _Generator, class _IsVector>
|
---|
| 914 | void
|
---|
| 915 | __pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator,
|
---|
| 916 | /*is_parallel=*/std::false_type, _IsVector) noexcept;
|
---|
| 917 |
|
---|
| 918 | template <class _ExecutionPolicy, class _ForwardIterator, class _Generator, class _IsVector>
|
---|
| 919 | _ForwardIterator
|
---|
| 920 | __pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator,
|
---|
| 921 | /*is_parallel=*/std::true_type, _IsVector);
|
---|
| 922 |
|
---|
| 923 | template <class OutputIterator, class Size, class _Generator>
|
---|
| 924 | OutputIterator __brick_generate_n(OutputIterator, Size, _Generator,
|
---|
| 925 | /* is_vector = */ std::true_type) noexcept;
|
---|
| 926 |
|
---|
| 927 | template <class OutputIterator, class Size, class _Generator>
|
---|
| 928 | OutputIterator __brick_generate_n(OutputIterator, Size, _Generator,
|
---|
| 929 | /* is_vector = */ std::false_type) noexcept;
|
---|
| 930 |
|
---|
| 931 | template <class _ExecutionPolicy, class OutputIterator, class Size, class _Generator, class _IsVector>
|
---|
| 932 | OutputIterator
|
---|
| 933 | __pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator,
|
---|
| 934 | /*is_parallel=*/std::false_type, _IsVector) noexcept;
|
---|
| 935 |
|
---|
| 936 | template <class _ExecutionPolicy, class OutputIterator, class Size, class _Generator, class _IsVector>
|
---|
| 937 | OutputIterator
|
---|
| 938 | __pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator,
|
---|
| 939 | /*is_parallel=*/std::true_type, _IsVector);
|
---|
| 940 |
|
---|
| 941 | //------------------------------------------------------------------------
|
---|
| 942 | // remove
|
---|
| 943 | //------------------------------------------------------------------------
|
---|
| 944 | template <class _ForwardIterator, class _UnaryPredicate>
|
---|
| 945 | _ForwardIterator __brick_remove_if(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
|
---|
| 946 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 947 |
|
---|
| 948 | template <class _RandomAccessIterator, class _UnaryPredicate>
|
---|
| 949 | _RandomAccessIterator __brick_remove_if(_RandomAccessIterator, _RandomAccessIterator, _UnaryPredicate,
|
---|
| 950 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 951 |
|
---|
| 952 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 953 | _ForwardIterator
|
---|
| 954 | __pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 955 | /*is_parallel*/ std::false_type) noexcept;
|
---|
| 956 |
|
---|
| 957 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
---|
| 958 | _ForwardIterator
|
---|
| 959 | __pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
|
---|
| 960 | /*is_parallel*/ std::true_type) noexcept;
|
---|
| 961 |
|
---|
| 962 | //------------------------------------------------------------------------
|
---|
| 963 | // merge
|
---|
| 964 | //------------------------------------------------------------------------
|
---|
| 965 |
|
---|
| 966 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 967 | _OutputIterator __brick_merge(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 968 | _OutputIterator, _Compare,
|
---|
| 969 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 970 |
|
---|
| 971 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 972 | _OutputIterator __brick_merge(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 973 | _OutputIterator, _Compare,
|
---|
| 974 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 975 |
|
---|
| 976 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 977 | class _Compare, class _IsVector>
|
---|
| 978 | _OutputIterator
|
---|
| 979 | __pattern_merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 980 | _OutputIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept;
|
---|
| 981 |
|
---|
| 982 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _OutputIterator,
|
---|
| 983 | class _Compare, class _IsVector>
|
---|
| 984 | _OutputIterator
|
---|
| 985 | __pattern_merge(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 986 | _RandomAccessIterator2, _OutputIterator, _Compare, _IsVector,
|
---|
| 987 | /* is_parallel = */ std::true_type);
|
---|
| 988 |
|
---|
| 989 | //------------------------------------------------------------------------
|
---|
| 990 | // inplace_merge
|
---|
| 991 | //------------------------------------------------------------------------
|
---|
| 992 |
|
---|
| 993 | template <class _BidirectionalIterator, class _Compare>
|
---|
| 994 | void __brick_inplace_merge(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare,
|
---|
| 995 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 996 |
|
---|
| 997 | template <class _BidirectionalIterator, class _Compare>
|
---|
| 998 | void __brick_inplace_merge(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare,
|
---|
| 999 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1000 |
|
---|
| 1001 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare, class _IsVector>
|
---|
| 1002 | void
|
---|
| 1003 | __pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
|
---|
| 1004 | _Compare, _IsVector,
|
---|
| 1005 | /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1006 |
|
---|
| 1007 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare, class _IsVector>
|
---|
| 1008 | void
|
---|
| 1009 | __pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
|
---|
| 1010 | _Compare, _IsVector,
|
---|
| 1011 | /*is_parallel=*/std::true_type);
|
---|
| 1012 |
|
---|
| 1013 | //------------------------------------------------------------------------
|
---|
| 1014 | // includes
|
---|
| 1015 | //------------------------------------------------------------------------
|
---|
| 1016 |
|
---|
| 1017 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
---|
| 1018 | bool
|
---|
| 1019 | __pattern_includes(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1020 | _Compare, _IsVector,
|
---|
| 1021 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 1022 |
|
---|
| 1023 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
---|
| 1024 | bool
|
---|
| 1025 | __pattern_includes(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1026 | _Compare, _IsVector,
|
---|
| 1027 | /*is_parallel=*/std::true_type);
|
---|
| 1028 |
|
---|
| 1029 | //------------------------------------------------------------------------
|
---|
| 1030 | // set_union
|
---|
| 1031 | //------------------------------------------------------------------------
|
---|
| 1032 |
|
---|
| 1033 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1034 | _OutputIterator __brick_set_union(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1035 | _OutputIterator, _Compare,
|
---|
| 1036 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 1037 |
|
---|
| 1038 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1039 | _OutputIterator __brick_set_union(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1040 | _OutputIterator, _Compare,
|
---|
| 1041 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 1042 |
|
---|
| 1043 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1044 | class _Compare, class _IsVector>
|
---|
| 1045 | _OutputIterator
|
---|
| 1046 | __pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1047 | _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept;
|
---|
| 1048 |
|
---|
| 1049 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1050 | class _Compare, class _IsVector>
|
---|
| 1051 | _OutputIterator
|
---|
| 1052 | __pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1053 | _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
|
---|
| 1054 |
|
---|
| 1055 | //------------------------------------------------------------------------
|
---|
| 1056 | // set_intersection
|
---|
| 1057 | //------------------------------------------------------------------------
|
---|
| 1058 |
|
---|
| 1059 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1060 | _OutputIterator __brick_set_intersection(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1061 | _OutputIterator, _Compare,
|
---|
| 1062 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 1063 |
|
---|
| 1064 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1065 | _OutputIterator __brick_set_intersection(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1066 | _OutputIterator, _Compare,
|
---|
| 1067 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 1068 |
|
---|
| 1069 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1070 | class _Compare, class _IsVector>
|
---|
| 1071 | _OutputIterator
|
---|
| 1072 | __pattern_set_intersection(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1073 | _ForwardIterator2, _OutputIterator, _Compare, _IsVector,
|
---|
| 1074 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 1075 |
|
---|
| 1076 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1077 | class _Compare, class _IsVector>
|
---|
| 1078 | _OutputIterator
|
---|
| 1079 | __pattern_set_intersection(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1080 | _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
|
---|
| 1081 |
|
---|
| 1082 | //------------------------------------------------------------------------
|
---|
| 1083 | // set_difference
|
---|
| 1084 | //------------------------------------------------------------------------
|
---|
| 1085 |
|
---|
| 1086 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1087 | _OutputIterator __brick_set_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1088 | _OutputIterator, _Compare,
|
---|
| 1089 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 1090 |
|
---|
| 1091 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1092 | _OutputIterator __brick_set_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1093 | _OutputIterator, _Compare,
|
---|
| 1094 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 1095 |
|
---|
| 1096 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1097 | class _Compare, class _IsVector>
|
---|
| 1098 | _OutputIterator
|
---|
| 1099 | __pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1100 | _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept;
|
---|
| 1101 |
|
---|
| 1102 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1103 | class _Compare, class _IsVector>
|
---|
| 1104 | _OutputIterator
|
---|
| 1105 | __pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1106 | _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
|
---|
| 1107 |
|
---|
| 1108 | //------------------------------------------------------------------------
|
---|
| 1109 | // set_symmetric_difference
|
---|
| 1110 | //------------------------------------------------------------------------
|
---|
| 1111 |
|
---|
| 1112 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1113 | _OutputIterator __brick_set_symmetric_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1114 | _ForwardIterator2, _OutputIterator, _Compare,
|
---|
| 1115 | /*__is_vector=*/std::false_type) noexcept;
|
---|
| 1116 |
|
---|
| 1117 | template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
|
---|
| 1118 | _OutputIterator __brick_set_symmetric_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1119 | _ForwardIterator2, _OutputIterator, _Compare,
|
---|
| 1120 | /*__is_vector=*/std::true_type) noexcept;
|
---|
| 1121 |
|
---|
| 1122 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1123 | class _Compare, class _IsVector>
|
---|
| 1124 | _OutputIterator
|
---|
| 1125 | __pattern_set_symmetric_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1126 | _ForwardIterator2, _OutputIterator, _Compare, _IsVector,
|
---|
| 1127 | /*is_parallel=*/std::false_type) noexcept;
|
---|
| 1128 |
|
---|
| 1129 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
---|
| 1130 | class _Compare, class _IsVector>
|
---|
| 1131 | _OutputIterator
|
---|
| 1132 | __pattern_set_symmetric_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1133 | _ForwardIterator2, _OutputIterator, _Compare, _IsVector,
|
---|
| 1134 | /*is_parallel=*/std::true_type);
|
---|
| 1135 |
|
---|
| 1136 | //------------------------------------------------------------------------
|
---|
| 1137 | // is_heap_until
|
---|
| 1138 | //------------------------------------------------------------------------
|
---|
| 1139 |
|
---|
| 1140 | template <class _RandomAccessIterator, class _Compare>
|
---|
| 1141 | _RandomAccessIterator __brick_is_heap_until(_RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 1142 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 1143 |
|
---|
| 1144 | template <class _RandomAccessIterator, class _Compare>
|
---|
| 1145 | _RandomAccessIterator __brick_is_heap_until(_RandomAccessIterator, _RandomAccessIterator, _Compare,
|
---|
| 1146 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1147 |
|
---|
| 1148 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 1149 | _RandomAccessIterator
|
---|
| 1150 | __pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
|
---|
| 1151 | /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1152 |
|
---|
| 1153 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
---|
| 1154 | _RandomAccessIterator
|
---|
| 1155 | __pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
|
---|
| 1156 | /* is_parallel = */ std::true_type) noexcept;
|
---|
| 1157 |
|
---|
| 1158 | //------------------------------------------------------------------------
|
---|
| 1159 | // min_element
|
---|
| 1160 | //------------------------------------------------------------------------
|
---|
| 1161 |
|
---|
| 1162 | template <typename _ForwardIterator, typename _Compare>
|
---|
| 1163 | _ForwardIterator __brick_min_element(_ForwardIterator, _ForwardIterator, _Compare,
|
---|
| 1164 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 1165 |
|
---|
| 1166 | template <typename _ForwardIterator, typename _Compare>
|
---|
| 1167 | _ForwardIterator __brick_min_element(_ForwardIterator, _ForwardIterator, _Compare,
|
---|
| 1168 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1169 |
|
---|
| 1170 | template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
|
---|
| 1171 | _ForwardIterator
|
---|
| 1172 | __pattern_min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector,
|
---|
| 1173 | /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1174 |
|
---|
| 1175 | template <typename _ExecutionPolicy, typename _RandomAccessIterator, typename _Compare, typename _IsVector>
|
---|
| 1176 | _RandomAccessIterator
|
---|
| 1177 | __pattern_min_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
|
---|
| 1178 | /* is_parallel = */ std::true_type);
|
---|
| 1179 |
|
---|
| 1180 | //------------------------------------------------------------------------
|
---|
| 1181 | // minmax_element
|
---|
| 1182 | //------------------------------------------------------------------------
|
---|
| 1183 |
|
---|
| 1184 | template <typename _ForwardIterator, typename _Compare>
|
---|
| 1185 | std::pair<_ForwardIterator, _ForwardIterator> __brick_minmax_element(_ForwardIterator, _ForwardIterator, _Compare,
|
---|
| 1186 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 1187 |
|
---|
| 1188 | template <typename _ForwardIterator, typename _Compare>
|
---|
| 1189 | std::pair<_ForwardIterator, _ForwardIterator> __brick_minmax_element(_ForwardIterator, _ForwardIterator, _Compare,
|
---|
| 1190 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1191 |
|
---|
| 1192 | template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
|
---|
| 1193 | std::pair<_ForwardIterator, _ForwardIterator>
|
---|
| 1194 | __pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector,
|
---|
| 1195 | /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1196 |
|
---|
| 1197 | template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
|
---|
| 1198 | std::pair<_ForwardIterator, _ForwardIterator>
|
---|
| 1199 | __pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector,
|
---|
| 1200 | /* is_parallel = */ std::true_type);
|
---|
| 1201 |
|
---|
| 1202 | //------------------------------------------------------------------------
|
---|
| 1203 | // mismatch
|
---|
| 1204 | //------------------------------------------------------------------------
|
---|
| 1205 |
|
---|
| 1206 | template <class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
|
---|
| 1207 | std::pair<_ForwardIterator1, _ForwardIterator2> __brick_mismatch(_ForwardIterator1, _ForwardIterator1,
|
---|
| 1208 | _ForwardIterator2, _ForwardIterator2, _Predicate,
|
---|
| 1209 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 1210 |
|
---|
| 1211 | template <class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
|
---|
| 1212 | std::pair<_ForwardIterator1, _ForwardIterator2> __brick_mismatch(_ForwardIterator1, _ForwardIterator1,
|
---|
| 1213 | _ForwardIterator2, _ForwardIterator2, _Predicate,
|
---|
| 1214 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1215 |
|
---|
| 1216 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate, class _IsVector>
|
---|
| 1217 | std::pair<_ForwardIterator1, _ForwardIterator2>
|
---|
| 1218 | __pattern_mismatch(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1219 | _Predicate, _IsVector,
|
---|
| 1220 | /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1221 |
|
---|
| 1222 | template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Predicate,
|
---|
| 1223 | class _IsVector>
|
---|
| 1224 | std::pair<_RandomAccessIterator1, _RandomAccessIterator2>
|
---|
| 1225 | __pattern_mismatch(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
|
---|
| 1226 | _RandomAccessIterator2, _Predicate, _IsVector, /* is_parallel = */ std::true_type) noexcept;
|
---|
| 1227 |
|
---|
| 1228 | //------------------------------------------------------------------------
|
---|
| 1229 | // lexicographical_compare
|
---|
| 1230 | //------------------------------------------------------------------------
|
---|
| 1231 |
|
---|
| 1232 | template <class _ForwardIterator1, class _ForwardIterator2, class _Compare>
|
---|
| 1233 | bool __brick_lexicographical_compare(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1234 | _Compare,
|
---|
| 1235 | /* __is_vector = */ std::false_type) noexcept;
|
---|
| 1236 |
|
---|
| 1237 | template <class _ForwardIterator1, class _ForwardIterator2, class _Compare>
|
---|
| 1238 | bool __brick_lexicographical_compare(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
|
---|
| 1239 | _Compare,
|
---|
| 1240 | /* __is_vector = */ std::true_type) noexcept;
|
---|
| 1241 |
|
---|
| 1242 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
---|
| 1243 | bool
|
---|
| 1244 | __pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1245 | _ForwardIterator2, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept;
|
---|
| 1246 |
|
---|
| 1247 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
---|
| 1248 | bool
|
---|
| 1249 | __pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
|
---|
| 1250 | _ForwardIterator2, _Compare, _IsVector, /* is_parallel = */ std::true_type) noexcept;
|
---|
| 1251 |
|
---|
| 1252 | } // namespace __internal
|
---|
| 1253 | } // namespace __pstl
|
---|
| 1254 | #endif /* _PSTL_ALGORITHM_FWD_H */
|
---|