diff options
| author | Zachary Turner <zturner@google.com> | 2017-05-11 00:09:30 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-05-11 00:09:30 +0000 |
| commit | bfb8e189d224c7bc9764d5512f4342c546da31b1 (patch) | |
| tree | 755026e9704fd67ed535e73982b92a0082380df6 | |
| parent | 3a57fbd6db74b2eb5cd2789036c521f702cb323e (diff) | |
| download | bcm5719-llvm-bfb8e189d224c7bc9764d5512f4342c546da31b1.tar.gz bcm5719-llvm-bfb8e189d224c7bc9764d5512f4342c546da31b1.zip | |
Fix build errors with Parallel.
llvm-svn: 302749
| -rw-r--r-- | llvm/include/llvm/Support/Parallel.h | 11 | ||||
| -rw-r--r-- | llvm/lib/Support/Parallel.cpp | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/llvm/include/llvm/Support/Parallel.h b/llvm/include/llvm/Support/Parallel.h index aca972eb490..12cabcbea57 100644 --- a/llvm/include/llvm/Support/Parallel.h +++ b/llvm/include/llvm/Support/Parallel.h @@ -36,7 +36,7 @@ class Latch { mutable std::condition_variable Cond; public: - explicit Latch(uint32_t count = 0) : Count(Count) {} + explicit Latch(uint32_t Count = 0) : Count(Count) {} ~Latch() { sync(); } void inc() { @@ -117,7 +117,8 @@ RandomAccessIterator medianOf3(RandomAccessIterator Start, template <class RandomAccessIterator, class Comparator> void parallel_quick_sort(RandomAccessIterator Start, RandomAccessIterator End, - const Comparator &Comp, TaskGroup &TG, size_t Depth) { + const Comparator &Comp, detail::TaskGroup &TG, + size_t Depth) { // Do a sequential sort for small inputs. if (std::distance(Start, End) < detail::MinParallelSize || Depth == 0) { std::sort(Start, End, Comp); @@ -144,7 +145,7 @@ void parallel_quick_sort(RandomAccessIterator Start, RandomAccessIterator End, template <class RandomAccessIterator, class Comparator> void parallel_sort(RandomAccessIterator Start, RandomAccessIterator End, const Comparator &Comp) { - TaskGroup TG; + detail::TaskGroup TG; parallel_quick_sort(Start, End, Comp, TG, llvm::Log2_64(std::distance(Start, End)) + 1); } @@ -159,7 +160,7 @@ void parallel_for_each(IterTy Begin, IterTy End, FuncTy Fn) { if (TaskSize == 0) TaskSize = 1; - TaskGroup TG; + detail::TaskGroup TG; while (TaskSize <= std::distance(Begin, End)) { TG.spawn([=, &Fn] { std::for_each(Begin, Begin + TaskSize, Fn); }); Begin += TaskSize; @@ -173,7 +174,7 @@ void parallel_for_each_n(IndexTy Begin, IndexTy End, FuncTy Fn) { if (TaskSize == 0) TaskSize = 1; - TaskGroup TG; + detail::TaskGroup TG; IndexTy I = Begin; for (; I + TaskSize < End; I += TaskSize) { TG.spawn([=, &Fn] { diff --git a/llvm/lib/Support/Parallel.cpp b/llvm/lib/Support/Parallel.cpp index 04fb1c95533..15da66cbe80 100644 --- a/llvm/lib/Support/Parallel.cpp +++ b/llvm/lib/Support/Parallel.cpp @@ -117,7 +117,7 @@ private: std::stack<std::function<void()>> WorkStack; std::mutex Mutex; std::condition_variable Cond; - Latch Done; + detail::Latch Done; }; Executor *Executor::getDefaultExecutor() { |

