[PATCH] D25585: Add interface for querying physical hardware concurrency

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 16:50:11 PDT 2016


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

LGTM.

I suggested a name change, but if you disagree with the rational, you can commit your version.



================
Comment at: include/llvm/Support/Threading.h:121
+  /// host system, otherwise falls back to thread::hardware_concurrency().
+  unsigned hardware_physical_concurrency();
 }
----------------
I think we may want to name it `hardware_coarse_concurrency`. Because:

- This looks like expressing better what we're looking after.
- Hyperthreading is in some sense "physical concurrency", but sharing some resources. 
- Other platforms may have something in between.



https://reviews.llvm.org/D25585





More information about the llvm-commits mailing list