16 #include "llvm/Config/config.h" 32 #if LLVM_ENABLE_THREADS != 0 39 #if LLVM_ENABLE_THREADS == 0 || \ 40 (!defined(_WIN32) && !defined(HAVE_PTHREAD_H)) 43 unsigned RequestedStackSize) {
44 (void)RequestedStackSize;
71 if (NumPhysical == -1)
77 #if defined(HAVE_SCHED_GETAFFINITY) && defined(HAVE_CPU_COUNT) 79 if (sched_getaffinity(0,
sizeof(Set), &Set))
80 return CPU_COUNT(&Set);
void set_thread_name(const Twine &Name)
Set the name of the current thread.
This class represents lattice values for constants.
unsigned heavyweight_hardware_concurrency()
Get the amount of currency to use for tasks requiring significant memory or other resources...
int getHostNumPhysicalCores()
Get the number of physical cores (as opposed to logical cores returned from thread::hardware_concurre...
amdgpu Simplify well known AMD library false Value Value const Twine & Name
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
uint32_t get_max_thread_name_length()
Get the maximum length of a thread name on this platform.
void get_thread_name(SmallVectorImpl< char > &Name)
Get the name of the current thread.
bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
uint64_t get_threadid()
Return the current thread id, as used in various OS system calls.
void llvm_execute_on_thread(void(*UserFn)(void *), void *UserData, unsigned RequestedStackSize=0)
llvm_execute_on_thread - Execute the given UserFn on a separate thread, passing it the provided UserD...
unsigned hardware_concurrency()
Get the number of threads that the current program can execute concurrently.