Build a strategy from a number of threads as a string provided in Num.
Declared in <llvm/Support/Threading.h>
std::optional<ThreadPoolStrategy>
get_threadpool_strategy(
StringRef Num,
ThreadPoolStrategy Default = {});
When Num is above the max number of threads specified by the Default strategy, we attempt to equally allocate the threads on all CPU sockets. "0" or an empty string will return the Default strategy. "all" for using all hardware threads.
Parsed strategy, Default for empty/"0", or nullopt if invalid.
| Name | Description |
|---|---|
| Num | Thread count as a string, or "0", empty, or "all". |
| Default | Strategy used when Num is empty, "0", or omitted. |