Lines Matching +full:parallel +full:- +full:in

1 //===- llvm/Support/Parallel.cpp - Parallel algorithms --------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/Parallel.h"
10 #include "llvm/Config/llvm-config.h"
19 llvm::ThreadPoolStrategy llvm::parallel::strategy;
22 namespace parallel { namespace
48 /// in filo order.
53 // Spawn all but one of the threads in another thread as spawning threads in ThreadPoolExecutor()
58 // Use operator[] before creating the thread to avoid data race in .size() in ThreadPoolExecutor()
59 // in 'safe libc++' mode. in ThreadPoolExecutor()
97 static void call(void *Ptr) { ((ThreadPoolExecutor *)Ptr)->stop(); } in call()
144 // it is destroyed, i.e. in a normal full exit. The ThreadPoolExecutor in getDefaultExecutor()
164 return detail::Executor::getDefaultExecutor()->getThreadCount(); in getThreadCount()
169 // lock if all threads in the default executor are blocked. To prevent the dead
170 // lock, only allow the root TaskGroup to run tasks parallelly. In the scenario
174 : Parallel((parallel::strategy.ThreadsRequested != 1) && in TaskGroup()
177 : Parallel(false) {}
187 if (Parallel) { in spawn()
189 detail::Executor::getDefaultExecutor()->add([&, F = std::move(F)] { in spawn()
199 } // namespace parallel
205 if (parallel::strategy.ThreadsRequested != 1) { in parallelFor()
206 auto NumItems = End - Begin; in parallelFor()
209 auto TaskSize = NumItems / parallel::detail::MaxTasksPerGroup; in parallelFor()
213 parallel::TaskGroup TG; in parallelFor()