aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2017-09-26 13:00:31 -0700
committerMarat Dukhan <marat@fb.com>2017-09-26 13:00:31 -0700
commit2b24889379602c17d2448c891e25c76d2b039ffc (patch)
tree34dcea721c5052f23ffc4af0c8a35cd63ac09048 /README.md
parenteb3025f389fde8eea801de23ba34b7fdaba15708 (diff)
downloadcpuinfo-2b24889379602c17d2448c891e25c76d2b039ffc.tar.gz
Update README with new ISA detection syntax
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 6 insertions, 10 deletions
diff --git a/README.md b/README.md
index 619af56..7bbde41 100644
--- a/README.md
+++ b/README.md
@@ -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