diff options
author | Marat Dukhan <marat@fb.com> | 2017-09-26 13:00:31 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2017-09-26 13:00:31 -0700 |
commit | 2b24889379602c17d2448c891e25c76d2b039ffc (patch) | |
tree | 34dcea721c5052f23ffc4af0c8a35cd63ac09048 /README.md | |
parent | eb3025f389fde8eea801de23ba34b7fdaba15708 (diff) | |
download | cpuinfo-2b24889379602c17d2448c891e25c76d2b039ffc.tar.gz |
Update README with new ISA detection syntax
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -15,21 +15,17 @@ Detect if target is a 32-bit or 64-bit ARM system: Check if the host CPU support ARM NEON ```c cpuinfo_initialize(); -#if CPUINFO_ARCH_ARM - if (cpuinfo_isa.neon) { - neon_implementation(arguments); - } -#endif +if (cpuinfo_has_arm_neon()) { + neon_implementation(arguments); +} ``` Check if the host CPU supports x86 AVX ```c cpuinfo_initialize(); -#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64 - if (cpuinfo_isa.avx) { - avx_implementation(arguments); - } -#endif +if (cpuinfo_has_x86_avx) { + avx_implementation(arguments); +} ``` Check if the thread runs on a Cortex-A53 core |