MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / CPUCount

Function CPUCount

Engine/source/platformPOSIX/POSIXCPUInfo.cpp:234–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232namespace CPUInfo
233{
234 EConfig CPUCount(U32 &logical, U32 &physical)
235 {
236 // We don't set logical or physical here because it's already been determined by this point
237 if (Platform::SystemInfo.processor.isHyperThreaded && Platform::SystemInfo.processor.numPhysicalProcessors == 1)
238 {
239 return CONFIG_SingleCoreHTEnabled;
240 }
241 else if (!Platform::SystemInfo.processor.isHyperThreaded && Platform::SystemInfo.processor.numPhysicalProcessors > 1)
242 {
243 return CONFIG_MultiCoreAndHTNotCapable;
244 }
245 else if (!Platform::SystemInfo.processor.isHyperThreaded && Platform::SystemInfo.processor.numPhysicalProcessors == 1)
246 {
247 return CONFIG_SingleCoreAndHTNotCapable;
248 }
249
250 return CONFIG_MultiCoreAndHTEnabled;
251 }
252}; // namespace CPUInfo
253
254#endif

Callers 2

SetProcessorInfoFunction · 0.50
ThreadPoolMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected