Go to file
2024-02-21 13:48:15 +08:00
LICENSE Create LICENSE 2024-02-21 13:01:59 +08:00
README.md Update README.md 2024-02-21 13:48:15 +08:00

ruapu

Detect cpu isa features with single-file

CPU x86, x86-64
arm, aarch64
#define RUAPU_IMPLEMENTATION
#include "ruapu.h"

int main()
{
    // initialize ruapu once
    ruapu_init();

    // now, tell me if this cpu has avx2
    int has_avx2 = ruapu_supports("avx2");

    return 0;
}
OS Windows
Linux
macOS
Android
iOS
Compiler GCC
Clang
MSVC
MinGW

Let's ruapu

Compile ruapu test program

# GCC / MinGW
gcc main.c -o ruapu
# Clang
clang main.c -o ruapu
# MSVC
cl.exe /Fe: ruapu.exe main.c

Run ruapu in command line

./ruapu 
mmx = 1
sse = 1
sse2 = 1
sse3 = 1
ssse3 = 1
sse41 = 1
sse42 = 1
sse4a = 1
xop = 0
... more lines omitted ...