[libcxx-commits] [PATCH] D57638: [pstl] Fix missing parallel policy guards

Jerry Crunchtime via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 2 01:10:03 PST 2019


jerryct created this revision.
jerryct added reviewers: ldionne, rodgert.
Herald added a subscriber: libcxx-commits.

Address coments from https://reviews.llvm.org/D56139


Repository:
  rPSTL pstl

https://reviews.llvm.org/D57638

Files:
  pstl/include/pstl/internal/algorithm_impl.h


Index: pstl/include/pstl/internal/algorithm_impl.h
===================================================================
--- pstl/include/pstl/internal/algorithm_impl.h
+++ pstl/include/pstl/internal/algorithm_impl.h
@@ -177,6 +177,7 @@
     return internal::brick_walk1_n(__first, __n, __f, __is_vector);
 }
 
+#if __PSTL_USE_PAR_POLICIES
 template <class _ExecutionPolicy, class _RandomAccessIterator, class _Size, class _Function, class _IsVector>
 _RandomAccessIterator
 pattern_walk1_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Size __n, _Function __f,
@@ -187,6 +188,7 @@
                             std::true_type());
     return __first + __n;
 }
+#endif
 
 template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Brick>
 _ForwardIterator
@@ -2502,6 +2504,7 @@
     return internal::brick_generate_n(__first, __count, __g, __is_vector);
 }
 
+#if __PSTL_USE_PAR_POLICIES
 template <class _ExecutionPolicy, class _OutputIterator, class _Size, class _Generator, class _IsVector>
 _OutputIterator
 pattern_generate_n(_ExecutionPolicy&& __exec, _OutputIterator __first, _Size __count, _Generator __g,
@@ -2512,6 +2515,7 @@
     return internal::pattern_generate(std::forward<_ExecutionPolicy>(__exec), __first, __first + __count, __g,
                                       std::true_type(), __is_vector);
 }
+#endif
 
 //------------------------------------------------------------------------
 // remove


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57638.184901.patch
Type: text/x-patch
Size: 1448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190202/183b2944/attachment-0001.bin>


More information about the libcxx-commits mailing list