Opis forum
sprawdzanie czy procesor obsluguje instrukcje poszczegolne:
CheckSupportedInstructions();
void CheckSupportedInstructions()
{
int CPUInfo[4] = {-1};
__cpuid(CPUInfo, 1);
if(CPUInfo[3] & ((int)1<<23))
{
cout<<"Procesor obsluguje instrukcje : MMX\n";
}
if(CPUInfo[3] & ((int)1<<25))
{
cout<<"Procesor obsluguje instrukcje : SSE\n";
}
if(CPUInfo[3] & ((int)1<<26))
{
cout<<"Procesor obsluguje instrukcje : SSE2\n";
}
if(CPUInfo[2] & ((int)1<<9))
{
cout<<"Procesor obsluguje instrukcje : SSE3\n";
}
if(CPUInfo[2] & ((int)1<<19))
{
cout<<"Procesor obsluguje instrukcje : SSE4\n";
}
}Offline