From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- ...ensor_handle_factory_registry_8cpp_source.xhtml | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 21.02/_tensor_handle_factory_registry_8cpp_source.xhtml (limited to '21.02/_tensor_handle_factory_registry_8cpp_source.xhtml') diff --git a/21.02/_tensor_handle_factory_registry_8cpp_source.xhtml b/21.02/_tensor_handle_factory_registry_8cpp_source.xhtml new file mode 100644 index 0000000000..7d6394e8e4 --- /dev/null +++ b/21.02/_tensor_handle_factory_registry_8cpp_source.xhtml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TensorHandleFactoryRegistry.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
8 
9 namespace armnn
10 {
11 
12 void TensorHandleFactoryRegistry::RegisterFactory(std::unique_ptr <ITensorHandleFactory> newFactory)
13 {
14  if (!newFactory)
15  {
16  return;
17  }
18 
19  ITensorHandleFactory::FactoryId id = newFactory->GetId();
20 
21  // Don't register duplicates
22  for (auto& registeredFactory : m_Factories)
23  {
24  if (id == registeredFactory->GetId())
25  {
26  return;
27  }
28  }
29 
30  // Take ownership of the new allocator
31  m_Factories.push_back(std::move(newFactory));
32 }
33 
34 void TensorHandleFactoryRegistry::RegisterMemoryManager(std::shared_ptr<armnn::IMemoryManager> memoryManger)
35 {
36  m_MemoryManagers.push_back(memoryManger);
37 }
38 
40 {
41  for (auto& factory : m_Factories)
42  {
43  if (factory->GetId() == id)
44  {
45  return factory.get();
46  }
47  }
48 
49  return nullptr;
50 }
51 
53 {
54  for (auto& mgr : m_MemoryManagers)
55  {
56  mgr->Acquire();
57  }
58 }
59 
61 {
62  for (auto& mgr : m_MemoryManagers)
63  {
64  mgr->Release();
65  }
66 }
67 
68 } // namespace armnn
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
+
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
+
void AquireMemory()
Aquire memory required for inference.
+
Copyright (c) 2021 ARM Limited and Contributors.
+
void ReleaseMemory()
Release memory required for inference.
+ +
ITensorHandleFactory * GetFactory(ITensorHandleFactory::FactoryId id) const
Find a TensorHandleFactory by Id Returns nullptr if not found.
+ + + +
+
+ + + + -- cgit v1.2.1