19 #if defined(__aarch64__) || defined(__arm__)
20 #if defined(__TIZEN__) || defined(__ANDROID__) || defined(__linux__)
21 #include <asm/hwcap.h>
25 #if !defined(__APPLE__)
28 #define HWCAP_ASIMD 0x1
29 #if defined(__aarch64__)
30 #define getauxval(x) (HWCAP_ASIMD)
32 #define getauxval(x) (0x0)
43 gint neon_available = 0;
45 #if defined(__aarch64__) || defined(__arm__)
48 #if defined(__aarch64__)
49 hwcap_flag = HWCAP_ASIMD;
50 #elif defined(__arm__)
51 hwcap_flag = HWCAP_NEON;
54 if (getauxval (AT_HWCAP) & hwcap_flag) {
57 neon_available = -EINVAL;
61 return neon_available;