mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
[pstl] Mangle the parallel_strict_scan backend function
llvm-svn: 357422
This commit is contained in:
parent
3c023420d1
commit
a735985abe
@ -1038,7 +1038,7 @@ __pattern_copy_if(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Ran
|
||||
return __internal::__except_handler([&__exec, __n, __first, __result, __is_vector, __pred, &__mask_buf]() {
|
||||
bool* __mask = __mask_buf.get();
|
||||
_DifferenceType __m{};
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n, _DifferenceType(0),
|
||||
[=](_DifferenceType __i, _DifferenceType __len) { // Reduce
|
||||
return __internal::__brick_calc_mask_1<_DifferenceType>(__first + __i, __first + (__i + __len),
|
||||
@ -1187,7 +1187,7 @@ __remove_elements(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardI
|
||||
__mask += __min;
|
||||
_DifferenceType __m{};
|
||||
// 2. Elements that doesn't satisfy pred are moved to result
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n, _DifferenceType(0),
|
||||
[__mask, __is_vector](_DifferenceType __i, _DifferenceType __len) {
|
||||
return __internal::__brick_count(__mask + __i, __mask + __i + __len, [](bool __val) { return __val; },
|
||||
@ -1316,7 +1316,7 @@ __pattern_unique_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator __first,
|
||||
return __internal::__except_handler([&__exec, __n, __first, __result, __pred, __is_vector, &__mask_buf]() {
|
||||
bool* __mask = __mask_buf.get();
|
||||
_DifferenceType __m{};
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n, _DifferenceType(0),
|
||||
[=](_DifferenceType __i, _DifferenceType __len) -> _DifferenceType { // Reduce
|
||||
_DifferenceType __extra = 0;
|
||||
@ -2046,7 +2046,7 @@ __pattern_partition_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator __firs
|
||||
&__mask_buf]() {
|
||||
bool* __mask = __mask_buf.get();
|
||||
_ReturnType __m{};
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n, std::make_pair(_DifferenceType(0), _DifferenceType(0)),
|
||||
[=](_DifferenceType __i, _DifferenceType __len) { // Reduce
|
||||
return __internal::__brick_calc_mask_1<_DifferenceType>(__first + __i, __first + (__i + __len),
|
||||
@ -2817,7 +2817,7 @@ __parallel_set_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _Forwar
|
||||
__internal::__brick_move(__buffer + __s.__buf_pos, __buffer + (__s.__buf_pos + __s.__len),
|
||||
__result + __s.__pos, __is_vector);
|
||||
};
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n1, _SetRange{0, 0, 0}, //-1, 0},
|
||||
[=](_DifferenceType __i, _DifferenceType __len) { // Reduce
|
||||
//[__b; __e) - a subrange of the first sequence, to reduce
|
||||
|
@ -277,7 +277,7 @@ __pattern_transform_scan(_ExecutionPolicy&& __exec, _RandomAccessIterator __firs
|
||||
return __result;
|
||||
}
|
||||
return __internal::__except_handler([&]() {
|
||||
__par_backend::parallel_strict_scan(
|
||||
__par_backend::__parallel_strict_scan(
|
||||
std::forward<_ExecutionPolicy>(__exec), __n, __init,
|
||||
[__first, __unary_op, __binary_op, __result, __is_vector](_DifferenceType __i, _DifferenceType __len) {
|
||||
return __internal::__brick_transform_scan(__first + __i, __first + (__i + __len), __result + __i,
|
||||
|
@ -291,7 +291,7 @@ __split(_Index __m)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// parallel_strict_scan
|
||||
// __parallel_strict_scan
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
template <typename _Index, typename _Tp, typename _Rp, typename _Cp>
|
||||
@ -350,7 +350,8 @@ __downsweep(_Index __i, _Index __m, _Index __tilesize, _Tp* __r, _Index __lastsi
|
||||
// T must have a trivial constructor and destructor.
|
||||
template <class _ExecutionPolicy, typename _Index, typename _Tp, typename _Rp, typename _Cp, typename _Sp, typename _Ap>
|
||||
void
|
||||
parallel_strict_scan(_ExecutionPolicy&&, _Index __n, _Tp __initial, _Rp __reduce, _Cp __combine, _Sp __scan, _Ap __apex)
|
||||
__parallel_strict_scan(_ExecutionPolicy&&, _Index __n, _Tp __initial, _Rp __reduce, _Cp __combine, _Sp __scan,
|
||||
_Ap __apex)
|
||||
{
|
||||
tbb::this_task_arena::isolate([=, &__combine]() {
|
||||
if (__n > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user