IVGCVSW-3656 Make the reference backend optional
* Made the build of the reference backend depend on a new ARMCOMPUTEREF
macro
* Made the relevant targets dependent on the ref backend
* Moved Cl and Neon static registry initializers to separate files
* Wrapped some of the unit tests into proper ifdefs where necessary
Change-Id: I7f2c42699682630233a4c4b6aed2f005083de189
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/backends/neon/backend.mk b/src/backends/neon/backend.mk
index 9ceb843..bf7e25d 100644
--- a/src/backends/neon/backend.mk
+++ b/src/backends/neon/backend.mk
@@ -7,7 +7,7 @@
# in the Android build and it is picked up by the Android.mk
# file in the root of ArmNN
-# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk
+# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED is declared in android-nn-driver/Android.mk)
ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1)
# ARMNN_COMPUTE_NEON_ENABLED == 1
@@ -17,6 +17,7 @@
NeonBackend.cpp \
NeonInterceptorScheduler.cpp \
NeonLayerSupport.cpp \
+ NeonRegistryInitializer.cpp \
NeonTensorHandleFactory.cpp \
NeonTimer.cpp \
NeonWorkloadFactory.cpp \
@@ -71,7 +72,7 @@
# in the Android unit test build (armnn-tests) and it is picked
# up by the Android.mk file in the root of ArmNN
-# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk
+# The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED is declared in android-nn-driver/Android.mk)
ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1)
# ARMNN_COMPUTE_NEON_ENABLED == 1
@@ -83,11 +84,15 @@
test/NeonJsonPrinterTests.cpp \
test/NeonLayerSupportTests.cpp \
test/NeonLayerTests.cpp \
- test/NeonMemCopyTests.cpp \
test/NeonOptimizedNetworkTests.cpp \
test/NeonRuntimeTests.cpp \
test/NeonTimerTest.cpp
+ifeq ($(ARMNN_COMPUTE_REF_ENABLED),1)
+BACKEND_TEST_SOURCES += \
+ test/NeonMemCopyTests.cpp
+endif # ARMNN_COMPUTE_REF_ENABLED == 1
+
else
# ARMNN_COMPUTE_NEON_ENABLED == 0