[ Programing ]/API

CPU 갯수 알아보기

Mister_Q 2011. 5. 27. 14:08

SYSTEM_INFO systemInfo;
GetSystemInfo( &systemInfo );

int maxProcessors = static_cast<int>( systemInfo.dwNumberOfProcessors );

// cpu 갯수 만큼 생성
for( int i = 0; i < maxProcessors; ++i )
{
     ...
}




출처 : heagi2.blog.me/100064293628

저작자표시 비영리 동일조건 (새창열림)