[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:48:45 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:
It will be good to common up with `__linux__` and `__s390x__`. The structure has the number of CPUs configured but `_SC_NPROCESSORS_ONLN` gives the number of processors currently online and available to handle tasks.
https://github.com/llvm/llvm-project/pull/67683
More information about the llvm-commits
mailing list