|
constexpr bool | llvm::llvm_is_multithreaded () |
| Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
|
|
template<typename Function , typename... Args> |
void | llvm::call_once (once_flag &flag, Function &&F, Args &&... ArgList) |
| Execute the function specified as a parameter once.
|
|
std::optional< ThreadPoolStrategy > | llvm::get_threadpool_strategy (StringRef Num, ThreadPoolStrategy Default={}) |
| Build a strategy from a number of threads as a string provided in Num .
|
|
ThreadPoolStrategy | llvm::heavyweight_hardware_concurrency (unsigned ThreadCount=0) |
| Returns a thread strategy for tasks requiring significant memory or other resources.
|
|
ThreadPoolStrategy | llvm::heavyweight_hardware_concurrency (StringRef Num) |
| Like heavyweight_hardware_concurrency() above, but builds a strategy based on the rules described for get_threadpool_strategy().
|
|
ThreadPoolStrategy | llvm::hardware_concurrency (unsigned ThreadCount=0) |
| Returns a default thread strategy where all available hardware resources are to be used, except for those initially excluded by an affinity mask.
|
|
ThreadPoolStrategy | llvm::optimal_concurrency (unsigned TaskCount=0) |
| Returns an optimal thread strategy to execute specified amount of tasks.
|
|
uint64_t | llvm::get_threadid () |
| Return the current thread id, as used in various OS system calls.
|
|
uint32_t | llvm::get_max_thread_name_length () |
| Get the maximum length of a thread name on this platform.
|
|
void | llvm::set_thread_name (const Twine &Name) |
| Set the name of the current thread.
|
|
void | llvm::get_thread_name (SmallVectorImpl< char > &Name) |
| Get the name of the current thread.
|
|
llvm::BitVector | llvm::get_thread_affinity_mask () |
| Returns a mask that represents on which hardware thread, core, CPU, NUMA group, the calling thread can be executed.
|
|
unsigned | llvm::get_cpus () |
| Returns how many physical CPUs or NUMA groups the system has.
|
|
int | llvm::get_physical_cores () |
| Returns how many physical cores (as opposed to logical cores returned from thread::hardware_concurrency(), which includes hyperthreads).
|
|
SetThreadPriorityResult | llvm::set_thread_priority (ThreadPriority Priority) |
|