How to get number of cores in Win32?

前端 未结 5 912
渐次进展
渐次进展 2020-12-11 17:50

I\'m writing a program in C on windows that needs to run as many threads as available cores. But I dont know how to get the number of cores. Any ideas?

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 18:32

    Even though the question deals with .NET and yours with C, the basic responses should help:

    Detecting the number of processors

提交回复
热议问题