c++检测cpu内核的数目

int CDomCheck::core_count()
{
    SYSTEM_INFO si;
    GetSystemInfo(&si);
    int count = si.dwNumberOfProcessors;
    return count;
}

 

posted @ 2019-01-01 01:56  daggerx  阅读(936)  评论(0编辑  收藏  举报