diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2022-11-23 12:11:32 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-12-14 12:53:00 +0000 |
commit | c30abd843e68dfbd186ca25e8a8ecaefcf95776f (patch) | |
tree | e2f17d59df2dbef75cc056dd355560df22e93d78 /src/backends/reference/test | |
parent | 6d2647df4ce2e15bff8548e74993aa4b12ea8f34 (diff) | |
download | armnn-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/test')
-rw-r--r-- | src/backends/reference/test/RefTensorHandleTests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backends/reference/test/RefTensorHandleTests.cpp b/src/backends/reference/test/RefTensorHandleTests.cpp index 6f608e8541..b5fcc212a9 100644 --- a/src/backends/reference/test/RefTensorHandleTests.cpp +++ b/src/backends/reference/test/RefTensorHandleTests.cpp @@ -137,7 +137,7 @@ TEST_CASE("RefTensorHandleFactoryImport") TEST_CASE("RefTensorHandleImport") { TensorInfo info({ 1, 1, 2, 1 }, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); handle.Manage(); handle.Allocate(); @@ -224,7 +224,7 @@ TEST_CASE("TestManagedConstTensorHandle") TEST_CASE("CheckSourceType") { TensorInfo info({1}, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); int* testPtr = new int(4); @@ -243,7 +243,7 @@ TEST_CASE("CheckSourceType") TEST_CASE("ReusePointer") { TensorInfo info({1}, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); int* testPtr = new int(4); @@ -258,7 +258,7 @@ TEST_CASE("ReusePointer") TEST_CASE("MisalignedPointer") { TensorInfo info({2}, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); // Allocate a 2 int array int* testPtr = new int[2]; @@ -274,7 +274,7 @@ TEST_CASE("MisalignedPointer") TEST_CASE("CheckCanBeImported") { TensorInfo info({1}, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); int* testPtr = new int(4); @@ -291,7 +291,7 @@ TEST_CASE("CheckCanBeImported") TEST_CASE("MisalignedCanBeImported") { TensorInfo info({2}, DataType::Float32); - RefTensorHandle handle(info, static_cast<unsigned int>(MemorySource::Malloc)); + RefTensorHandle handle(info); // Allocate a 2 int array int* testPtr = new int[2]; |