| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef _LIBCPP___PSTL_BACKEND_FWD_H |
| 10 | #define _LIBCPP___PSTL_BACKEND_FWD_H |
| 11 | |
| 12 | #include <__config> |
| 13 | |
| 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 15 | # pragma GCC system_header |
| 16 | #endif |
| 17 | |
| 18 | _LIBCPP_PUSH_MACROS |
| 19 | #include <__undef_macros> |
| 20 | |
| 21 | // |
| 22 | // This header declares available PSTL backends and the functions that must be implemented in order for the |
| 23 | // PSTL algorithms to be provided. |
| 24 | // |
| 25 | // Backends often do not implement the full set of functions themselves -- a configuration of the PSTL is |
| 26 | // usually a set of backends "stacked" together which each implement some algorithms under some execution |
| 27 | // policies. It is only necessary for the "stack" of backends to implement all algorithms under all execution |
| 28 | // policies, but a single backend is not required to implement everything on its own. |
| 29 | // |
| 30 | // The signatures used by each backend function are documented below. |
| 31 | // |
| 32 | // Exception handling |
| 33 | // ================== |
| 34 | // |
| 35 | // PSTL backends are expected to report errors (i.e. failure to allocate) by returning a disengaged `optional` from |
| 36 | // their implementation. Exceptions shouldn't be used to report an internal failure-to-allocate, since all exceptions |
| 37 | // are turned into a program termination at the front-end level. When a backend returns a disengaged `optional` to the |
| 38 | // frontend, the frontend will turn that into a call to `std::__throw_bad_alloc();` to report the internal failure to |
| 39 | // the user. |
| 40 | // |
| 41 | |
| 42 | #if _LIBCPP_STD_VER >= 17 |
| 43 | |
| 44 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 45 | namespace __pstl { |
| 46 | |
| 47 | template <class... _Backends> |
| 48 | struct __backend_configuration; |
| 49 | |
| 50 | struct __default_backend_tag; |
| 51 | struct __libdispatch_backend_tag; |
| 52 | struct __serial_backend_tag; |
| 53 | struct __std_thread_backend_tag; |
| 54 | |
| 55 | # if defined(_LIBCPP_PSTL_BACKEND_SERIAL) |
| 56 | using __current_configuration _LIBCPP_NODEBUG = __backend_configuration<__serial_backend_tag, __default_backend_tag>; |
| 57 | # elif defined(_LIBCPP_PSTL_BACKEND_STD_THREAD) |
| 58 | using __current_configuration _LIBCPP_NODEBUG = |
| 59 | __backend_configuration<__std_thread_backend_tag, __default_backend_tag>; |
| 60 | # elif defined(_LIBCPP_PSTL_BACKEND_LIBDISPATCH) |
| 61 | using __current_configuration _LIBCPP_NODEBUG = |
| 62 | __backend_configuration<__libdispatch_backend_tag, __default_backend_tag>; |
| 63 | # else |
| 64 | |
| 65 | // ...New vendors can add parallel backends here... |
| 66 | |
| 67 | # error "Invalid PSTL backend configuration" |
| 68 | # endif |
| 69 | |
| 70 | template <class _Backend, class _ExecutionPolicy> |
| 71 | struct __find_if; |
| 72 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 73 | // optional<_ForwardIterator> |
| 74 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 75 | |
| 76 | template <class _Backend, class _ExecutionPolicy> |
| 77 | struct __find_if_not; |
| 78 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 79 | // optional<_ForwardIterator> |
| 80 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 81 | |
| 82 | template <class _Backend, class _ExecutionPolicy> |
| 83 | struct __find; |
| 84 | // template <class _Policy, class _ForwardIterator, class _Tp> |
| 85 | // optional<_ForwardIterator> |
| 86 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) const noexcept; |
| 87 | |
| 88 | template <class _Backend, class _ExecutionPolicy> |
| 89 | struct __any_of; |
| 90 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 91 | // optional<bool> |
| 92 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 93 | |
| 94 | template <class _Backend, class _ExecutionPolicy> |
| 95 | struct __all_of; |
| 96 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 97 | // optional<bool> |
| 98 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 99 | |
| 100 | template <class _Backend, class _ExecutionPolicy> |
| 101 | struct __none_of; |
| 102 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 103 | // optional<bool> |
| 104 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 105 | |
| 106 | template <class _Backend, class _ExecutionPolicy> |
| 107 | struct __is_partitioned; |
| 108 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 109 | // optional<bool> |
| 110 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 111 | |
| 112 | template <class _Backend, class _ExecutionPolicy> |
| 113 | struct __find_first_of; |
| 114 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
| 115 | // optional<_ForwardIterator1> |
| 116 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 117 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Predicate __pred) const noexcept; |
| 118 | |
| 119 | template <class _Backend, class _ExecutionPolicy> |
| 120 | struct __find_end; |
| 121 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
| 122 | // optional<_ForwardIterator1> |
| 123 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 124 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Predicate __pred) const noexcept; |
| 125 | |
| 126 | template <class _Backend, class _ExecutionPolicy> |
| 127 | struct __for_each; |
| 128 | // template <class _Policy, class _ForwardIterator, class _Function> |
| 129 | // optional<__empty> |
| 130 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Function __func) const noexcept; |
| 131 | |
| 132 | template <class _Backend, class _ExecutionPolicy> |
| 133 | struct __for_each_n; |
| 134 | // template <class _Policy, class _ForwardIterator, class _Size, class _Function> |
| 135 | // optional<__empty> |
| 136 | // operator()(_Policy&&, _ForwardIterator __first, _Size __size, _Function __func) const noexcept; |
| 137 | |
| 138 | template <class _Backend, class _ExecutionPolicy> |
| 139 | struct __fill; |
| 140 | // template <class _Policy, class _ForwardIterator, class _Tp> |
| 141 | // optional<__empty> |
| 142 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Tp const& __value) const noexcept; |
| 143 | |
| 144 | template <class _Backend, class _ExecutionPolicy> |
| 145 | struct __fill_n; |
| 146 | // template <class _Policy, class _ForwardIterator, class _Size, class _Tp> |
| 147 | // optional<__empty> |
| 148 | // operator()(_Policy&&, _ForwardIterator __first, _Size __n, _Tp const& __value) const noexcept; |
| 149 | |
| 150 | template <class _Backend, class _ExecutionPolicy> |
| 151 | struct __search; |
| 152 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
| 153 | // optional<_ForwardIterator1> |
| 154 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 155 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) const noexcept; |
| 156 | |
| 157 | template <class _Backend, class _ExecutionPolicy> |
| 158 | struct __replace; |
| 159 | // template <class _Policy, class _ForwardIterator, class _Tp> |
| 160 | // optional<__empty> |
| 161 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 162 | // _Tp const& __old, _Tp const& __new) const noexcept; |
| 163 | |
| 164 | template <class _Backend, class _ExecutionPolicy> |
| 165 | struct __replace_if; |
| 166 | // template <class _Policy, class _ForwardIterator, class _Predicate, class _Tp> |
| 167 | // optional<__empty> |
| 168 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 169 | // _Predicate __pred, _Tp const& __new_value) const noexcept; |
| 170 | |
| 171 | template <class _Backend, class _ExecutionPolicy> |
| 172 | struct __generate; |
| 173 | // template <class _Policy, class _ForwardIterator, class _Generator> |
| 174 | // optional<__empty> |
| 175 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Generator __gen) const noexcept; |
| 176 | |
| 177 | template <class _Backend, class _ExecutionPolicy> |
| 178 | struct __generate_n; |
| 179 | // template <class _Policy, class _ForwardIterator, class _Size, class _Generator> |
| 180 | // optional<__empty> |
| 181 | // operator()(_Policy&&, _ForwardIterator __first, _Size __n, _Generator __gen) const noexcept; |
| 182 | |
| 183 | template <class _Backend, class _ExecutionPolicy> |
| 184 | struct __reverse; |
| 185 | // template <class _Policy, class _BidirectionalIterator> |
| 186 | // optional<__empty> |
| 187 | // operator()(_Policy&&, _BidirectionalIterator __first, _BidirectionalIterator __last) const noexcept; |
| 188 | |
| 189 | template <class _Backend, class _ExecutionPolicy> |
| 190 | struct __reverse_copy; |
| 191 | // template <class _Policy, class _BidirectionalIterator, class _ForwardIterator> |
| 192 | // optional<_ForwardIterator> |
| 193 | // operator()(_Policy&&, _BidirectionalIterator __first, _BidirectionalIterator __last, |
| 194 | // _ForwardIterator __result) const noexcept; |
| 195 | |
| 196 | template <class _Backend, class _ExecutionPolicy> |
| 197 | struct __merge; |
| 198 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardOutIterator, class _Comp> |
| 199 | // optional<_ForwardOutIterator> |
| 200 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 201 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, |
| 202 | // _ForwardOutIterator __result, _Comp __comp) const noexcept; |
| 203 | |
| 204 | template <class _Backend, class _ExecutionPolicy> |
| 205 | struct __max_element; |
| 206 | // template <class _Policy, class _ForwardIterator, class _Compare> |
| 207 | // optional<_ForwardIterator> |
| 208 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp) const noexcept; |
| 209 | |
| 210 | template <class _Backend, class _ExecutionPolicy> |
| 211 | struct __min_element; |
| 212 | // template <class _Policy, class _ForwardIterator, class _Compare> |
| 213 | // optional<_ForwardIterator> |
| 214 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp) const noexcept; |
| 215 | |
| 216 | template <class _Backend, class _ExecutionPolicy> |
| 217 | struct __minmax_element; |
| 218 | // template <class _Policy, class _ForwardIterator, class _Compare> |
| 219 | // optional<pair<_ForwardIterator, _ForwardIterator>> |
| 220 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp) const noexcept; |
| 221 | |
| 222 | template <class _Backend, class _ExecutionPolicy> |
| 223 | struct __search_n; |
| 224 | // template <class _Policy, class _ForwardIterator, class _Size, class _T, class _Predicate> |
| 225 | // optional<_ForwardIterator> |
| 226 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 227 | // _Size __count, const _T& __value, _Predicate __pred) const noexcept; |
| 228 | |
| 229 | template <class _Backend, class _ExecutionPolicy> |
| 230 | struct __stable_sort; |
| 231 | // template <class _Policy, class _RandomAccessIterator, class _Comp> |
| 232 | // optional<__empty> |
| 233 | // operator()(_Policy&&, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) const noexcept; |
| 234 | |
| 235 | template <class _Backend, class _ExecutionPolicy> |
| 236 | struct __sort; |
| 237 | // template <class _Policy, class _RandomAccessIterator, class _Comp> |
| 238 | // optional<__empty> |
| 239 | // operator()(_Policy&&, _RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) const noexcept; |
| 240 | |
| 241 | template <class _Backend, class _ExecutionPolicy> |
| 242 | struct __transform; |
| 243 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator, class _UnaryOperation> |
| 244 | // optional<_ForwardOutIterator> |
| 245 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 246 | // _ForwardOutIterator __result, |
| 247 | // _UnaryOperation __op) const noexcept; |
| 248 | |
| 249 | template <class _Backend, class _ExecutionPolicy> |
| 250 | struct __transform_binary; |
| 251 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, |
| 252 | // class _ForwardOutIterator, |
| 253 | // class _BinaryOperation> |
| 254 | // optional<_ForwardOutIterator> |
| 255 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 256 | // _ForwardIterator2 __first2, |
| 257 | // _ForwardOutIterator __result, |
| 258 | // _BinaryOperation __op) const noexcept; |
| 259 | |
| 260 | template <class _Backend, class _ExecutionPolicy> |
| 261 | struct __replace_copy_if; |
| 262 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator, class _Predicate, class _Tp> |
| 263 | // optional<__empty> |
| 264 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 265 | // _ForwardOutIterator __out_it, |
| 266 | // _Predicate __pred, |
| 267 | // _Tp const& __new_value) const noexcept; |
| 268 | |
| 269 | template <class _Backend, class _ExecutionPolicy> |
| 270 | struct __replace_copy; |
| 271 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator, class _Tp> |
| 272 | // optional<__empty> |
| 273 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 274 | // _ForwardOutIterator __out_it, |
| 275 | // _Tp const& __old_value, |
| 276 | // _Tp const& __new_value) const noexcept; |
| 277 | |
| 278 | template <class _Backend, class _ExecutionPolicy> |
| 279 | struct __move; |
| 280 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator> |
| 281 | // optional<_ForwardOutIterator> |
| 282 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 283 | // _ForwardOutIterator __out_it) const noexcept; |
| 284 | |
| 285 | template <class _Backend, class _ExecutionPolicy> |
| 286 | struct __copy; |
| 287 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator> |
| 288 | // optional<_ForwardOutIterator> |
| 289 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 290 | // _ForwardOutIterator __out_it) const noexcept; |
| 291 | |
| 292 | template <class _Backend, class _ExecutionPolicy> |
| 293 | struct __copy_n; |
| 294 | // template <class _Policy, class _ForwardIterator, class _Size, class _ForwardOutIterator> |
| 295 | // optional<_ForwardOutIterator> |
| 296 | // operator()(_Policy&&, _ForwardIterator __first, _Size __n, _ForwardOutIterator __out_it) const noexcept; |
| 297 | |
| 298 | template <class _Backend, class _ExecutionPolicy> |
| 299 | struct __rotate_copy; |
| 300 | // template <class _Policy, class _ForwardIterator, class _ForwardOutIterator> |
| 301 | // optional<_ForwardOutIterator> |
| 302 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, |
| 303 | // _ForwardOutIterator __out_it) const noexcept; |
| 304 | |
| 305 | template <class _Backend, class _ExecutionPolicy> |
| 306 | struct __transform_reduce; |
| 307 | // template <class _Policy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation> |
| 308 | // optional<_Tp> |
| 309 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 310 | // _Tp __init, |
| 311 | // _BinaryOperation __reduce, |
| 312 | // _UnaryOperation __transform) const noexcept; |
| 313 | |
| 314 | template <class _Backend, class _ExecutionPolicy> |
| 315 | struct __transform_reduce_binary; |
| 316 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, |
| 317 | // class _Tp, class _BinaryOperation1, class _BinaryOperation2> |
| 318 | // optional<_Tp> operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 319 | // _ForwardIterator2 __first2, |
| 320 | // _Tp __init, |
| 321 | // _BinaryOperation1 __reduce, |
| 322 | // _BinaryOperation2 __transform) const noexcept; |
| 323 | |
| 324 | template <class _Backend, class _ExecutionPolicy> |
| 325 | struct __count_if; |
| 326 | // template <class _Policy, class _ForwardIterator, class _Predicate> |
| 327 | // optional<__iter_diff_t<_ForwardIterator>> |
| 328 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) const noexcept; |
| 329 | |
| 330 | template <class _Backend, class _ExecutionPolicy> |
| 331 | struct __count; |
| 332 | // template <class _Policy, class _ForwardIterator, class _Tp> |
| 333 | // optional<__iter_diff_t<_ForwardIterator>> |
| 334 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, _Tp const& __value) const noexcept; |
| 335 | |
| 336 | template <class _Backend, class _ExecutionPolicy> |
| 337 | struct __equal_3leg; |
| 338 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
| 339 | // optional<bool> |
| 340 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 341 | // _ForwardIterator2 __first2, |
| 342 | // _Predicate __pred) const noexcept; |
| 343 | |
| 344 | template <class _Backend, class _ExecutionPolicy> |
| 345 | struct __equal; |
| 346 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
| 347 | // optional<bool> |
| 348 | // operator()(_Policy&&, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 349 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, |
| 350 | // _Predicate __pred) const noexcept; |
| 351 | |
| 352 | template <class _Backend, class _ExecutionPolicy> |
| 353 | struct __reduce; |
| 354 | // template <class _Policy, class _ForwardIterator, class _Tp, class _BinaryOperation> |
| 355 | // optional<_Tp> |
| 356 | // operator()(_Policy&&, _ForwardIterator __first, _ForwardIterator __last, |
| 357 | // _Tp __init, _BinaryOperation __op) const noexcept; |
| 358 | |
| 359 | template <class _Backend, class _ExecutionPolicy> |
| 360 | struct __is_heap; |
| 361 | // template <class _Policy, class _RandomAccessIterator, class _Comp> |
| 362 | // optional<bool> |
| 363 | // operator()(_Policy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last, |
| 364 | // _Comp __comp) const noexcept; |
| 365 | |
| 366 | template <class _Backend, class _ExecutionPolicy> |
| 367 | struct __is_heap_until; |
| 368 | // template <class _Policy, class _RandomAccessIterator, class _Comp> |
| 369 | // optional<_RandomAccessIterator> |
| 370 | // operator()(_Policy&& __policy, _RandomAccessIterator __first, _RandomAccessIterator __last, |
| 371 | // _Comp __comp) const noexcept; |
| 372 | |
| 373 | template <class _Backend, class _ExecutionPolicy> |
| 374 | struct __is_sorted; |
| 375 | // template <class _Policy, class _ForwardIterator, class _Comp> |
| 376 | // optional<bool> |
| 377 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Comp&& __comp) const noexcept; |
| 378 | |
| 379 | template <class _Backend, class _ExecutionPolicy> |
| 380 | struct __is_sorted_until; |
| 381 | // template <class _Policy, class _ForwardIterator, class _Comp> |
| 382 | // optional<_ForwardIterator> |
| 383 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last, _Comp&& __comp) const noexcept; |
| 384 | |
| 385 | template <class _Backend, class _ExecutionPolicy> |
| 386 | struct __adjacent_difference; |
| 387 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryOperation> |
| 388 | // optional<_ForwardIterator2> |
| 389 | // operator()(_Policy&& __policy, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 390 | // _ForwardIterator2 __first2, _BinaryOperation &&__op) const noexcept; |
| 391 | |
| 392 | template <class _Backend, class _ExecutionPolicy> |
| 393 | struct __mismatch; |
| 394 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Comp> |
| 395 | // optional<pair<_ForwardIterator1, _ForwardIterator2>> |
| 396 | // operator()(_Policy&& __policy, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 397 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, |
| 398 | // _Comp __comp) const noexcept; |
| 399 | |
| 400 | template <class _Backend, class _ExecutionPolicy> |
| 401 | struct __mismatch_3leg; |
| 402 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Comp> |
| 403 | // optional<pair<_ForwardIterator1, _ForwardIterator2>> |
| 404 | // operator()(_Policy&& __policy, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 405 | // _ForwardIterator2 __first2, _Comp __comp) const noexcept; |
| 406 | |
| 407 | template <class _Backend, class _ExecutionPolicy> |
| 408 | struct __adjacent_find; |
| 409 | // template <class _Policy, class _ForwardIterator, class _BinaryPredicate> |
| 410 | // optional<_ForwardIterator> |
| 411 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last, |
| 412 | // _BinaryPredicate __predicate) const noexcept; |
| 413 | |
| 414 | template <class _Backend, class _ExecutionPolicy> |
| 415 | struct __lexicographical_compare; |
| 416 | // template <class _Policy, class _ForwardIterator1, class _ForwardIterator2, class _Comp> |
| 417 | // optional<bool> |
| 418 | // operator()(_Policy&& __policy, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
| 419 | // _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Comp __comp) const noexcept; |
| 420 | |
| 421 | template <class _Backend, class _ExecutionPolicy> |
| 422 | struct __destroy; |
| 423 | // template <class _Policy, class _ForwardIterator> |
| 424 | // optional<__empty> |
| 425 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last) const noexcept; |
| 426 | |
| 427 | template <class _Backend, class _ExecutionPolicy> |
| 428 | struct __destroy_n; |
| 429 | // template <class _Policy, class _ForwardIterator, class _Size> |
| 430 | // optional<__empty> |
| 431 | // operator()(_Policy&& __policy, _ForwardIterator __first, _Size __n) const noexcept; |
| 432 | |
| 433 | template <class _Backend, class _ExecutionPolicy> |
| 434 | struct __uninitialized_copy; |
| 435 | // template <class _Policy, class _InputIterator, class _ForwardIterator> |
| 436 | // optional<_ForwardIterator> |
| 437 | // operator()(_Policy&& __policy, _InputIterator __first, _InputIterator __last, _ForwardIterator __result) const |
| 438 | // noexcept; |
| 439 | |
| 440 | template <class _Backend, class _ExecutionPolicy> |
| 441 | struct __uninitialized_copy_n; |
| 442 | // template <class _Policy, class _InputIterator, class _Size, class _ForwardIterator> |
| 443 | // optional<_ForwardIterator> |
| 444 | // operator()(_Policy&& __policy, _InputIterator __first, _Size __n, _ForwardIterator __result) const |
| 445 | // noexcept; |
| 446 | |
| 447 | template <class _Backend, class _ExecutionPolicy> |
| 448 | struct __uninitialized_default_construct; |
| 449 | // template <class _Policy, class _ForwardIterator> |
| 450 | // optional<__empty> |
| 451 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last) const noexcept; |
| 452 | |
| 453 | template <class _Backend, class _ExecutionPolicy> |
| 454 | struct __uninitialized_default_construct_n; |
| 455 | // template <class _Policy, class _ForwardIterator, class _Size> |
| 456 | // optional<__empty> |
| 457 | // operator()(_Policy&& __policy, _ForwardIterator __first, _Size __n) const noexcept; |
| 458 | |
| 459 | template <class _Backend, class _ExecutionPolicy> |
| 460 | struct __uninitialized_move; |
| 461 | // template <class _Policy, class _InputIterator, class _ForwardIterator> |
| 462 | // optional<_ForwardIterator> |
| 463 | // operator()(_Policy&& __policy, _InputIterator __first, _InputIterator __last, _ForwardIterator __result) const |
| 464 | // noexcept; |
| 465 | |
| 466 | template <class _Backend, class _ExecutionPolicy> |
| 467 | struct __uninitialized_move_n; |
| 468 | // template <class _Policy, class _InputIterator, class _Size, class _ForwardIterator> |
| 469 | // optional<pair<_InputIterator, _ForwardIterator>> |
| 470 | // operator()(_Policy&& __policy, _InputIterator __first, _Size __n, _ForwardIterator __result) const |
| 471 | // noexcept; |
| 472 | |
| 473 | template <class _Backend, class _ExecutionPolicy> |
| 474 | struct __uninitialized_value_construct; |
| 475 | // template <class _Policy, class _ForwardIterator> |
| 476 | // optional<__empty> |
| 477 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last) const noexcept; |
| 478 | |
| 479 | template <class _Backend, class _ExecutionPolicy> |
| 480 | struct __uninitialized_value_construct_n; |
| 481 | // template <class _Policy, class _ForwardIterator, class _Size> |
| 482 | // optional<__empty> |
| 483 | // operator()(_Policy&& __policy, _ForwardIterator __first, _Size __n) const noexcept; |
| 484 | |
| 485 | template <class _Backend, class _ExecutionPolicy> |
| 486 | struct __uninitialized_fill; |
| 487 | // template <class _Policy, class _ForwardIterator, class _Tp> |
| 488 | // optional<__empty> |
| 489 | // operator()(_Policy&& __policy, _ForwardIterator __first, _ForwardIterator __last, const _Tp &__value) const noexcept; |
| 490 | |
| 491 | template <class _Backend, class _ExecutionPolicy> |
| 492 | struct __uninitialized_fill_n; |
| 493 | // template <class _Policy, class _ForwardIterator, class _Size, class _Tp> |
| 494 | // optional<__empty> |
| 495 | // operator()(_Policy&& __policy, _ForwardIterator __first, _Size __n, const _Tp &__value) const noexcept; |
| 496 | |
| 497 | } // namespace __pstl |
| 498 | _LIBCPP_END_NAMESPACE_STD |
| 499 | |
| 500 | #endif // _LIBCPP_STD_VER >= 17 |
| 501 | |
| 502 | _LIBCPP_POP_MACROS |
| 503 | |
| 504 | #endif // _LIBCPP___PSTL_BACKEND_FWD_H |
| 505 | |