[llvm] [AIX][PowerPC] Teach the Threading Library About the Number of Physical Cores on AIX (PR #67683)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 07:35:41 PDT 2023
================
@@ -432,6 +436,8 @@ static int computeHostNumPhysicalCores() {
static_cast<uintptr_t>(reinterpret_cast<unsigned int &>(CVT[CVTCSD])));
return reinterpret_cast<int &>(CSD[CSD_NUMBER_ONLINE_STANDARD_CPS]);
}
+#elif defined(_AIX)
+static int computeHostNumPhysicalCores() { return _system_configuration.ncpus; }
----------------
xingxue-ibm wrote:
```suggestion
static int computeHostNumPhysicalCores() { return sysconf(_SC_NPROCESSORS_ONLN); }
```
https://github.com/llvm/llvm-project/pull/67683
More information about the llvm-commits
mailing list