From de36e4a9c299028e792c3a5bd99ad0816d806077 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 13 Mar 2020 16:26:19 +0000 Subject: IVGCVSW-3726 Upload ArmNN Doxygen files * Upload current ArmNN Doxygen files Signed-off-by: Ryan OShea Change-Id: I8989ed16ee40a99a4495b100bd009cf3e24a7285 --- .../_neon_tensor_handle_factory_8cpp_source.html | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 Documentation/_neon_tensor_handle_factory_8cpp_source.html (limited to 'Documentation/_neon_tensor_handle_factory_8cpp_source.html') diff --git a/Documentation/_neon_tensor_handle_factory_8cpp_source.html b/Documentation/_neon_tensor_handle_factory_8cpp_source.html new file mode 100644 index 0000000000..ec4963809b --- /dev/null +++ b/Documentation/_neon_tensor_handle_factory_8cpp_source.html @@ -0,0 +1,120 @@ + + + + + + + +ArmNN: src/backends/neon/NeonTensorHandleFactory.cpp Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
ArmNN +  NotReleased +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
NeonTensorHandleFactory.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "NeonTensorHandle.hpp"
8 
9 #include <boost/core/ignore_unused.hpp>
10 
11 namespace armnn
12 {
13 
15 
16 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateSubTensorHandle(ITensorHandle& parent,
17  const TensorShape& subTensorShape,
18  const unsigned int* subTensorOrigin)
19  const
20 {
21  const arm_compute::TensorShape shape = armcomputetensorutils::BuildArmComputeTensorShape(subTensorShape);
22 
24  coords.set_num_dimensions(subTensorShape.GetNumDimensions());
25  for (unsigned int i = 0; i < subTensorShape.GetNumDimensions(); ++i)
26  {
27  // Arm compute indexes tensor coords in reverse order.
28  unsigned int revertedIndex = subTensorShape.GetNumDimensions() - i - 1;
29  coords.set(i, boost::numeric_cast<int>(subTensorOrigin[revertedIndex]));
30  }
31 
32  const arm_compute::TensorShape parentShape = armcomputetensorutils::BuildArmComputeTensorShape(parent.GetShape());
33  if (!::arm_compute::error_on_invalid_subtensor(__func__, __FILE__, __LINE__, parentShape, coords, shape))
34  {
35  return nullptr;
36  }
37 
38  return std::make_unique<NeonSubTensorHandle>(
39  boost::polymorphic_downcast<IAclTensorHandle*>(&parent), shape, coords);
40 }
41 
42 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo) const
43 {
44  return NeonTensorHandleFactory::CreateTensorHandle(tensorInfo, true);
45 }
46 
47 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
48  DataLayout dataLayout) const
49 {
50  return NeonTensorHandleFactory::CreateTensorHandle(tensorInfo, dataLayout, true);
51 }
52 
53 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
54  const bool IsMemoryManaged) const
55 {
56  auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo);
57  if (IsMemoryManaged)
58  {
59  tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
60  }
61  // If we are not Managing the Memory then we must be importing
62  tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
63  tensorHandle->SetImportFlags(GetImportFlags());
64 
65  return tensorHandle;
66 }
67 
68 std::unique_ptr<ITensorHandle> NeonTensorHandleFactory::CreateTensorHandle(const TensorInfo& tensorInfo,
69  DataLayout dataLayout,
70  const bool IsMemoryManaged) const
71 {
72  auto tensorHandle = std::make_unique<NeonTensorHandle>(tensorInfo, dataLayout);
73  if (IsMemoryManaged)
74  {
75  tensorHandle->SetMemoryGroup(m_MemoryManager->GetInterLayerMemoryGroup());
76  }
77  // If we are not Managing the Memory then we must be importing
78  tensorHandle->SetImportEnabledFlag(!IsMemoryManaged);
79  tensorHandle->SetImportFlags(GetImportFlags());
80 
81  return tensorHandle;
82 }
83 
85 {
86  static const FactoryId s_Id(NeonTensorHandleFactoryId());
87  return s_Id;
88 }
89 
91 {
92  return GetIdStatic();
93 }
94 
96 {
97  return true;
98 }
99 
101 {
102  return 0;
103 }
104 
106 {
107  return 0;
108 }
109 
110 } // namespace armnn
+
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:43
+ +
static const FactoryId & GetIdStatic()
+ +
std::unique_ptr< ITensorHandle > CreateSubTensorHandle(ITensorHandle &parent, const TensorShape &subTensorShape, const unsigned int *subTensorOrigin) const override
+
virtual TensorShape GetShape() const =0
+
constexpr const char * NeonTensorHandleFactoryId()
+
ITensorHandleFactory::FactoryId FactoryId
+
std::array< unsigned int, MaxNumOfTensorDimensions > Coordinates
+
unsigned int MemorySourceFlags
+
std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const override
+ + + +
DataLayout
Definition: Types.hpp:48
+ + +
const FactoryId & GetId() const override
+
MemorySourceFlags GetImportFlags() const override
+
MemorySourceFlags GetExportFlags() const override
+
+
+ + + + -- cgit v1.2.1