Is there a way to reliably detect the total number of CPU cores?

后端 未结 4 1691
北海茫月
北海茫月 2021-01-18 05:57

I need a reliable way to detect how many CPU cores are on a computer. I am creating a numerically intense simulation C# application and want to create the maximum number of

4条回答
  •  半阙折子戏
    2021-01-18 06:25

    See Detecting the number of processors

    Alternatively, use the GetLogicalProcessorInformation() Win32 API: http://msdn.microsoft.com/en-us/library/ms683194(VS.85).aspx

提交回复
热议问题