Disable NEON libclcore for AArch64.
On ARMv8/AArch64, we can use the standard libclcore.bc for any precision,
as ASIMD is full IEEE 754 precision.
Change-Id: Iecff433b20f40a7f2272e497ad2e47a2f4b63ef3
diff --git a/cpu_ref/Android.mk b/cpu_ref/Android.mk
index ade3235..fa3d9e1 100644
--- a/cpu_ref/Android.mk
+++ b/cpu_ref/Android.mk
@@ -39,7 +39,7 @@
rsCpuIntrinsicResize.cpp \
rsCpuIntrinsicLUT.cpp
-LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS
+LOCAL_CFLAGS_arm64 += -DARCH_ARM_USE_INTRINSICS -DARCH_ARM64_USE_INTRINSICS -DARCH_ARM64_HAVE_NEON
LOCAL_SRC_FILES_arm64 += \
rsCpuIntrinsics_advsimd_3DLUT.S \
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index e7c68b0..35dfde1 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -436,9 +436,11 @@
switch (prec) {
case bcinfo::RS_FP_Imprecise:
case bcinfo::RS_FP_Relaxed:
-#if defined(ARCH_ARM_HAVE_NEON)
- // NEON-capable devices can use an accelerated math library for all
- // reduced precision scripts.
+#if defined(ARCH_ARM_HAVE_NEON) && !defined(ARCH_ARM64_HAVE_NEON)
+ // NEON-capable ARMv7a devices can use an accelerated math library
+ // for all reduced precision scripts.
+ // ARMv8 does not use NEON, as ASIMD can be used with all precision
+ // levels.
core_lib = bcc::RSInfo::LibCLCoreNEONPath;
#endif
break;
@@ -508,7 +510,7 @@
for (size_t i = 0; i < ME.getExportForEachSignatureCount(); i++) {
char* name = new char[strlen(ME.getExportForEachNameList()[i]) + 1];
- mExportedForEachFuncList.push_back(std::make_pair(name,
+ mExportedForEachFuncList.push_back(std::make_pair(name,
ME.getExportForEachSignatureList()[i]));
}
@@ -1105,7 +1107,7 @@
if (mBoundAllocs) {
delete[] mBoundAllocs;
}
-
+
for (size_t i = 0; i < mExportedForEachFuncList.size(); i++) {
delete[] mExportedForEachFuncList[i].first;
}