Commit af0cf9fb authored by Felix Paul Kühne's avatar Felix Paul Kühne

src/misc: added runtime NEON detection code for Android

parent dbc3a763
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
#ifdef __ANDROID__
#include <cpu-features.h>
#endif
#if defined(__OpenBSD__) && defined(__powerpc__) #if defined(__OpenBSD__) && defined(__powerpc__)
#include <sys/param.h> #include <sys/param.h>
...@@ -316,6 +319,11 @@ out: ...@@ -316,6 +319,11 @@ out:
#elif defined ( __arm__) #elif defined ( __arm__)
#ifdef __ARM_NEON__ #ifdef __ARM_NEON__
i_capabilities |= CPU_CAPABILITY_NEON; i_capabilities |= CPU_CAPABILITY_NEON;
#elif defined (CAN_COMPILE_NEON)
#ifdef __ANDROID__
if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON)
i_capabilities |= CPU_CAPABILITY_NEON;
#endif
#endif #endif
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment