aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/RefTensorHandleFactory.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2022-11-23 12:11:32 +0000
committerTeresaARM <teresa.charlinreyes@arm.com>2022-12-14 12:53:00 +0000
commitc30abd843e68dfbd186ca25e8a8ecaefcf95776f (patch)
treee2f17d59df2dbef75cc056dd355560df22e93d78 /src/backends/reference/RefTensorHandleFactory.cpp
parent6d2647df4ce2e15bff8548e74993aa4b12ea8f34 (diff)
downloadarmnn-c30abd843e68dfbd186ca25e8a8ecaefcf95776f.tar.gz
Refactor: Remove m_ImportFlags from RefTensorHandle
The import flags for a RefTensorHandle shouldn't be a data member, as RefTensorHandle can only import from MemorySource::Malloc. Instead, use m_ImportEnabled to determine what to return from GetImportFlags(). Simplifies the code in Import and CanBeImported. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: Ic629858920f7dd32f99ee27f150b81d8b67144cf
Diffstat (limited to 'src/backends/reference/RefTensorHandleFactory.cpp')
-rw-r--r--src/backends/reference/RefTensorHandleFactory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backends/reference/RefTensorHandleFactory.cpp b/src/backends/reference/RefTensorHandleFactory.cpp
index ade27dd733..da3b798d3d 100644
--- a/src/backends/reference/RefTensorHandleFactory.cpp
+++ b/src/backends/reference/RefTensorHandleFactory.cpp
@@ -48,7 +48,7 @@ std::unique_ptr<ITensorHandle> RefTensorHandleFactory::CreateTensorHandle(const
}
else
{
- return std::make_unique<RefTensorHandle>(tensorInfo, m_ImportFlags);
+ return std::make_unique<RefTensorHandle>(tensorInfo);
}
}
@@ -63,7 +63,7 @@ std::unique_ptr<ITensorHandle> RefTensorHandleFactory::CreateTensorHandle(const
}
else
{
- return std::make_unique<RefTensorHandle>(tensorInfo, m_ImportFlags);
+ return std::make_unique<RefTensorHandle>(tensorInfo);
}
}
@@ -87,4 +87,4 @@ MemorySourceFlags RefTensorHandleFactory::GetImportFlags() const
return m_ImportFlags;
}
-} // namespace armnn \ No newline at end of file
+} // namespace armnn