diff options
author | Fangrui Song <i@maskray.me> | 2022-11-23 17:44:04 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-11-23 17:44:04 -0800 |
commit | 9969ceb36b440eaafa17c486f29a69c7a7da3b3b (patch) | |
tree | 1d05369277c1aa8d22eb7de70d35b8351149533f /llvm/lib/Support/Windows/Threading.inc | |
parent | f199f97c720d0b031421b6e8607f57cb54f78c81 (diff) | |
download | llvm-9969ceb36b440eaafa17c486f29a69c7a7da3b3b.zip llvm-9969ceb36b440eaafa17c486f29a69c7a7da3b3b.tar.gz llvm-9969ceb36b440eaafa17c486f29a69c7a7da3b3b.tar.bz2 |
Host: Internalize computeHostNumPhysicalCores/computeHostNumHardwareThreads
Diffstat (limited to 'llvm/lib/Support/Windows/Threading.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Threading.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc index 11f3481..5b86400 100644 --- a/llvm/lib/Support/Windows/Threading.inc +++ b/llvm/lib/Support/Windows/Threading.inc @@ -239,7 +239,7 @@ static unsigned aggregate(R &&Range, UnaryPredicate P) { } // for sys::getHostNumPhysicalCores -int computeHostNumPhysicalCores() { +static int computeHostNumPhysicalCores() { static unsigned Cores = aggregate(getProcessorGroups(), [](const ProcessorGroup &G) { return G.UsableThreads / G.ThreadsPerCore; @@ -247,7 +247,7 @@ int computeHostNumPhysicalCores() { return Cores; } -int computeHostNumHardwareThreads() { +static int computeHostNumHardwareThreads() { static unsigned Threads = aggregate(getProcessorGroups(), [](const ProcessorGroup &G) { return G.UsableThreads; }); |