libcpuid alternatives and similar libraries
Based on the "Miscellaneous" category.
Alternatively, view libcpuid alternatives based on common mentions on social networks and blogs.
-
ZXing
An open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. [Apache] -
RE2
A software library for regular expressions via a finite-state machine using automata theory. -
Klib
Small and lightweight implementations of common algorithms and data structures. [MIT] -
ZBar
A barcode scanner library, which allows to scan photos/images/video streams for barcodes and return their value. [LGPL2] -
Serial Communication Library
Cross-platform, Serial Port library written in C++. [MIT] -
American fuzzy lop
Crazy fuzzing tool that automatically discovers bugs given time and minimal example input. [Apache2] -
PHP-CPP
A library to build PHP extensions with C++. [Apache2] website -
Better Enums
Reflective enums (to string, iteration). Single header. [BSD] website -
c-smart-pointers
Smart pointers for the (GNU) C programming language. [MIT] -
Experimental Boost.DI
C++14 Dependency Injection Library -
UNITS
a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. -
constexpr-8cc
Compile-time C Compiler implemented as C++14 constant expressions -
cxx-prettyprint
A pretty printing library for C++ containers. [Boost] -
outcome
Provides very lightweight outcome<T> and result<T> (non-Boost edition) -
CppVerbalExpressions
C++ regular expressions made easy. [MIT] -
Better String
An alternative to the string library for C which is more functional and does not have buffer overflow overrun problems. Also includes a C++ wrapper. [BSD, GPL2] -
value-category-cheatsheet
A PDF cheatsheet for lvalues, rvalues, and the like. [Jank copyleft] -
kangaru
Kangaru is a dependency injection container library for C++11 and C++14 -
libusb
A universal USB library which allows for portable access to USB devices. [LGPL2] -
gcc-poison
A simple header file for developers to ban unsafe C/C++ functions from applications. -
StrTk
A C++ library consisting of high performance string processing routines. [MIT] -
ub-canaries
A collection of C/C++ programs that try to get compilers to exploit undefined behavior. -
Boost.Signals
An implementation of a managed signals and slots system. [Boost] -
QtVerbalExpressions
This Qt lib is based off of the C++ VerbalExpressions library. [MIT] -
access_profiler
A tool to count accesses to member variables in c++ programs. [GPL3] -
FastFormat
Fast, Safe C++ Formatting inspired by log4j and Pantheios [Simplified BSD] -
CommonPP
Small library helping you with basic stuff like getting metrics out of your code, thread naming, etc.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of libcpuid or a related project?
README
libcpuid
libcpuid provides CPU identification for the x86 (and x86_64). For details about the programming API, you might want to take a look at the project's website on sourceforge (http://libcpuid.sourceforge.net/). There you'd find a short tutorial, as well as the full API reference.
Configuring after checkout
Under Linux, where you download the sources, there's no configure script to run. This is because it isn't a good practice to keep such scripts in a source control system. To create it, you need to run the following commands once, after you checkout the libcpuid sources from github:
1. run "libtoolize"
2. run "autoreconf --install"
You need to have autoconf
, automake
and libtool
installed.
After that you can run ./configure
and make
- this will build
the library.
make dist
will create a tarball (with "configure" inside) with the
sources.
Prerequisites
Using libcpuid requires no dependencies on any of the supported OSes. Building it requires the aforementioned libtool and autotools commands to be available, which is a matter of installing a few common packages with related names (e.g. automake, autoconf, libtool). It also requires a POSIX-compatible shell. On NetBSD, you may need to install one (credits to @brucelilly):
- Install a POSIX-compatible shell such as ksh93 (pkg_add ast-ksh || pkgin in ast-ksh)
- export CONFIG_SHELL=/usr/pkg/bin/ksh93 (substitute the correct path if required)
- Follow the regular Linux instructions
Testing
After any change to the detection routines or match tables, it's always
a good idea to run make test
. If some test fails, and you're confident
that the test is wrong and needs fixing, run make fix-tests
.
You can also add a new test (which is basically a file containing
the raw CPUID data and the expected decoded items) by using
tests/create_test.py
. The workflow there is as follows:
- Run "cpuid_tool" with no arguments. It will tell you that it has written a pair of files, raw.txt and report.txt. Ensure that report.txt contains meaningful data.
- Run "tests/create_test.py raw.txt report.txt > «my-cpu».test"
- Use a proper descriptive name for the test (look into tests/amd and tests/intel to get an idea) and copy your test file to an appropriate place within the tests directory hierarchy.
For non-developers, who still want to contribute tests for the project, use this page to report misdetections or new CPUs that libcpuid doesn't handle well yet.
Users
So far, I'm aware of the following projects which utilize libcpuid (listed alphabetically):
- CPU-X (https://github.com/X0rg/CPU-X)
- fre:ac (https://www.freac.org/)
- I-Nex (https://github.com/i-nex/I-Nex)
- Multiprecision Computing Toolbox for MATLAB (https://www.advanpix.com/)
- ucbench (http://anrieff.net/ucbench)
We'd love to hear from you if you are also using libcpuid and want your project listed above.
Downloads
You can find latest versioned archives here, with binaries for macOS and Windows.
Binary packages
Also, libcpuid is available for following systems in official repositories:
- Debian (since version 11 "Bullseye"):
apt install cpuidtool libcpuid14 libcpuid-dev
- Fedora (since version 25):
dnf install libcpuid libcpuid-devel
- FreeBSD (since version 11):
pkg install libcpuid
- OpenMandriva Lx (since version 4.0 "Nitrogen"):
dnf install libcpuid-tools libcpuid14 libcpuid-devel
- openSUSE Leap (since version 15.1):
zypper install libcpuid-tools libcpuid14 libcpuid-devel
- Solus:
eopkg install libcpuid libcpuid-devel
- Ubuntu (since version 20.04 "Focal Fossa") :
apt install cpuidtool libcpuid14 libcpuid-dev
Build tool
- Vcpkg:
vcpkg install cpuid