[PATCH] D25564: Add interface to compute number of physical cores on host system

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 10:36:31 PDT 2016


tejohnson added inline comments.


================
Comment at: lib/Support/Host.cpp:1239
+// On other systems, return -1 to indicate unknown.
+int computeHostNumPhysicalCores() { return -1; }
+#endif
----------------
mehdi_amini wrote:
> aaron.ballman wrote:
> > No Windows implementation? Should be able to use `GetLogicalProcessorInformation()` pretty easily.
> > 
> > https://msdn.microsoft.com/en-us/library/windows/desktop/ms683194(v=vs.85).aspx
> Patch welcome :)
> 
> I'll supply the MacOS version when possible.
I'd prefer someone who has access to Windows for pre-commit testing to contribute a patch. I'd have to guess and just wait for bots to test. (Mehdi had already committed to supplying the Mac OS side patch.)


https://reviews.llvm.org/D25564





More information about the llvm-commits mailing list