CODE_OF_CONDUCT.md | ||
LICENSE | ||
README.md |
ruapu
Detect cpu ISA features with single-file
CPU | ✅ x86, x86-64 ✅ arm, aarch64 |
|
OS | ✅ Windows ✅ Linux ✅ macOS ✅ Android ✅ iOS | |
Compiler | ✅ GCC ✅ Clang ✅ MSVC ✅ MinGW |
Let's ruapu
Compile ruapu test program
|
Run ruapu in command line
|
Features
- Detect CPU ISA with single-file
sse2
,avx
,avx512f
,neon
, etc. - Detect vendor extended ISA
apple
amx
, risc-v vendor ISA, etc. - Detect richer ISA on Windows ARM
IsProcessorFeaturePresent()
returns little ISA information - Detect
x86-avx512
on macOS correctly macOS hides it incpuid
- Detect new CPU's ISA on old systems
they are usually not exposed in
auxv
orMISA
- Detect CPU hidden ISA
fma4
on zen1, ISA in hypervisor, etc.
Supported ISA (more is comming ... :)
CPU | ISA |
---|---|
x86 | mmx sse sse2 sse3 ssse3 sse41 sse42 sse4a xop avx f16c fma avx2 avx512f avx512bw avx512cd avx512dq avx512vl avx512vnni avx512bf16 avx512ifma avx512vbmi avx512vbmi2 avx512fp16 avxvnni avxvnniint8 avxifma |
arm | edsp neon vfpv4 |
aarch64 | neon vfpv4 cpuid asimdhp asimddp asimdfhm bf16 i8mm sve sve2 svebf16 svei8mm svef32mm |
mips | |
powerpc | |
loongarch | |
risc-v |
Techniques inside ruapu
ruapu is implemented in C language to ensure the widest possible portability.
ruapu determines whether the CPU supports certain instruction sets by trying to execute instructions and detecting whether an Illegal Instruction
exception occurs. ruapu does not rely on the cpuid instructions and registers related to the CPU architecture, nor does it rely on the MISA
information and system calls of the operating system. This can help us get more detailed CPU ISA information.
License
MIT License