hardware_concurrency overloads

Synopses

Declared in <llvm/Support/Threading.h>

Parse Num into a hardware_concurrency strategy.

Use all available hardware threads, honoring affinity masks.

ThreadPoolStrategy
hardware_concurrency(unsigned int ThreadCount = 0);

Return Value

  • Parsed strategy, or one thread per hardware core if invalid.

  • Strategy that uses hardware threads up to ThreadCount.

Parameters

Name

Description

Num

Thread‐count string as accepted by get_threadpool_strategy.

ThreadCount

Suggested thread bound; 0 means use all available.

Created with MrDocs