以下代码对检查CPU是否支持SSE3指令集有效吗?IsProcessorFeaturePresent()在Windows XP上显然无法使用该功能(请参阅http://msdn.microsoft.com/zh-cn/library/ms724482(v=vs.85).aspx)。bool CheckSSE3(){ int CPUInfo[4] = {-1}; //-- Get number of valid info ids __cpuid(CPUInfo, 0); int nIds = CPUInfo[0]; //-- Get info for id "1" if (nIds >= 1) { __cpuid(CPUInfo, 1); bool bSSE3NewInstructions = (CPUInfo[2] & 0x1) || false; return bSSE3NewInstructions; } return false; }
3 回答
- 3 回答
- 0 关注
- 1194 浏览
添加回答
举报
0/150
提交
取消