[libcxx-commits] [pstl] r357189 - [pstl] Introduce forward declarations
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 28 10:22:19 PDT 2019
Author: ldionne
Date: Thu Mar 28 10:22:19 2019
New Revision: 357189
URL: http://llvm.org/viewvc/llvm-project?rev=357189&view=rev
Log:
[pstl] Introduce forward declarations
Necessary when pstl is included from with <algorithm> and <numeric> to
prevent a partially declared standard library when pstl itself uses
algorithms from <algorithm> and <numeric>.
Also, this patch makes sure that configuration comes via standard headers.
Directly including pstl_config.h in implementation files is incompatible
with inclusion of pstl into a standard library implementation which
provides it's own library wide configuration and may configure the
library differently to the pstl_config.h used by the standalone
implementation.
Differential Revision: https://reviews.llvm.org/D59122
Added:
pstl/trunk/include/pstl/internal/algorithm_fwd.h
pstl/trunk/include/pstl/internal/numeric_fwd.h
Modified:
pstl/trunk/include/pstl/internal/glue_algorithm_impl.h
pstl/trunk/include/pstl/internal/glue_execution_defs.h
pstl/trunk/include/pstl/internal/glue_memory_impl.h
pstl/trunk/include/pstl/internal/glue_numeric_impl.h
pstl/trunk/include/pstl/internal/numeric_impl.h
pstl/trunk/include/pstl/internal/unseq_backend_simd.h
pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp
pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp
Added: pstl/trunk/include/pstl/internal/algorithm_fwd.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/algorithm_fwd.h?rev=357189&view=auto
==============================================================================
--- pstl/trunk/include/pstl/internal/algorithm_fwd.h (added)
+++ pstl/trunk/include/pstl/internal/algorithm_fwd.h Thu Mar 28 10:22:19 2019
@@ -0,0 +1,1219 @@
+// -*- C++ -*-
+//===-- algorithm_fwd.h --------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __PSTL_algorithm_fwd_H
+#define __PSTL_algorithm_fwd_H
+
+#include <type_traits>
+#include <utility>
+
+namespace __pstl
+{
+namespace internal
+{
+
+//------------------------------------------------------------------------
+// any_of
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Pred>
+bool
+brick_any_of(const _ForwardIterator, const _ForwardIterator, _Pred,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _Pred>
+bool
+brick_any_of(const _ForwardIterator, const _ForwardIterator, _Pred,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Pred, class _IsVector>
+bool pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Pred, class _IsVector>
+bool pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector,
+ /*parallel=*/std::true_type);
+#endif
+
+
+#if 0
+ // TODO does this even need forwarding?
+template <class _ForwardIterator, class _Size, class _Function>
+_ForwardIterator for_each_n_it_serial(_ForwardIterator, _Size, _Function);
+#endif
+
+//------------------------------------------------------------------------
+// walk1 (pseudo)
+//
+// walk1 evaluates f(x) for each dereferenced value x drawn from [first,last)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Function>
+void brick_walk1(_ForwardIterator, _ForwardIterator, _Function,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _Function>
+void brick_walk1(_RandomAccessIterator, _RandomAccessIterator, _Function,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Function, class _IsVector>
+void pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Function, class _IsVector>
+void pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector,
+ /*parallel=*/std::true_type);
+#endif
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
+void pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
+void pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick,
+ /*parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// walk1_n
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Size, class _Function>
+_ForwardIterator brick_walk1_n(_ForwardIterator, _Size, _Function,
+ /*_IsVectorTag=*/std::false_type);
+
+template <class _RandomAccessIterator, class _DifferenceType, class _Function>
+_RandomAccessIterator brick_walk1_n(_RandomAccessIterator, _DifferenceType, _Function,
+ /*vectorTag=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Function, class _IsVector>
+_ForwardIterator pattern_walk1_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Function, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy,class _RandomAccessIterator, class _Size, class _Function, class _IsVector>
+_RandomAccessIterator pattern_walk1_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Function, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Brick>
+_ForwardIterator pattern_walk_brick_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Brick,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Brick>
+_RandomAccessIterator pattern_walk_brick_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Brick,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// walk2 (pseudo)
+//
+// walk2 evaluates f(x,y) for deferenced values (x,y) drawn from [first1,last1) and [first2,...)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Function>
+_ForwardIterator2 brick_walk2(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Function>
+_ForwardIterator2 brick_walk2(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function>
+_ForwardIterator2 brick_walk2_n(_ForwardIterator1, _Size, _ForwardIterator2, _Function,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function>
+_ForwardIterator2 brick_walk2_n(_ForwardIterator1, _Size, _ForwardIterator2, _Function,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Function, class _IsVector>
+_ForwardIterator2 pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Function, class _IsVector>
+_ForwardIterator2 pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector,
+ /*parallel=*/std::true_type);
+#endif
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function, class _IsVector>
+_ForwardIterator2 pattern_walk2_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Function, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _Size, class _RandomAccessIterator2, class _Function, class _IsVector>
+_RandomAccessIterator2 pattern_walk2_n(_ExecutionPolicy&&, _RandomAccessIterator1, _Size, _RandomAccessIterator2, _Function, _IsVector,
+ /*parallel=*/std::true_type);
+#endif
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Brick>
+_ForwardIterator2 pattern_walk2_brick(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Brick,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Brick>
+_RandomAccessIterator2 pattern_walk2_brick(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
+ _Brick,
+ /*parallel=*/std::true_type);
+#endif
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Brick>
+_ForwardIterator2 pattern_walk2_brick_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Brick,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _Size, class _RandomAccessIterator2, class _Brick>
+_RandomAccessIterator2 pattern_walk2_brick_n(_ExecutionPolicy&&, _RandomAccessIterator1, _Size, _RandomAccessIterator2, _Brick,
+ /*parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// walk3 (pseudo)
+//
+// walk3 evaluates f(x,y,z) for (x,y,z) drawn from [first1,last1), [first2,...), [first3,...)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator3, class _Function>
+_ForwardIterator3 brick_walk3(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator3, _Function,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator1, class _RandomAccessIterator2, class _RandomAccessIterator3, class _Function>
+_RandomAccessIterator3 brick_walk3(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
+ _RandomAccessIterator3, _Function,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator3, class _Function, class _IsVector>
+_ForwardIterator3 pattern_walk3(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator3, _Function,
+ _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _RandomAccessIterator3, class _Function,
+ class _IsVector>
+_RandomAccessIterator3 pattern_walk3(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
+ _RandomAccessIterator3, _Function, _IsVector, /*parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// equal
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+bool brick_equal(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate,
+ /* IsVector = */ std::false_type) noexcept;
+
+template <class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate>
+bool brick_equal(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _BinaryPredicate,
+ /* is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+bool pattern_equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate, _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate, class _IsVector>
+bool pattern_equal(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// find_if
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Predicate>
+_ForwardIterator brick_find_if(_ForwardIterator, _ForwardIterator, _Predicate,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _Predicate>
+_RandomAccessIterator brick_find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
+_ForwardIterator pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
+_ForwardIterator pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// find_end
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_find_end(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_find_end(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_find_end(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_find_end(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// find_first_of
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_find_first_of(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_find_first_of(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector, /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// search
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
+_ForwardIterator1 brick_search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate, class _IsVector>
+_ForwardIterator1 pattern_search(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// search_n
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
+_ForwardIterator
+brick_search_n(_ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
+_ForwardIterator
+brick_search_n(_ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate, class IsVector>
+_ForwardIterator
+pattern_search_n(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Size, const _Tp&, _BinaryPredicate, IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Tp, class _BinaryPredicate, class IsVector>
+_RandomAccessIterator
+pattern_search_n(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Size, const _Tp&, _BinaryPredicate, IsVector,
+ /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// copy_n
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Size, class _OutputIterator>
+_OutputIterator brick_copy_n(_ForwardIterator, _Size, _OutputIterator,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _Size, class _OutputIterator>
+_OutputIterator brick_copy_n(_ForwardIterator, _Size, _OutputIterator,
+ /*vector=*/std::true_type) noexcept;
+
+//------------------------------------------------------------------------
+// copy
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_copy(_ForwardIterator, _ForwardIterator, _OutputIterator,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _OutputIterator>
+_OutputIterator brick_copy(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator,
+ /*vector=*/std::true_type) noexcept;
+
+//------------------------------------------------------------------------
+// move
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_move(_ForwardIterator, _ForwardIterator, _OutputIterator,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _OutputIterator>
+_OutputIterator brick_move(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator,
+ /*vector=*/std::true_type) noexcept;
+
+//------------------------------------------------------------------------
+// swap_ranges
+//------------------------------------------------------------------------
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_swap_ranges(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_swap_ranges(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result,
+ /*vector=*/std::true_type) noexcept;
+
+//------------------------------------------------------------------------
+// copy_if
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator, class _UnaryPredicate>
+_OutputIterator brick_copy_if(_ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator, class _UnaryPredicate>
+_OutputIterator brick_copy_if(_ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _DifferenceType, class _ForwardIterator, class _UnaryPredicate>
+std::pair<_DifferenceType, _DifferenceType>
+brick_calc_mask_1(_ForwardIterator, _ForwardIterator, bool* __restrict, _UnaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+template <class _DifferenceType, class _RandomAccessIterator, class _UnaryPredicate>
+std::pair<_DifferenceType, _DifferenceType>
+brick_calc_mask_1(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _UnaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator>
+void
+brick_copy_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator, bool*,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator>
+void
+brick_copy_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator, bool* __restrict,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2>
+void
+brick_partition_by_mask(_ForwardIterator, _ForwardIterator, _OutputIterator1, _OutputIterator2, bool*,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _OutputIterator1, class _OutputIterator2>
+void
+brick_partition_by_mask(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator1, _OutputIterator2, bool*,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _UnaryPredicate, class _IsVector>
+_OutputIterator pattern_copy_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _UnaryPredicate, class _IsVector>
+_OutputIterator pattern_copy_if(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _OutputIterator, _UnaryPredicate,
+ _IsVector, /*parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// count
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Predicate>
+typename std::iterator_traits<_ForwardIterator>::difference_type
+brick_count(_ForwardIterator, _ForwardIterator, _Predicate,
+ /* is_vector = */ std::true_type) noexcept;
+
+template <class _ForwardIterator, class _Predicate>
+typename std::iterator_traits<_ForwardIterator>::difference_type
+brick_count(_ForwardIterator, _ForwardIterator, _Predicate,
+ /* is_vector = */ std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
+typename std::iterator_traits<_ForwardIterator>::difference_type
+pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate,
+ /* is_parallel */ std::false_type, _IsVector) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
+typename std::iterator_traits<_ForwardIterator>::difference_type
+pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate,
+ /* is_parallel */ std::true_type, _IsVector);
+#endif
+
+//------------------------------------------------------------------------
+// unique
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _BinaryPredicate>
+_ForwardIterator brick_unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _BinaryPredicate>
+_ForwardIterator brick_unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
+_ForwardIterator pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
+_ForwardIterator pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// unique_copy
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class OutputIterator, class _BinaryPredicate>
+OutputIterator brick_unique_copy(_ForwardIterator, _ForwardIterator, OutputIterator, _BinaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _OutputIterator, class _BinaryPredicate>
+_OutputIterator brick_unique_copy(_RandomAccessIterator, _RandomAccessIterator, _OutputIterator, _BinaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class OutputIterator, class _BinaryPredicate, class _IsVector>
+OutputIterator pattern_unique_copy(_ForwardIterator, _ForwardIterator, OutputIterator, _BinaryPredicate, _IsVector,
+ /*parallel=*/std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _DifferenceType, class _RandomAccessIterator, class _BinaryPredicate>
+_DifferenceType
+brick_calc_mask_2(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _BinaryPredicate,
+ /*vector=*/std::false_type) noexcept;
+
+template <class _DifferenceType, class _RandomAccessIterator, class _BinaryPredicate>
+_DifferenceType
+brick_calc_mask_2(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _BinaryPredicate,
+ /*vector=*/std::true_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _BinaryPredicate, class _IsVector>
+_OutputIterator pattern_unique_copy(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _OutputIterator, _BinaryPredicate,
+ _IsVector, /*parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// reverse
+//------------------------------------------------------------------------
+
+template <class _BidirectionalIterator>
+void brick_reverse(_BidirectionalIterator, _BidirectionalIterator,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _BidirectionalIterator>
+void brick_reverse(_BidirectionalIterator, _BidirectionalIterator,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _BidirectionalIterator>
+void brick_reverse(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _BidirectionalIterator>
+void brick_reverse(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _IsVector>
+void pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _IsVector>
+void pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// reverse_copy
+//------------------------------------------------------------------------
+
+template <class _BidirectionalIterator, class _OutputIterator>
+_OutputIterator brick_reverse_copy(_BidirectionalIterator, _BidirectionalIterator, _OutputIterator,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _BidirectionalIterator, class _OutputIterator>
+_OutputIterator brick_reverse_copy(_BidirectionalIterator, _BidirectionalIterator, _OutputIterator,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _OutputIterator, class _IsVector>
+_OutputIterator pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _OutputIterator, class _IsVector>
+_OutputIterator pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// rotate
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator>
+_ForwardIterator brick_rotate(_ForwardIterator, _ForwardIterator, _ForwardIterator,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator>
+_ForwardIterator brick_rotate(_ForwardIterator, _ForwardIterator, _ForwardIterator,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _IsVector>
+_ForwardIterator pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _IsVector>
+_ForwardIterator pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// rotate_copy
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator>
+_OutputIterator brick_rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _IsVector>
+_OutputIterator pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _IsVector>
+_OutputIterator pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// is_partitioned
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _UnaryPredicate>
+bool brick_is_partitioned(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _UnaryPredicate>
+bool brick_is_partitioned(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+bool pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+bool pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// partition
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _UnaryPredicate>
+_ForwardIterator brick_partition(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _UnaryPredicate>
+_ForwardIterator brick_partition(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+_ForwardIterator pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+_ForwardIterator pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// stable_partition
+//------------------------------------------------------------------------
+
+template <class _BidirectionalIterator, class _UnaryPredicate>
+_BidirectionalIterator brick_stable_partition(_BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _BidirectionalIterator, class _UnaryPredicate>
+_BidirectionalIterator brick_stable_partition(_BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate, class _IsVector>
+_BidirectionalIterator pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
+ _IsVector,
+ /*is_parallelization=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate, class _IsVector>
+_BidirectionalIterator pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate,
+ _IsVector,
+ /*is_parallelization=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// partition_copy
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate>
+std::pair<_OutputIterator1, _OutputIterator2> brick_partition_copy(_ForwardIterator, _ForwardIterator, _OutputIterator1,
+ _OutputIterator2, _UnaryPredicate,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate>
+std::pair<_OutputIterator1, _OutputIterator2> brick_partition_copy(_ForwardIterator, _ForwardIterator, _OutputIterator1,
+ _OutputIterator2, _UnaryPredicate,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate,
+ class _IsVector>
+std::pair<_OutputIterator1, _OutputIterator2>
+pattern_partition_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator,
+ _OutputIterator1, _OutputIterator2,
+ _UnaryPredicate, _IsVector,
+ /*is_parallelization=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator1, class _OutputIterator2, class _UnaryPredicate,
+ class _IsVector>
+std::pair<_OutputIterator1, _OutputIterator2>
+pattern_partition_copy(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator,
+ _OutputIterator1, _OutputIterator2,
+ _UnaryPredicate, _IsVector,
+ /*is_parallelization=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// sort
+//------------------------------------------------------------------------
+
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector, class _IsMoveConstructible>
+void pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
+ /*is_parallel=*/std::false_type, _IsMoveConstructible) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
+ /*is_parallel=*/std::true_type,
+ /*is_move_constructible=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// stable_sort
+//------------------------------------------------------------------------
+
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// partial_sort
+//------------------------------------------------------------------------
+
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// partial_sort_copy
+//------------------------------------------------------------------------
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare, class _IsVector>
+_RandomAccessIterator pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _RandomAccessIterator,
+ _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare, class _IsVector>
+_RandomAccessIterator pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _RandomAccessIterator,
+ _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// adjacent_find
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _BinaryPredicate>
+_ForwardIterator
+brick_adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
+ /* IsVector = */ std::true_type, bool) noexcept;
+
+template <class _ForwardIterator, class _BinaryPredicate>
+_ForwardIterator
+brick_adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate,
+ /* IsVector = */ std::false_type, bool) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
+_ForwardIterator
+pattern_adjacent_find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate,
+ /* is_parallel */ std::false_type, _IsVector, bool) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _BinaryPredicate, class _IsVector>
+_RandomAccessIterator
+pattern_adjacent_find(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _BinaryPredicate,
+ /* is_parallel */ std::true_type, _IsVector, bool);
+#endif
+
+//------------------------------------------------------------------------
+// nth_element
+//------------------------------------------------------------------------
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+void pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// fill, fill_n
+//------------------------------------------------------------------------
+template <class _ForwardIterator, class _Tp>
+void
+brick_fill(_ForwardIterator, _ForwardIterator, const _Tp&,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ForwardIterator, class _Tp>
+void
+brick_fill(_ForwardIterator, _ForwardIterator, const _Tp&,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _IsVector>
+void
+pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&,
+ /*is_parallel=*/std::false_type, _IsVector) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _IsVector>
+_ForwardIterator
+pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&,
+ /*is_parallel=*/std::true_type, _IsVector);
+#endif
+
+template <class _OutputIterator, class _Size, class _Tp>
+_OutputIterator
+brick_fill_n(_OutputIterator, _Size, const _Tp&,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _OutputIterator, class _Size, class _Tp>
+_OutputIterator
+brick_fill_n(_OutputIterator, _Size, const _Tp&,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _OutputIterator, class _Size, class _Tp, class _IsVector>
+_OutputIterator
+pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&,
+ /*is_parallel=*/std::false_type, _IsVector) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _OutputIterator, class _Size, class _Tp, class _IsVector>
+_OutputIterator
+pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&,
+ /*is_parallel=*/std::true_type, _IsVector);
+#endif
+
+//------------------------------------------------------------------------
+// generate, generate_n
+//------------------------------------------------------------------------
+
+template <class _RandomAccessIterator, class _Generator>
+void brick_generate(_RandomAccessIterator, _RandomAccessIterator, _Generator,
+ /* is_vector = */ std::true_type) noexcept;
+
+template <class _ForwardIterator, class _Generator>
+void brick_generate(_ForwardIterator, _ForwardIterator, _Generator,
+ /* is_vector = */ std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Generator, class _IsVector>
+void pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator,
+ /*is_parallel=*/std::false_type, _IsVector) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Generator, class _IsVector>
+_ForwardIterator pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator,
+ /*is_parallel=*/std::true_type, _IsVector);
+#endif
+
+template <class OutputIterator, class Size, class _Generator>
+OutputIterator brick_generate_n(OutputIterator, Size, _Generator,
+ /* is_vector = */ std::true_type) noexcept;
+
+template <class OutputIterator, class Size, class _Generator>
+OutputIterator brick_generate_n(OutputIterator, Size, _Generator,
+ /* is_vector = */ std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class OutputIterator, class Size, class _Generator, class _IsVector>
+OutputIterator pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator,
+ /*is_parallel=*/std::false_type, _IsVector) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class OutputIterator, class Size, class _Generator, class _IsVector>
+OutputIterator pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator,
+ /*is_parallel=*/std::true_type, _IsVector);
+#endif
+
+//------------------------------------------------------------------------
+// remove
+//------------------------------------------------------------------------
+template <class _ForwardIterator, class _UnaryPredicate>
+_ForwardIterator brick_remove_if(_ForwardIterator, _ForwardIterator, _UnaryPredicate,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _UnaryPredicate>
+_RandomAccessIterator brick_remove_if(_RandomAccessIterator, _RandomAccessIterator, _UnaryPredicate,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+_ForwardIterator pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel*/ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
+_ForwardIterator pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector,
+ /*is_parallel*/ std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// merge
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_merge(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _OutputIterator,
+ _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_merge(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _OutputIterator,
+ _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _OutputIterator, class _Compare,
+ class _IsVector>
+_OutputIterator pattern_merge(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2,
+ _RandomAccessIterator2, _OutputIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// inplace_merge
+//------------------------------------------------------------------------
+
+template <class _BidirectionalIterator, class _Compare>
+void brick_inplace_merge(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _BidirectionalIterator, class _Compare>
+void brick_inplace_merge(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare, class _IsVector>
+void pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare, class _IsVector>
+void pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// includes
+//------------------------------------------------------------------------
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
+bool pattern_includes(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
+bool pattern_includes(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// set_union
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_union(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_union(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// set_intersection
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_intersection(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_intersection(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_intersection(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_intersection(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// set_difference
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// set_symmetric_difference
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_symmetric_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _OutputIterator, _Compare,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare>
+_OutputIterator brick_set_symmetric_difference(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _OutputIterator, _Compare,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_symmetric_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _OutputIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator, class _Compare, class _IsVector>
+_OutputIterator pattern_set_symmetric_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _OutputIterator, _Compare, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// is_heap_until
+//------------------------------------------------------------------------
+
+template <class _RandomAccessIterator, class _Compare>
+_RandomAccessIterator brick_is_heap_until(_RandomAccessIterator, _RandomAccessIterator, _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _RandomAccessIterator, class _Compare>
+_RandomAccessIterator brick_is_heap_until(_RandomAccessIterator, _RandomAccessIterator, _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+_RandomAccessIterator pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
+_RandomAccessIterator pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// min_element
+//------------------------------------------------------------------------
+
+template <typename _ForwardIterator, typename _Compare>
+_ForwardIterator brick_min_element(_ForwardIterator, _ForwardIterator, _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <typename _ForwardIterator, typename _Compare>
+_ForwardIterator brick_min_element(_ForwardIterator, _ForwardIterator, _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
+_ForwardIterator pattern_min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <typename _ExecutionPolicy, typename _RandomAccessIterator, typename _Compare, typename _IsVector>
+_RandomAccessIterator pattern_min_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector,
+ /* is_parallel = */ std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// minmax_element
+//------------------------------------------------------------------------
+
+template <typename _ForwardIterator, typename _Compare>
+std::pair<_ForwardIterator, _ForwardIterator>
+brick_minmax_element(_ForwardIterator, _ForwardIterator, _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <typename _ForwardIterator, typename _Compare>
+std::pair<_ForwardIterator, _ForwardIterator>
+brick_minmax_element(_ForwardIterator, _ForwardIterator, _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
+std::pair<_ForwardIterator, _ForwardIterator>
+pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare,
+ _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
+std::pair<_ForwardIterator, _ForwardIterator>
+pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare,
+ _IsVector,
+ /* is_parallel = */ std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// mismatch
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
+std::pair<_ForwardIterator1, _ForwardIterator2>
+brick_mismatch(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _Predicate,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
+std::pair<_ForwardIterator1, _ForwardIterator2>
+brick_mismatch(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2,
+ _ForwardIterator2, _Predicate,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate, class _IsVector>
+std::pair<_ForwardIterator1, _ForwardIterator2>
+pattern_mismatch(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Predicate, _IsVector,
+ /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Predicate, class _IsVector>
+std::pair<_RandomAccessIterator1, _RandomAccessIterator2>
+pattern_mismatch(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _RandomAccessIterator2,
+ _Predicate, _IsVector, /* is_parallel = */ std::true_type) noexcept;
+#endif
+
+//------------------------------------------------------------------------
+// lexicographical_compare
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Compare>
+bool brick_lexicographical_compare(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Compare,
+ /* __is_vector = */ std::false_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Compare>
+bool brick_lexicographical_compare(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Compare,
+ /* __is_vector = */ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
+bool pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
+bool pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2,
+ _Compare, _IsVector, /* is_parallel = */ std::true_type) noexcept;
+#endif
+
+} // namespace internal
+} // namespace __pstl
+#endif /* __PSTL_algorithm_fwd_H */
Modified: pstl/trunk/include/pstl/internal/glue_algorithm_impl.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/glue_algorithm_impl.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/glue_algorithm_impl.h (original)
+++ pstl/trunk/include/pstl/internal/glue_algorithm_impl.h Thu Mar 28 10:22:19 2019
@@ -14,8 +14,8 @@
#include "execution_defs.h"
#include "utils.h"
-#include "algorithm_impl.h"
-#include "numeric_impl.h" /* count and count_if use pattern_transform_reduce */
+#include "algorithm_fwd.h"
+#include "numeric_fwd.h" /* count and count_if use __pattern_transform_reduce */
namespace std
{
Modified: pstl/trunk/include/pstl/internal/glue_execution_defs.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/glue_execution_defs.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/glue_execution_defs.h (original)
+++ pstl/trunk/include/pstl/internal/glue_execution_defs.h Thu Mar 28 10:22:19 2019
@@ -49,4 +49,8 @@ using __pstl::execution::unsequenced_pol
} // namespace execution
} // namespace std
+#include "algorithm_impl.h"
+#include "numeric_impl.h"
+#include "parallel_backend.h"
+
#endif /* __PSTL_glue_execution_defs_H */
Modified: pstl/trunk/include/pstl/internal/glue_memory_impl.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/glue_memory_impl.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/glue_memory_impl.h (original)
+++ pstl/trunk/include/pstl/internal/glue_memory_impl.h Thu Mar 28 10:22:19 2019
@@ -11,7 +11,7 @@
#define __PSTL_glue_memory_impl_H
#include "utils.h"
-#include "algorithm_impl.h"
+#include "algorithm_fwd.h"
namespace std
{
Modified: pstl/trunk/include/pstl/internal/glue_numeric_impl.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/glue_numeric_impl.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/glue_numeric_impl.h (original)
+++ pstl/trunk/include/pstl/internal/glue_numeric_impl.h Thu Mar 28 10:22:19 2019
@@ -13,7 +13,7 @@
#include <functional>
#include "utils.h"
-#include "numeric_impl.h"
+#include "numeric_fwd.h"
namespace std
{
Added: pstl/trunk/include/pstl/internal/numeric_fwd.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/numeric_fwd.h?rev=357189&view=auto
==============================================================================
--- pstl/trunk/include/pstl/internal/numeric_fwd.h (added)
+++ pstl/trunk/include/pstl/internal/numeric_fwd.h Thu Mar 28 10:22:19 2019
@@ -0,0 +1,142 @@
+// -*- C++ -*-
+//===-- numeric_fwd.h --------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __PSTL_numeric_fwd_H
+#define __PSTL_numeric_fwd_H
+
+#include <type_traits>
+#include <utility>
+
+namespace __pstl
+{
+namespace internal
+{
+
+//------------------------------------------------------------------------
+// transform_reduce (version with two binary functions, according to draft N4659)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
+_Tp
+brick_transform_reduce(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Tp, _BinaryOperation1,
+ _BinaryOperation2,
+ /*__is_vector=*/std::true_type) noexcept;
+
+template <class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
+_Tp
+brick_transform_reduce(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Tp, _BinaryOperation1,
+ _BinaryOperation2,
+ /*__is_vector=*/std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2,
+ class _IsVector>
+_Tp
+pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Tp, _BinaryOperation1,
+ _BinaryOperation2, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Tp, class _BinaryOperation1,
+ class _BinaryOperation2, class _IsVector>
+_Tp
+pattern_transform_reduce(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _Tp, _BinaryOperation1,
+ _BinaryOperation2, _IsVector __is_vector, /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// transform_reduce (version with unary and binary functions)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _Tp, class _UnaryOperation, class _BinaryOperation>
+_Tp
+brick_transform_reduce(_ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation,
+ /*is_vector=*/std::true_type) noexcept;
+
+template <class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation>
+_Tp
+brick_transform_reduce(_ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation,
+ /*is_vector=*/std::false_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation, class _IsVector>
+_Tp
+pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation, class _IsVector>
+_Tp
+pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector,
+ /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// transform_exclusive_scan
+//
+// walk3 evaluates f(x,y,z) for (x,y,z) drawn from [first1,last1), [first2,...), [first3,...)
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator, class _UnaryOperation, class _Tp, class _BinaryOperation>
+std::pair<_OutputIterator, _Tp> brick_transform_scan(_ForwardIterator, _ForwardIterator, _OutputIterator,
+ _UnaryOperation, _Tp, _BinaryOperation,
+ /*Inclusive*/ std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator, class _UnaryOperation, class _Tp, class _BinaryOperation>
+std::pair<_OutputIterator, _Tp> brick_transform_scan(_ForwardIterator, _ForwardIterator, _OutputIterator,
+ _UnaryOperation, _Tp, _BinaryOperation,
+ /*Inclusive*/ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _UnaryOperation, class _Tp, class _BinaryOperation,
+ class _Inclusive, class _IsVector>
+_OutputIterator pattern_transform_scan(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryOperation, _Tp,
+ _BinaryOperation, _Inclusive, _IsVector,
+ /*is_parallel=*/std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _UnaryOperation, class _Tp,
+ class _BinaryOperation, class _Inclusive, class _IsVector>
+typename std::enable_if<!std::is_floating_point<_Tp>::value, _OutputIterator>::type
+pattern_transform_scan(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator,
+ _OutputIterator, _UnaryOperation, _Tp, _BinaryOperation,
+ _Inclusive, _IsVector, /*is_parallel=*/std::true_type);
+#endif
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _UnaryOperation, class _Tp,
+ class _BinaryOperation, class _Inclusive, class _IsVector>
+typename std::enable_if<std::is_floating_point<_Tp>::value, _OutputIterator>::type
+pattern_transform_scan(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator,
+ _OutputIterator, _UnaryOperation, _Tp, _BinaryOperation,
+ _Inclusive, _IsVector, /*is_parallel=*/std::true_type);
+#endif
+
+//------------------------------------------------------------------------
+// adjacent_difference
+//------------------------------------------------------------------------
+
+template <class _ForwardIterator, class _OutputIterator, class _BinaryOperation>
+_OutputIterator brick_adjacent_difference(_ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryOperation,
+ /*is_vector*/ std::false_type) noexcept;
+
+template <class _ForwardIterator, class _OutputIterator, class _BinaryOperation>
+_OutputIterator brick_adjacent_difference(_ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryOperation,
+ /*is_vector*/ std::true_type) noexcept;
+
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _BinaryOperation, class _IsVector>
+_OutputIterator pattern_adjacent_difference(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryOperation,
+ _IsVector, /*is_parallel*/ std::false_type) noexcept;
+
+#if __PSTL_USE_PAR_POLICIES
+template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _BinaryOperation, class _IsVector>
+_OutputIterator pattern_adjacent_difference(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryOperation,
+ _IsVector, /*is_parallel*/ std::true_type);
+#endif
+
+} // namespace internal
+} // namespace __pstl
+#endif /* __PSTL_numeric_fwd_H */
Modified: pstl/trunk/include/pstl/internal/numeric_impl.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/numeric_impl.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/numeric_impl.h (original)
+++ pstl/trunk/include/pstl/internal/numeric_impl.h Thu Mar 28 10:22:19 2019
@@ -14,9 +14,9 @@
#include <type_traits>
#include <numeric>
-#include "pstl_config.h"
#include "execution_impl.h"
#include "unseq_backend_simd.h"
+#include "algorithm_fwd.h"
#if __PSTL_USE_PAR_POLICIES
#include "parallel_backend.h"
Modified: pstl/trunk/include/pstl/internal/unseq_backend_simd.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/unseq_backend_simd.h?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/unseq_backend_simd.h (original)
+++ pstl/trunk/include/pstl/internal/unseq_backend_simd.h Thu Mar 28 10:22:19 2019
@@ -12,7 +12,6 @@
#include <type_traits>
-#include "pstl_config.h"
#include "utils.h"
// This header defines the minimum set of vector routines required
Modified: pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp (original)
+++ pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp Thu Mar 28 10:22:19 2019
@@ -10,8 +10,8 @@
#include "support/pstl_test_config.h"
#ifdef PSTL_STANDALONE_TESTS
-#include "pstl/algorithm"
#include "pstl/execution"
+#include "pstl/algorithm"
#else
#include <execution>
#include <algorithm>
Modified: pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp?rev=357189&r1=357188&r2=357189&view=diff
==============================================================================
--- pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp (original)
+++ pstl/trunk/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp Thu Mar 28 10:22:19 2019
@@ -10,8 +10,8 @@
#include "support/pstl_test_config.h"
#ifdef PSTL_STANDALONE_TESTS
-#include "pstl/algorithm"
#include "pstl/execution"
+#include "pstl/algorithm"
#else
#include <execution>
#include <algorithm>
More information about the libcxx-commits
mailing list