IVGCVSW-3623 Implement NeonTensorHandle::Import

Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I7213788725fd4e4cf1176998604e999d0b7ed6cc
diff --git a/src/backends/neon/NeonTensorHandleFactory.cpp b/src/backends/neon/NeonTensorHandleFactory.cpp
index ff4e238..8296b83 100644
--- a/src/backends/neon/NeonTensorHandleFactory.cpp
+++ b/src/backends/neon/NeonTensorHandleFactory.cpp
@@ -39,19 +39,33 @@
             boost::polymorphic_downcast<IAclTensorHandle*>(&parent), shape, coords);
 }
 
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo) const
+std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
+                                                                           const bool IsMemoryManaged) const
 {
     auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo);
-    tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
+    if (IsMemoryManaged)
+    {
+        tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
+    }
+    // If we are not Managing the Memory then we must be importing
+    tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
+    tensorHandle->SetImportFlags(m_ImportFlags);
 
     return tensorHandle;
 }
 
 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
-                                                                           DataLayout dataLayout) const
+                                                                           DataLayout dataLayout,
+                                                                           const bool IsMemoryManaged) const
 {
     auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo, dataLayout);
-    tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
+    if (IsMemoryManaged)
+    {
+        tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
+    }
+    // If we are not Managing the Memory then we must be importing
+    tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
+    tensorHandle->SetImportFlags(m_ImportFlags);
 
     return tensorHandle;
 }