[PATCH] D57638: [pstl] Fix missing parallel policy guards

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 17:27:11 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL355161: [pstl] Fix missing parallel policy guards (authored by ldionne, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57638?vs=184901&id=188818#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57638/new/

https://reviews.llvm.org/D57638

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


Index: pstl/trunk/include/pstl/internal/algorithm_impl.h
===================================================================
--- pstl/trunk/include/pstl/internal/algorithm_impl.h
+++ pstl/trunk/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
@@ -2499,6 +2501,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,
@@ -2509,6 +2512,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.188818.patch
Type: text/x-patch
Size: 1466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190301/02676948/attachment.bin>


More information about the llvm-commits mailing list