Detecting CPU Capability Without Assembly

I considered ways to determine the processor and its capabilities (e.g., SEE, SSE2, etc.).

However, all the methods I found included build code using the cpuid instruction. Given the different build methods in c / C ++ between compilers and even targets (without built-in assembly for 64-bit targets under VC), id would rather avoid this.

Is there any simple library around or OS features (for Windows and Linux) to get this information?

Currently, I am only interested in platforms that use x86 and x86-64 processors, and I defiantly need the support of at least AMD and Intel.

+3
source share
3 answers

EDIT: googled "libcpuid", , Google sourceforge page . , "libcpu".

libcpuid, .


, ​​, crisscross. ++, .

geekinfo.

- , cpuid.

+4

linux peek in/proc/cpuinfo

+1

--- , , -, .

, , , , ( ) . , - - , - .

, ​​ !

0

Source: https://habr.com/ru/post/1725543/


All Articles