aboutsummaryrefslogtreecommitdiff
path: root/src/backends/neon/NeonTensorHandleFactory.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2020-03-19 17:03:14 +0000
committerJim Flynn <jim.flynn@arm.com>2020-03-19 17:03:14 +0000
commit0e2bab81442ee6cc2b94e4f7881ed0c5c6af65e7 (patch)
treeb0af08b5a0b74149fca422151127ac6310385399 /src/backends/neon/NeonTensorHandleFactory.cpp
parent8c3259fa007d43fcc5ea56fe6928526dbe79f3c0 (diff)
downloadarmnn-0e2bab81442ee6cc2b94e4f7881ed0c5c6af65e7.tar.gz
Creating gh-pages documentation for ArmNN
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/backends/neon/NeonTensorHandleFactory.cpp')
-rw-r--r--src/backends/neon/NeonTensorHandleFactory.cpp110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/backends/neon/NeonTensorHandleFactory.cpp b/src/backends/neon/NeonTensorHandleFactory.cpp
deleted file mode 100644
index d5fef4ea95..0000000000
--- a/src/backends/neon/NeonTensorHandleFactory.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-
-#include "NeonTensorHandleFactory.hpp"
-#include "NeonTensorHandle.hpp"
-
-#include <boost/core/ignore_unused.hpp>
-
-namespace armnn
-{
-
-using FactoryId = ITensorHandleFactory::FactoryId;
-
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateSubTensorHandle(ITensorHandle& parent,
- const TensorShape& subTensorShape,
- const unsigned int* subTensorOrigin)
- const
-{
- const arm_compute::TensorShape shape = armcomputetensorutils::BuildArmComputeTensorShape(subTensorShape);
-
- arm_compute::Coordinates coords;
- coords.set_num_dimensions(subTensorShape.GetNumDimensions());
- for (unsigned int i = 0; i < subTensorShape.GetNumDimensions(); ++i)
- {
- // Arm compute indexes tensor coords in reverse order.
- unsigned int revertedIndex = subTensorShape.GetNumDimensions() - i - 1;
- coords.set(i, boost::numeric_cast<int>(subTensorOrigin[revertedIndex]));
- }
-
- const arm_compute::TensorShape parentShape = armcomputetensorutils::BuildArmComputeTensorShape(parent.GetShape());
- if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
- {
- return nullptr;
- }
-
- return std::make_unique<NeonSubTensorHandle>(
- boost::polymorphic_downcast<IAclTensorHandle*>(&parent), shape, coords);
-}
-
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo) const
-{
- return NeonTensorHandleFactory::CreateTensorHandle(tensorInfo, true);
-}
-
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
- DataLayout dataLayout) const
-{
- return NeonTensorHandleFactory::CreateTensorHandle(tensorInfo, dataLayout, true);
-}
-
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
- const bool IsMemoryManaged) const
-{
- auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo);
- if (IsMemoryManaged)
- {
- tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
- }
- // If we are not Managing the Memory then we must be importing
- tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
- tensorHandle->SetImportFlags(GetImportFlags());
-
- return tensorHandle;
-}
-
-std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
- DataLayout dataLayout,
- const bool IsMemoryManaged) const
-{
- auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo, dataLayout);
- if (IsMemoryManaged)
- {
- tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
- }
- // If we are not Managing the Memory then we must be importing
- tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
- tensorHandle->SetImportFlags(GetImportFlags());
-
- return tensorHandle;
-}
-
-const FactoryId& NeonTensorHandleFactory::GetIdStatic()
-{
- static const FactoryId s_Id(NeonTensorHandleFactoryId());
- return s_Id;
-}
-
-const FactoryId& NeonTensorHandleFactory::GetId() const
-{
- return GetIdStatic();
-}
-
-bool NeonTensorHandleFactory::SupportsSubTensors() const
-{
- return true;
-}
-
-MemorySourceFlags NeonTensorHandleFactory::GetExportFlags() const
-{
- return 0;
-}
-
-MemorySourceFlags NeonTensorHandleFactory::GetImportFlags() const
-{
- return 0;
-}
-
-} // namespace armnn