libcpuid is a small C library for x86 CPU detection and feature extraction. Using it, you can:
- ... get the processor vendor, model, brand string, code name, ...
- ... get information about CPU features such as: number of cores or logical CPUs, cache sizes, CPU clock, ...
- ... check if the processor implements a specific instruction set such as the SSE2, 3DNow!, ...
- ... execute the CPUID and RDTSC instructions (portably!) ...
- ... and have this all in your commercial application, without getting into trouble.
It works on Windows, Linux and Mac OS X, both 32-bit and 64-bit flavours. Compiler support includes GCC and Microsoft Visual C++ (and compatible, e.g. Intel C++ compiler).
Go to the download page.
Unrecognized CPUs are generally reported to the dedicated page. In case the problem seems to be more general, you may as well file a bug in the tracker.
There is a quickstart tutorial, which should clear up most topics. For a complete library reference, see the Doxygen-generated documentation.
libcpuid is provided with a BSD-style license. You are free to use it in your commercial applications.
All brand names and product names mentioned here are trademarks or registered trademarks of their respective owners.