UInt32 GetNumberOfProcessors()
{ // We need to know how many threads we can use. // By default the process is assigned to one group. // So we get the number of logical processors (threads) // assigned to current process in the current group. // Group size can be smaller than total number logical processors, for exammple, 2x36
CProcessAffinity pa;
if (pa.Get() && pa.processAffinityMask != 0) return pa.GetNumProcessThreads();
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo); // the number of logical processors in the current group return (UInt32)systemInfo.dwNumberOfProcessors;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.