IVGCVSW-5819 5820 5821 Add MemorySourceFlags to TensorHandleFactoryRegistry::GetFactory

 * Modify Layer::CreateTensorHandles to include MemorySource
 * Modify INetworkProperties to add MemorySource
 * Disable Neon/Cl fallback tests until full import implementation complete

Change-Id: Ia4fff6ea3d4bf6afca33aae358125ccaec7f9a38
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index fc203e6..55c5797 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -28,14 +28,35 @@
 
 struct INetworkProperties
 {
-    INetworkProperties(bool importEnabled = false, bool exportEnabled = false, bool asyncEnabled = false)
-        : m_ImportEnabled(importEnabled),
-          m_ExportEnabled(exportEnabled),
-          m_AsyncEnabled(asyncEnabled) {}
+    ARMNN_DEPRECATED_MSG("Please use INetworkProperties constructor with MemorySource argument")
+    INetworkProperties(bool importEnabled = false,
+                       bool exportEnabled = false,
+                       bool asyncEnabled = false)
+        : m_ImportEnabled(importEnabled)
+        , m_ExportEnabled(exportEnabled)
+        , m_AsyncEnabled(asyncEnabled)
+        , m_InputSource(MemorySource::Undefined)
+        , m_OutputSource(MemorySource::Undefined)
+        {}
 
+    INetworkProperties(bool asyncEnabled,
+                       MemorySource m_InputSource,
+                       MemorySource m_OutputSource)
+        : m_ImportEnabled(m_InputSource != MemorySource::Undefined)
+        , m_ExportEnabled(m_OutputSource != MemorySource::Undefined)
+        , m_AsyncEnabled(asyncEnabled)
+        , m_InputSource(m_InputSource)
+        , m_OutputSource(m_OutputSource)
+        {}
+
+    /// Deprecated and will be removed in future release.
     const bool m_ImportEnabled;
+    /// Deprecated and will be removed in future release.
     const bool m_ExportEnabled;
+
     const bool m_AsyncEnabled;
+    const MemorySource m_InputSource;
+    const MemorySource m_OutputSource;
 
     virtual ~INetworkProperties() {}
 };
diff --git a/include/armnn/MemorySources.hpp b/include/armnn/MemorySources.hpp
index 5389098..53746a3 100644
--- a/include/armnn/MemorySources.hpp
+++ b/include/armnn/MemorySources.hpp
@@ -5,19 +5,13 @@
 
 #pragma once
 
+#include <armnn/Types.hpp>
+
 #include <type_traits>
 
 namespace armnn
 {
 
-enum class MemorySource
-{
-    Undefined = 0,
-    Malloc = 1,
-    DmaBuf = 2,
-    DmaBufProtected = 4
-};
-
 using MemorySourceFlags = unsigned int;
 
 template<typename T>
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index 2fd40b8..bc41003 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -182,6 +182,15 @@
     InferAndValidate = 1
 };
 
+/// Define the Memory Source to reduce copies
+enum class MemorySource : uint32_t
+{
+    Undefined = 0,
+    Malloc = 1,
+    DmaBuf = 2,
+    DmaBufProtected = 4
+};
+
 /// Each backend should implement an IBackend.
 class IBackend
 {