Build a strategy from a number of threads as a string provided in Num. 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.

Synopsis

Declared in <llvm/Support/Threading.h>

std::optional<ThreadPoolStrategy>
get_threadpool_strategy(
    StringRef Num,
    ThreadPoolStrategy Default = {});

Return Value

Class template for optional values.

Parameters

Name

Description

Num

Represent a constant reference to a string, i.e. a character array and a length, which need not be null terminated.

Default

This tells how a thread pool will be used

Created with MrDocs