mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-03 16:03:21 +00:00
[pstl] Fix compile errors when PARALLEL_POLICIES is disabled
Reviewed as https://reviews.llvm.org/D56139. Thanks to @jerryct for the patch. llvm-svn: 350813
This commit is contained in:
parent
70f1b79687
commit
8a7c2ab990
@ -23,8 +23,8 @@
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
#include "parallel_backend.h"
|
||||
#endif
|
||||
#include "parallel_impl.h"
|
||||
#endif
|
||||
|
||||
namespace __pstl
|
||||
{
|
||||
@ -59,6 +59,7 @@ pattern_any_of(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __
|
||||
return internal::brick_any_of(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Pred, class _IsVector>
|
||||
bool
|
||||
pattern_any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Pred __pred,
|
||||
@ -71,6 +72,7 @@ pattern_any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIter
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
// [alg.foreach]
|
||||
// for_each_n with no policy
|
||||
@ -113,6 +115,7 @@ pattern_walk1(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __l
|
||||
internal::brick_walk1(__first, __last, __f, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Function, class _IsVector>
|
||||
void
|
||||
pattern_walk1(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f,
|
||||
@ -126,6 +129,7 @@ pattern_walk1(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardItera
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
|
||||
void
|
||||
@ -135,6 +139,7 @@ pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterato
|
||||
__brick(__first, __last);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Brick>
|
||||
void
|
||||
pattern_walk_brick(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Brick __brick,
|
||||
@ -145,6 +150,7 @@ pattern_walk_brick(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Forward
|
||||
[__brick](_ForwardIterator __i, _ForwardIterator __j) { __brick(__i, __j); });
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// walk1_n
|
||||
@ -191,6 +197,7 @@ pattern_walk_brick_n(_ExecutionPolicy&&, _ForwardIterator __first, _Size __n, _B
|
||||
return __brick(__first, __n);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Brick>
|
||||
_RandomAccessIterator
|
||||
pattern_walk_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Size __n, _Brick __brick,
|
||||
@ -203,6 +210,7 @@ pattern_walk_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _
|
||||
return __first + __n;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// walk2 (pseudo)
|
||||
@ -253,6 +261,7 @@ pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterator1
|
||||
return internal::brick_walk2(__first1, __last1, __first2, __f, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Function, class _IsVector>
|
||||
_ForwardIterator2
|
||||
pattern_walk2(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
@ -266,6 +275,7 @@ pattern_walk2(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIte
|
||||
return __first2 + (__last1 - __first1);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Function,
|
||||
class _IsVector>
|
||||
@ -294,6 +304,7 @@ pattern_walk2_brick(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIter
|
||||
return __brick(__first1, __last1, __first2);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Brick>
|
||||
_RandomAccessIterator2
|
||||
pattern_walk2_brick(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1,
|
||||
@ -308,7 +319,9 @@ pattern_walk2_brick(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1,
|
||||
return __first2 + (__last1 - __first1);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _Size, class _RandomAccessIterator2, class _Brick>
|
||||
_RandomAccessIterator2
|
||||
pattern_walk2_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Size __n,
|
||||
@ -323,6 +336,7 @@ pattern_walk2_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1
|
||||
return __first2 + __n;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2, class _Brick>
|
||||
_ForwardIterator2
|
||||
@ -364,6 +378,7 @@ pattern_walk3(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterator1
|
||||
return internal::brick_walk3(__first1, __last1, __first2, __first3, __f, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2,
|
||||
class _RandomAccessIterator3, class _Function, class _IsVector>
|
||||
_RandomAccessIterator3
|
||||
@ -381,6 +396,7 @@ pattern_walk3(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Rando
|
||||
return __first3 + (__last1 - __first1);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// equal
|
||||
@ -412,6 +428,7 @@ pattern_equal(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterator1
|
||||
return internal::brick_equal(__first1, __last1, __first2, __p, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
bool
|
||||
@ -427,6 +444,7 @@ pattern_equal(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Rando
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// find_if
|
||||
@ -459,6 +477,7 @@ pattern_find_if(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator _
|
||||
return internal::brick_find_if(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
|
||||
@ -474,6 +493,7 @@ pattern_find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIte
|
||||
/*is_first=*/true);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// find_end
|
||||
@ -600,6 +620,7 @@ pattern_find_end(_ExecutionPolicy&&, _ForwardIterator1 __first, _ForwardIterator
|
||||
return internal::brick_find_end(__first, __last, __s_first, __s_last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
_ForwardIterator1
|
||||
@ -626,6 +647,7 @@ pattern_find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardI
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// find_first_of
|
||||
@ -656,6 +678,7 @@ pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1 __first, _ForwardIte
|
||||
return internal::brick_find_first_of(__first, __last, __s_first, __s_last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
_ForwardIterator1
|
||||
@ -672,6 +695,7 @@ pattern_find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _For
|
||||
std::less<typename std::iterator_traits<_ForwardIterator1>::difference_type>(), /*is_first=*/true);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// search
|
||||
@ -702,6 +726,7 @@ pattern_search(_ExecutionPolicy&&, _ForwardIterator1 __first, _ForwardIterator1
|
||||
return internal::brick_search(__first, __last, __s_first, __s_last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
_ForwardIterator1
|
||||
@ -727,6 +752,7 @@ pattern_search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIte
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// search_n
|
||||
@ -757,6 +783,7 @@ pattern_search_n(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator
|
||||
return internal::brick_search_n(__first, __last, __count, __value, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Tp, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
_RandomAccessIterator
|
||||
@ -784,6 +811,7 @@ pattern_search_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Rand
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// copy_n
|
||||
@ -989,6 +1017,7 @@ pattern_copy_if(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator _
|
||||
return internal::brick_copy_if(__first, __last, __result, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _UnaryPredicate,
|
||||
class _IsVector>
|
||||
_OutputIterator
|
||||
@ -1023,6 +1052,7 @@ pattern_copy_if(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Rando
|
||||
// trivial sequence - use serial algorithm
|
||||
return brick_copy_if(__first, __last, __result, __pred, __is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// count
|
||||
@ -1051,6 +1081,7 @@ pattern_count(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __l
|
||||
return brick_count(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate, class _IsVector>
|
||||
typename std::iterator_traits<_ForwardIterator>::difference_type
|
||||
pattern_count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
|
||||
@ -1066,6 +1097,7 @@ pattern_count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardItera
|
||||
std::plus<_SizeType>());
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// unique
|
||||
@ -1096,6 +1128,7 @@ pattern_unique(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __
|
||||
return internal::brick_unique(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
// That function is shared between two algorithms - remove_if (pattern_remove_if) and unique (pattern unique). But a mask calculation is different.
|
||||
// So, a caller passes _CalcMask brick into remove_elements.
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _CalcMask, class _IsVector>
|
||||
@ -1172,7 +1205,9 @@ remove_elements(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIte
|
||||
return __first + __m;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred,
|
||||
@ -1198,6 +1233,7 @@ pattern_unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIter
|
||||
},
|
||||
__is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// unique_copy
|
||||
@ -1254,6 +1290,7 @@ brick_calc_mask_2(_RandomAccessIterator __first, _RandomAccessIterator __last, b
|
||||
return unseq_backend::simd_calc_mask_2(__first, __last - __first, __mask, __pred);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator, class _BinaryPredicate,
|
||||
class _IsVector>
|
||||
_OutputIterator
|
||||
@ -1303,6 +1340,7 @@ pattern_unique_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _R
|
||||
// trivial sequence - use serial algorithm
|
||||
return brick_unique_copy(__first, __last, __result, __pred, __is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// reverse
|
||||
@ -1364,6 +1402,7 @@ pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator __first, _Bidirection
|
||||
brick_reverse(__first, __last, _is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _BidirectionalIterator, class _IsVector>
|
||||
void
|
||||
pattern_reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
@ -1375,6 +1414,7 @@ pattern_reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _Bidi
|
||||
brick_reverse(__inner_first, __inner_last, __last - (__inner_first - __first), __is_vector);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// reverse_copy
|
||||
@ -1408,6 +1448,7 @@ pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator __first, _Bidire
|
||||
return internal::brick_reverse_copy(__first, __last, __d_first, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _BidirectionalIterator, class _OutputIterator, class _IsVector>
|
||||
_OutputIterator
|
||||
pattern_reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
@ -1422,6 +1463,7 @@ pattern_reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first,
|
||||
});
|
||||
return __d_first + __len;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// rotate
|
||||
@ -1487,6 +1529,7 @@ pattern_rotate(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __
|
||||
return internal::brick_rotate(__first, __middle, __last, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
|
||||
@ -1546,6 +1589,7 @@ pattern_rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIter
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// rotate_copy
|
||||
@ -1576,6 +1620,7 @@ pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterat
|
||||
return internal::brick_rotate_copy(__first, __middle, __last, __result, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _OutputIterator, class _IsVector>
|
||||
_OutputIterator
|
||||
pattern_rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle,
|
||||
@ -1605,6 +1650,7 @@ pattern_rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Forwar
|
||||
});
|
||||
return __result + (__last - __first);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// is_partitioned
|
||||
@ -1653,6 +1699,7 @@ pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIte
|
||||
return internal::brick_is_partitioned(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
||||
bool
|
||||
pattern_is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
|
||||
@ -1751,6 +1798,7 @@ pattern_is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _For
|
||||
});
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// partition
|
||||
@ -1781,6 +1829,7 @@ pattern_partition(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator
|
||||
return internal::brick_partition(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred,
|
||||
@ -1848,6 +1897,7 @@ pattern_partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardI
|
||||
return __result.__pivot;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// stable_partition
|
||||
@ -1878,6 +1928,7 @@ pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator __first, _Bi
|
||||
return internal::brick_stable_partition(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate, class _IsVector>
|
||||
_BidirectionalIterator
|
||||
pattern_stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last,
|
||||
@ -1930,6 +1981,7 @@ pattern_stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __fir
|
||||
return __result.__pivot;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// partition_copy
|
||||
@ -1965,6 +2017,7 @@ pattern_partition_copy(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIte
|
||||
return internal::brick_partition_copy(__first, __last, __out_true, __out_false, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _OutputIterator1, class _OutputIterator2,
|
||||
class _UnaryPredicate, class _IsVector>
|
||||
std::pair<_OutputIterator1, _OutputIterator2>
|
||||
@ -2003,6 +2056,7 @@ pattern_partition_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
// trivial sequence - use serial algorithm
|
||||
return internal::brick_partition_copy(__first, __last, __out_true, __out_false, __pred, __is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// sort
|
||||
@ -2017,6 +2071,7 @@ pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator __first, _RandomAccessIte
|
||||
std::sort(__first, __last, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
void
|
||||
pattern_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
|
||||
@ -2029,6 +2084,7 @@ pattern_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAc
|
||||
__last - __first);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// stable_sort
|
||||
@ -2042,6 +2098,7 @@ pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator __first, _RandomAc
|
||||
std::stable_sort(__first, __last, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
void
|
||||
pattern_stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
@ -2053,6 +2110,7 @@ pattern_stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _R
|
||||
_Compare __comp) { std::stable_sort(__first, __last, __comp); });
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// partial_sort
|
||||
@ -2066,6 +2124,7 @@ pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator __first, _RandomA
|
||||
std::partial_sort(__first, __middle, __last, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
void
|
||||
pattern_partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle,
|
||||
@ -2084,6 +2143,7 @@ pattern_partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _
|
||||
__n);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// partial_sort_copy
|
||||
@ -2098,6 +2158,7 @@ pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator __first, _Forward
|
||||
return std::partial_sort_copy(__first, __last, __d_first, __d_last, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
_RandomAccessIterator
|
||||
pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
|
||||
@ -2166,6 +2227,7 @@ pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// adjacent_find
|
||||
@ -2194,6 +2256,7 @@ pattern_adjacent_find(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIter
|
||||
return internal::brick_adjacent_find(__first, __last, __pred, __is_vector, __or_semantic);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _BinaryPredicate, class _IsVector>
|
||||
_RandomAccessIterator
|
||||
pattern_adjacent_find(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
@ -2239,6 +2302,7 @@ pattern_adjacent_find(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// nth_element
|
||||
@ -2252,6 +2316,7 @@ pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator __first, _RandomAc
|
||||
std::nth_element(__first, __nth, __last, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
void
|
||||
pattern_nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth,
|
||||
@ -2297,6 +2362,7 @@ pattern_nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _R
|
||||
}
|
||||
} while (__x != __nth);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// fill, fill_n
|
||||
@ -2325,6 +2391,7 @@ pattern_fill(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator __la
|
||||
internal::brick_fill(__first, __last, __value, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value,
|
||||
@ -2338,6 +2405,7 @@ pattern_fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterat
|
||||
return __last;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _OutputIterator, class _Size, class _Tp>
|
||||
_OutputIterator
|
||||
@ -2397,6 +2465,7 @@ pattern_generate(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator
|
||||
internal::brick_generate(__first, __last, __g, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Generator, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g,
|
||||
@ -2410,6 +2479,7 @@ pattern_generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIt
|
||||
return __last;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class OutputIterator, class Size, class _Generator>
|
||||
OutputIterator
|
||||
@ -2476,6 +2546,7 @@ pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterator
|
||||
return internal::brick_remove_if(__first, __last, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _IsVector>
|
||||
_ForwardIterator
|
||||
pattern_remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred,
|
||||
@ -2496,6 +2567,7 @@ pattern_remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardI
|
||||
},
|
||||
__is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// merge
|
||||
@ -2530,6 +2602,7 @@ pattern_merge(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterator1
|
||||
return internal::brick_merge(__first1, __last1, __first2, __last2, __d_first, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector>
|
||||
_OutputIterator
|
||||
@ -2544,6 +2617,7 @@ pattern_merge(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Rando
|
||||
_Compare __comp) { return brick_merge(__f1, __l1, __f2, __l2, __f3, __comp, __is_vector); });
|
||||
return __d_first + (__last1 - __first1) + (__last2 - __first2);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// inplace_merge
|
||||
@ -2574,6 +2648,7 @@ pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator __first, _Bidir
|
||||
internal::brick_inplace_merge(__first, __middle, __last, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare, class _IsVector>
|
||||
void
|
||||
pattern_inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle,
|
||||
@ -2614,6 +2689,7 @@ pattern_inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first,
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// includes
|
||||
@ -2628,6 +2704,7 @@ pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forward
|
||||
return std::includes(__first1, __last1, __first2, __last2, __comp);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
||||
bool
|
||||
pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
@ -2682,9 +2759,11 @@ pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forward
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
constexpr auto __set_algo_cut_off = 1000;
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector, class _SizeFunction, class _SetOP>
|
||||
_OutputIterator
|
||||
@ -2773,7 +2852,9 @@ parallel_set_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardI
|
||||
return __result + __m;
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
//a shared parallel pattern for 'pattern_set_union' and 'pattern_set_symmetric_difference'
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _SetUnionOp, class _IsVector>
|
||||
@ -2888,6 +2969,7 @@ parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Fo
|
||||
__comp, [](_DifferenceType __n, _DifferenceType __m) { return __n + __m; }, __set_union_op,
|
||||
__is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// set_union
|
||||
@ -2922,6 +3004,7 @@ pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterat
|
||||
return internal::brick_set_union(__first1, __last1, __first2, __last2, __result, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector>
|
||||
_OutputIterator
|
||||
@ -2946,6 +3029,7 @@ pattern_set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forwar
|
||||
},
|
||||
__is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// set_intersection
|
||||
@ -2980,6 +3064,7 @@ pattern_set_intersection(_ExecutionPolicy&&, _ForwardIterator1 __first1, _Forwar
|
||||
return internal::brick_set_intersection(__first1, __last1, __first2, __last2, __result, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector>
|
||||
_OutputIterator
|
||||
@ -3041,6 +3126,7 @@ pattern_set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1,
|
||||
// [left_bound_seq_1; last1) and [left_bound_seq_2; last2) - use serial algorithm
|
||||
return std::set_intersection(__left_bound_seq_1, __last1, __left_bound_seq_2, __last2, __result, __comp);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// set_difference
|
||||
@ -3075,6 +3161,7 @@ pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardI
|
||||
return internal::brick_set_difference(__first1, __last1, __first2, __last2, __result, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector>
|
||||
_OutputIterator
|
||||
@ -3135,6 +3222,7 @@ pattern_set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _F
|
||||
// use serial algorithm
|
||||
return std::set_difference(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// set_symmetric_difference
|
||||
@ -3170,6 +3258,7 @@ pattern_set_symmetric_difference(_ExecutionPolicy&&, _ForwardIterator1 __first1,
|
||||
__is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _OutputIterator,
|
||||
class _Compare, class _IsVector>
|
||||
_OutputIterator
|
||||
@ -3194,6 +3283,7 @@ pattern_set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __
|
||||
},
|
||||
__is_vector);
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// is_heap_until
|
||||
@ -3254,6 +3344,7 @@ is_heap_until_local(_RandomAccessIterator __first, _DifferenceType __begin, _Dif
|
||||
[&__comp](_RandomAccessIterator __it, _DifferenceType __i) { return __comp(__it[(__i - 1) / 2], __it[__i]); });
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare, class _IsVector>
|
||||
_RandomAccessIterator
|
||||
pattern_is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
@ -3271,6 +3362,7 @@ pattern_is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
std::less<typename std::iterator_traits<_RandomAccessIterator>::difference_type>(), /*is_first=*/true);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// min_element
|
||||
@ -3304,6 +3396,7 @@ pattern_min_element(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIterat
|
||||
return internal::brick_min_element(__first, __last, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <typename _ExecutionPolicy, typename _RandomAccessIterator, typename _Compare, typename _IsVector>
|
||||
_RandomAccessIterator
|
||||
pattern_min_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
@ -3325,6 +3418,7 @@ pattern_min_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _R
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// minmax_element
|
||||
@ -3358,6 +3452,7 @@ pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIte
|
||||
return internal::brick_minmax_element(__first, __last, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <typename _ExecutionPolicy, typename _ForwardIterator, typename _Compare, typename _IsVector>
|
||||
std::pair<_ForwardIterator, _ForwardIterator>
|
||||
pattern_minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp,
|
||||
@ -3384,6 +3479,7 @@ pattern_minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _For
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// mismatch
|
||||
@ -3429,6 +3525,7 @@ pattern_mismatch(_ExecutionPolicy&&, _ForwardIterator1 __first1, _ForwardIterato
|
||||
return internal::brick_mismatch(__first1, __last1, __first2, __last2, __pred, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Predicate,
|
||||
class _IsVector>
|
||||
std::pair<_RandomAccessIterator1, _RandomAccessIterator2>
|
||||
@ -3449,6 +3546,7 @@ pattern_mismatch(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Ra
|
||||
return std::make_pair(__result, __first2 + (__result - __first1));
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// lexicographical_compare
|
||||
@ -3507,6 +3605,7 @@ pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1 __first1,
|
||||
return internal::brick_lexicographical_compare(__first1, __last1, __first2, __last2, __comp, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare, class _IsVector>
|
||||
bool
|
||||
pattern_lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
||||
@ -3550,6 +3649,7 @@ pattern_lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __f
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace internal
|
||||
} // namespace __pstl
|
||||
|
@ -64,6 +64,7 @@ pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator1 __first1, _Forwar
|
||||
return brick_transform_reduce(__first1, __last1, __first2, __init, __binary_op1, __binary_op2, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _RandomAccessIterator1, class _RandomAccessIterator2, class _Tp,
|
||||
class _BinaryOperation1, class _BinaryOperation2, class _IsVector>
|
||||
_Tp
|
||||
@ -86,6 +87,7 @@ pattern_transform_reduce(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __fir
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// transform_reduce (version with unary and binary functions)
|
||||
@ -124,6 +126,7 @@ pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardI
|
||||
return brick_transform_reduce(__first, __last, __init, __binary_op, __unary_op, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation,
|
||||
class _IsVector>
|
||||
_Tp
|
||||
@ -140,6 +143,7 @@ pattern_transform_reduce(_ExecutionPolicy&& __exec, _ForwardIterator __first, _F
|
||||
});
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// transform_exclusive_scan
|
||||
@ -225,6 +229,7 @@ pattern_transform_scan(_ExecutionPolicy&&, _ForwardIterator __first, _ForwardIte
|
||||
.first;
|
||||
}
|
||||
|
||||
#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
|
||||
@ -253,7 +258,9 @@ pattern_transform_scan(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
return __result + (__last - __first);
|
||||
});
|
||||
}
|
||||
#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
|
||||
@ -289,6 +296,7 @@ pattern_transform_scan(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
return __result + (__last - __first);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// adjacent_difference
|
||||
@ -329,6 +337,7 @@ pattern_adjacent_difference(_ExecutionPolicy&&, _ForwardIterator __first, _Forwa
|
||||
return internal::brick_adjacent_difference(__first, __last, __d_first, __op, __is_vector);
|
||||
}
|
||||
|
||||
#if __PSTL_USE_PAR_POLICIES
|
||||
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryOperation,
|
||||
class _IsVector>
|
||||
_ForwardIterator2
|
||||
@ -352,6 +361,7 @@ pattern_adjacent_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first
|
||||
});
|
||||
return __d_first + (__last - __first);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace internal
|
||||
} // namespace __pstl
|
||||
|
Loading…
x
Reference in New Issue
Block a user