我怎样才能得到的WinRT逻辑CPU的数量?

我怎样才能得到的WinRT逻辑CPU的数量?

问题描述:

我试图编译升压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函数GetNativeSystemInfo$c$c>,这是获准在Metro风格的应用程序。

You can call the Windows API function GetNativeSystemInfo, which is permitted in Metro style apps.