我怎样才能得到的WinRT逻辑CPU的数量? [英] How can I get the number of logical CPUs on WinRT?
问题描述
我试图编译升压1.49.0对WinRT的。我知道了下来一个方法:的GetSystemInfo(),这是在升压::线程中使用:: hardware_concurrency()来获取系统上的逻辑处理器的数量
I'm trying to compile Boost 1.49.0 for WinRT. I've got it down to one method: GetSystemInfo(), which is used in boost::thread::hardware_concurrency() to obtain the number of logical processors on the system.
我没有找到任何WinRT中尚未更换。
I haven't found any replacement in WinRT yet.
是否有其他方法我可以使用?
Is there an alternative method I could use?
推荐答案
您可以调用Windows API函数<一个href=\"http://msdn.microsoft.com/en-us/library/windows/desktop/ms724340%28v=vs.85%29.aspx\"><$c$c>GetNativeSystemInfo$c$c>,这是获准在Metro风格的应用程序。
You can call the Windows API function GetNativeSystemInfo
, which is permitted in Metro style apps.
这篇关于我怎样才能得到的WinRT逻辑CPU的数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!