[libcxx-commits] [pstl] r366208 - [pstl] Fix compilation with TBB backend
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 16 06:45:10 PDT 2019
Author: ldionne
Date: Tue Jul 16 06:45:10 2019
New Revision: 366208
URL: http://llvm.org/viewvc/llvm-project?rev=366208&view=rev
Log:
[pstl] Fix compilation with TBB backend
Some types were not using the right namespace qualification.
Modified:
pstl/trunk/include/pstl/internal/parallel_backend_tbb.h
Modified: pstl/trunk/include/pstl/internal/parallel_backend_tbb.h
URL: http://llvm.org/viewvc/llvm-project/pstl/trunk/include/pstl/internal/parallel_backend_tbb.h?rev=366208&r1=366207&r2=366208&view=diff
==============================================================================
--- pstl/trunk/include/pstl/internal/parallel_backend_tbb.h (original)
+++ pstl/trunk/include/pstl/internal/parallel_backend_tbb.h Tue Jul 16 06:45:10 2019
@@ -191,7 +191,7 @@ _Tp
__parallel_transform_reduce(_ExecutionPolicy&&, _Index __first, _Index __last, _Up __u, _Tp __init, _Cp __combine,
_Rp __brick_reduce)
{
- __par_backend::__par_trans_red_body<_Index, _Up, _Tp, _Cp, _Rp> __body(__u, __init, __combine, __brick_reduce);
+ __tbb_backend::__par_trans_red_body<_Index, _Up, _Tp, _Cp, _Rp> __body(__u, __init, __combine, __brick_reduce);
// The grain size of 3 is used in order to provide mininum 2 elements for each body
tbb::this_task_arena::isolate(
[__first, __last, &__body]() { tbb::parallel_reduce(tbb::blocked_range<_Index>(__first, __last, 3), __body); });
@@ -305,9 +305,9 @@ __upsweep(_Index __i, _Index __m, _Index
{
_Index __k = __split(__m);
tbb::parallel_invoke(
- [=] { __par_backend::__upsweep(__i, __k, __tilesize, __r, __tilesize, __reduce, __combine); },
+ [=] { __tbb_backend::__upsweep(__i, __k, __tilesize, __r, __tilesize, __reduce, __combine); },
[=] {
- __par_backend::__upsweep(__i + __k, __m - __k, __tilesize, __r + __k, __lastsize, __reduce, __combine);
+ __tbb_backend::__upsweep(__i + __k, __m - __k, __tilesize, __r + __k, __lastsize, __reduce, __combine);
});
if (__m == 2 * __k)
__r[__m - 1] = __combine(__r[__k - 1], __r[__m - 1]);
@@ -325,11 +325,11 @@ __downsweep(_Index __i, _Index __m, _Ind
{
const _Index __k = __split(__m);
tbb::parallel_invoke(
- [=] { __par_backend::__downsweep(__i, __k, __tilesize, __r, __tilesize, __initial, __combine, __scan); },
+ [=] { __tbb_backend::__downsweep(__i, __k, __tilesize, __r, __tilesize, __initial, __combine, __scan); },
// Assumes that __combine never throws.
//TODO: Consider adding a requirement for user functors to be constant.
[=, &__combine] {
- __par_backend::__downsweep(__i + __k, __m - __k, __tilesize, __r + __k, __lastsize,
+ __tbb_backend::__downsweep(__i + __k, __m - __k, __tilesize, __r + __k, __lastsize,
__combine(__initial, __r[__k - 1]), __combine, __scan);
});
}
@@ -363,7 +363,7 @@ __parallel_strict_scan(_ExecutionPolicy&
_Index __m = (__n - 1) / __tilesize;
__buffer<_Tp> __buf(__m + 1);
_Tp* __r = __buf.get();
- __par_backend::__upsweep(_Index(0), _Index(__m + 1), __tilesize, __r, __n - __m * __tilesize, __reduce,
+ __tbb_backend::__upsweep(_Index(0), _Index(__m + 1), __tilesize, __r, __n - __m * __tilesize, __reduce,
__combine);
// When __apex is a no-op and __combine has no side effects, a good optimizer
@@ -375,7 +375,7 @@ __parallel_strict_scan(_ExecutionPolicy&
while ((__k &= __k - 1))
__t = __combine(__r[__k - 1], __t);
__apex(__combine(__initial, __t));
- __par_backend::__downsweep(_Index(0), _Index(__m + 1), __tilesize, __r, __n - __m * __tilesize, __initial,
+ __tbb_backend::__downsweep(_Index(0), _Index(__m + 1), __tilesize, __r, __n - __m * __tilesize, __initial,
__combine, __scan);
return;
}
@@ -874,7 +874,7 @@ template <typename _RandomAccessIterator
tbb::task*
__stable_sort_task<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, _LeafSort>::execute()
{
- typedef __merge_task<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, __serial_destroy,
+ typedef __merge_task<_RandomAccessIterator1, _RandomAccessIterator2, _Compare, __utils::__serial_destroy,
__utils::__serial_move_merge>
_MergeTaskType;
More information about the libcxx-commits
mailing list