How do I get the core count?
I was wondering if someone knew how t get the core count of a the running machine.
asked Aug 03 '15 at 04:56 AM in C++ Programming
You should use our generic API wrappers to do this so the code works on all platforms:
Also don't use the FGenericPlatform* directly since that means you'll get the wrong version of that code when it's different for a given platform. These aren't virtual functions. We use typecasting to make it appear as if they are. We do this to avoid the virtual function overhead.
answered Aug 04 '15 at 07:24 PM
After more hours that I would like to to admit of searching the source, I came across this: FGenericPlatformMisc::NumberOfCoresIncludingHyperthreads
It detects my cores but despite "IncludingHyperthreads", it's not detecting them.
I posted a bug report with a possible fix HERE.
In the meantime FPlatformMisc::NumberOfCoresIncludingHyperthreads() is a valid solution.
Follow this question
Once you sign in you will be able to subscribe for any updates here