aboutsummaryrefslogtreecommitdiff
path: root/src/dynamic/sample/SampleTensorHandle.cpp
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2020-08-19 14:14:36 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2020-08-19 18:02:57 +0000
commitc84e45d933a9b45810a3bb88f6873f4eddca0975 (patch)
tree9692d2fd8b58a14466382433b5eec8c6c4e284de /src/dynamic/sample/SampleTensorHandle.cpp
parenta2493a0483f19fe9654be63a15badfb0834aaff6 (diff)
downloadarmnn-c84e45d933a9b45810a3bb88f6873f4eddca0975.tar.gz
IVGCVSW-5208 Wrap SampleDynamicBackend in own namespace
* to prevent name clashes with armnn Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I10b394d47e58cec45bacd489938ee048b7c9776e
Diffstat (limited to 'src/dynamic/sample/SampleTensorHandle.cpp')
-rw-r--r--src/dynamic/sample/SampleTensorHandle.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/dynamic/sample/SampleTensorHandle.cpp b/src/dynamic/sample/SampleTensorHandle.cpp
index fb4eddcb55..c00861871c 100644
--- a/src/dynamic/sample/SampleTensorHandle.cpp
+++ b/src/dynamic/sample/SampleTensorHandle.cpp
@@ -5,23 +5,23 @@
#include "SampleTensorHandle.hpp"
-namespace armnn
+namespace sdb // sample dynamic backend
{
-SampleTensorHandle::SampleTensorHandle(const TensorInfo &tensorInfo,
+SampleTensorHandle::SampleTensorHandle(const armnn::TensorInfo &tensorInfo,
std::shared_ptr<SampleMemoryManager> &memoryManager)
: m_TensorInfo(tensorInfo),
m_MemoryManager(memoryManager),
m_Pool(nullptr),
m_UnmanagedMemory(nullptr),
- m_ImportFlags(static_cast<MemorySourceFlags>(MemorySource::Undefined)),
+ m_ImportFlags(static_cast<armnn::MemorySourceFlags>(armnn::MemorySource::Undefined)),
m_Imported(false)
{
}
-SampleTensorHandle::SampleTensorHandle(const TensorInfo& tensorInfo,
- MemorySourceFlags importFlags)
+SampleTensorHandle::SampleTensorHandle(const armnn::TensorInfo& tensorInfo,
+ armnn::MemorySourceFlags importFlags)
: m_TensorInfo(tensorInfo),
m_MemoryManager(nullptr),
m_Pool(nullptr),
@@ -65,8 +65,9 @@ void SampleTensorHandle::Allocate()
}
else
{
- throw InvalidArgumentException("SampleTensorHandle::Allocate Trying to allocate a SampleTensorHandle"
- "that already has allocated memory.");
+ throw armnn::InvalidArgumentException("SampleTensorHandle::Allocate Trying to allocate a "
+ "SampleTensorHandle that already has allocated "
+ "memory.");
}
}
@@ -87,12 +88,12 @@ void* SampleTensorHandle::GetPointer() const
}
}
-bool SampleTensorHandle::Import(void* memory, MemorySource source)
+bool SampleTensorHandle::Import(void* memory, armnn::MemorySource source)
{
- if (m_ImportFlags & static_cast<MemorySourceFlags>(source))
+ if (m_ImportFlags & static_cast<armnn::MemorySourceFlags>(source))
{
- if (source == MemorySource::Malloc)
+ if (source == armnn::MemorySource::Malloc)
{
// Check memory alignment
constexpr uintptr_t alignment = sizeof(size_t);
@@ -147,4 +148,4 @@ void SampleTensorHandle::CopyInFrom(const void* src)
memcpy(dest, src, m_TensorInfo.GetNumBytes());
}
-}
+} // namespace sdb