append GetCpuInfo test program
This commit is contained in:
parent
250a044d53
commit
bfd265e1f8
3
CMakeLists.txt
Normal file
3
CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
add_executable(GetCpuInfo GetCpuInfo.cpp)
|
||||||
|
|
||||||
|
target_link_libraries(GetCpuInfo CMCore CMPlatform)
|
17
GetCpuInfo.cpp
Normal file
17
GetCpuInfo.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<hgl/platform/CpuInfo.h>
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
hgl::CpuInfo ci;
|
||||||
|
|
||||||
|
hgl::GetCpuInfo(&ci);
|
||||||
|
|
||||||
|
std::cout<<"CPU: "<<ci.cpu_count<<std::endl;
|
||||||
|
std::cout<<"Core: "<<ci.core_count<<std::endl;
|
||||||
|
std::cout<<"Logical Core: "<<ci.logical_core_count<<std::endl;
|
||||||
|
|
||||||
|
std::cout<<std::endl;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user