[llvm] r302749 - Fix build errors with Parallel.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 17:09:30 PDT 2017
Author: zturner
Date: Wed May 10 19:09:30 2017
New Revision: 302749
URL: http://llvm.org/viewvc/llvm-project?rev=302749&view=rev
Log:
Fix build errors with Parallel.
Modified:
llvm/trunk/include/llvm/Support/Parallel.h
llvm/trunk/lib/Support/Parallel.cpp
Modified: llvm/trunk/include/llvm/Support/Parallel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Parallel.h?rev=302749&r1=302748&r2=302749&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Parallel.h (original)
+++ llvm/trunk/include/llvm/Support/Parallel.h Wed May 10 19:09:30 2017
@@ -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(RandomAcc
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(RandomAccessIte
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, Ite
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,
if (TaskSize == 0)
TaskSize = 1;
- TaskGroup TG;
+ detail::TaskGroup TG;
IndexTy I = Begin;
for (; I + TaskSize < End; I += TaskSize) {
TG.spawn([=, &Fn] {
Modified: llvm/trunk/lib/Support/Parallel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Parallel.cpp?rev=302749&r1=302748&r2=302749&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Parallel.cpp (original)
+++ llvm/trunk/lib/Support/Parallel.cpp Wed May 10 19:09:30 2017
@@ -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() {
More information about the llvm-commits
mailing list