From f86be93b7492b381370cae7bf71eca8572a0cbae Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 24 Aug 2021 16:27:15 +0100 Subject: IVGCVSW-5924 Update 21.08 Doxygen Documents * Also updated latest symlink. Signed-off-by: Matthew Sloyan Change-Id: If9b4e0e52464abdf797b9eb858ae19bcc64c2aea --- 21.08/_ref_backend_8cpp_source.xhtml | 156 +++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 21.08/_ref_backend_8cpp_source.xhtml (limited to '21.08/_ref_backend_8cpp_source.xhtml') diff --git a/21.08/_ref_backend_8cpp_source.xhtml b/21.08/_ref_backend_8cpp_source.xhtml new file mode 100644 index 0000000000..e11e1afff0 --- /dev/null +++ b/21.08/_ref_backend_8cpp_source.xhtml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + +ArmNN: src/backends/reference/RefBackend.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RefBackend.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "RefBackend.hpp"
7 #include "RefBackendId.hpp"
8 #include "RefWorkloadFactory.hpp"
9 #include "RefLayerSupport.hpp"
11 
16 
17 #include <Optimizer.hpp>
18 
19 namespace armnn
20 {
21 
23 {
24  static const BackendId s_Id{RefBackendId()};
25  return s_Id;
26 }
27 
29  const IBackendInternal::IMemoryManagerSharedPtr& memoryManager) const
30 {
31  return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
32 }
33 
35  class TensorHandleFactoryRegistry& tensorHandleFactoryRegistry) const
36 {
37  auto memoryManager = std::make_shared<RefMemoryManager>();
38 
39  tensorHandleFactoryRegistry.RegisterMemoryManager(memoryManager);
40  tensorHandleFactoryRegistry.RegisterFactory(std::make_unique<RefTensorHandleFactory>(memoryManager));
41 
42  return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
43 }
44 
46 {
47  return IBackendContextPtr{};
48 }
49 
52 {
54 }
55 
57 {
58  return std::make_unique<RefMemoryManager>();
59 }
60 
62 {
63  return Optimizations{};
64 }
65 
67 {
68  static ILayerSupportSharedPtr layerSupport{new RefLayerSupport};
69  return layerSupport;
70 }
71 
72 bool RefBackend::HasCapability(BackendCapability capabilityClass) const
73 {
74  auto search = oldCpuRefCapabilities.find(capabilityClass);
75  if (search != oldCpuRefCapabilities.end())
76  {
77  return true;
78  }
79  return false;
80 }
81 
83 {
84  OptimizationViews optimizationViews;
85 
86  optimizationViews.AddUntouchedSubgraph(SubgraphView(subgraph));
87 
88  return optimizationViews;
89 }
90 
91 std::vector<ITensorHandleFactory::FactoryId> RefBackend::GetHandleFactoryPreferences() const
92 {
93  return std::vector<ITensorHandleFactory::FactoryId> { RefTensorHandleFactory::GetIdStatic() };
94 }
95 
97 {
98  auto memoryManager = std::make_shared<RefMemoryManager>();
99 
100  registry.RegisterMemoryManager(memoryManager);
101  registry.RegisterFactory(std::make_unique<RefTensorHandleFactory>(memoryManager));
102 }
103 
104 } // namespace armnn
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
+ +
static const FactoryId & GetIdStatic()
+ +
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
+
std::vector< OptimizationPtr > Optimizations
+
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
Definition: RefBackend.cpp:56
+
bool HasCapability(BackendCapability capabilityClass) const override
Returns true if backend support the capability false otherwise.
Definition: RefBackend.cpp:72
+ +
constexpr const char * RefBackendId()
+
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
+
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
Definition: RefBackend.cpp:66
+ +
static const BackendId & GetIdStatic()
Definition: RefBackend.cpp:22
+
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &registry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
Definition: RefBackend.cpp:96
+
Copyright (c) 2021 ARM Limited and Contributors.
+
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
+
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
Definition: RefBackend.cpp:45
+ +
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
Definition: RefBackend.cpp:50
+ + +
The SubgraphView class represents a subgraph of a Graph.
+
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph) const override
Definition: RefBackend.cpp:82
+
const std::set< armnn::BackendCapability > oldCpuRefCapabilities
Definition: RefBackend.hpp:19
+ +
std::unique_ptr< armnn::profiling::IBackendProfiling > IBackendProfilingPtr
+
BackendCapability
BackendCapability class.
Definition: Types.hpp:221
+
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
+ +
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
Definition: RefBackend.cpp:28
+
void AddUntouchedSubgraph(SubgraphView &&subgraph)
+ + +
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
+ + +
IBackendInternal::Optimizations GetOptimizations() const override
Definition: RefBackend.cpp:61
+
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
Definition: RefBackend.cpp:91
+
std::shared_ptr< armnn::profiling::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we&#39;ll keep it in the backend namespace...
+ + +
std::unique_ptr< IBackendContext > IBackendContextPtr
+
+
+ + + + -- cgit v1.2.1