From add078b7f9a658d52ee6e8fe6771ea0517c07674 Mon Sep 17 00:00:00 2001 From: mathad01 Date: Mon, 10 May 2021 16:51:20 +0100 Subject: IVGCVSW-5908 Update 21.05 Doxygen Documents Signed-off-by: mathad01 Change-Id: I95316d4fc5f9d10185492dc835bb2411c1daea7b --- ...sarmnn_1_1_tensor_handle_factory_registry.xhtml | 411 +++++++++++++++++++++ 1 file changed, 411 insertions(+) create mode 100644 21.05/classarmnn_1_1_tensor_handle_factory_registry.xhtml (limited to '21.05/classarmnn_1_1_tensor_handle_factory_registry.xhtml') diff --git a/21.05/classarmnn_1_1_tensor_handle_factory_registry.xhtml b/21.05/classarmnn_1_1_tensor_handle_factory_registry.xhtml new file mode 100644 index 0000000000..40585594e2 --- /dev/null +++ b/21.05/classarmnn_1_1_tensor_handle_factory_registry.xhtml @@ -0,0 +1,411 @@ + + + + + + + + + + + + + +ArmNN: TensorHandleFactoryRegistry Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TensorHandleFactoryRegistry Class Reference
+
+
+ +

#include <TensorHandleFactoryRegistry.hpp>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 TensorHandleFactoryRegistry ()=default
 
 TensorHandleFactoryRegistry (const TensorHandleFactoryRegistry &other)=delete
 
 TensorHandleFactoryRegistry (TensorHandleFactoryRegistry &&other)=delete
 
void RegisterFactory (std::unique_ptr< ITensorHandleFactory > allocator)
 Register a TensorHandleFactory and transfer ownership. More...
 
void RegisterMemoryManager (std::shared_ptr< IMemoryManager > memoryManger)
 Register a memory manager with shared ownership. More...
 
ITensorHandleFactoryGetFactory (ITensorHandleFactory::FactoryId id) const
 Find a TensorHandleFactory by Id Returns nullptr if not found. More...
 
ITensorHandleFactoryGetFactory (ITensorHandleFactory::FactoryId id, MemorySource memSource) const
 Overload of above allowing specification of Memory Source. More...
 
void AquireMemory ()
 Aquire memory required for inference. More...
 
void ReleaseMemory ()
 Release memory required for inference. More...
 
std::vector< std::shared_ptr< IMemoryManager > > & GetMemoryManagers ()
 
+

Detailed Description

+
+

Definition at line 20 of file TensorHandleFactoryRegistry.hpp.

+

Constructor & Destructor Documentation

+ +

◆ TensorHandleFactoryRegistry() [1/3]

+ +
+
+ + + + + +
+ + + + + + + +
TensorHandleFactoryRegistry ()
+
+default
+
+ +
+
+ +

◆ TensorHandleFactoryRegistry() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + +
TensorHandleFactoryRegistry (const TensorHandleFactoryRegistryother)
+
+delete
+
+ +
+
+ +

◆ TensorHandleFactoryRegistry() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + +
TensorHandleFactoryRegistry (TensorHandleFactoryRegistry && other)
+
+delete
+
+ +
+
+

Member Function Documentation

+ +

◆ AquireMemory()

+ +
+
+ + + + + + + +
void AquireMemory ()
+
+ +

Aquire memory required for inference.

+ +

Definition at line 66 of file TensorHandleFactoryRegistry.cpp.

+
67 {
68  for (auto& mgr : m_MemoryManagers)
69  {
70  mgr->Acquire();
71  }
72 }
+
+
+ +

◆ GetFactory() [1/2]

+ +
+
+ + + + + + + + +
ITensorHandleFactory * GetFactory (ITensorHandleFactory::FactoryId id) const
+
+ +

Find a TensorHandleFactory by Id Returns nullptr if not found.

+ +

Definition at line 39 of file TensorHandleFactoryRegistry.cpp.

+ +

Referenced by Graph::AddCompatibilityLayers(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), SplitterLayer::CreateTensorHandles(), ConcatLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), LoadedNetwork::CreateWorkingMemHandle(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), and armnn::RequiresCopy().

+
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 }
+
+
+ +

◆ GetFactory() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
ITensorHandleFactory * GetFactory (ITensorHandleFactory::FactoryId id,
MemorySource memSource 
) const
+
+ +

Overload of above allowing specification of Memory Source.

+ +

Definition at line 52 of file TensorHandleFactoryRegistry.cpp.

+
54 {
55  for (auto& factory : m_Factories)
56  {
57  if (factory->GetId() == id && factory->GetImportFlags() == static_cast<MemorySourceFlags>(memSource))
58  {
59  return factory.get();
60  }
61  }
62 
63  return nullptr;
64 }
unsigned int MemorySourceFlags
+
+
+
+ +

◆ GetMemoryManagers()

+ +
+
+ + + + + +
+ + + + + + + +
std::vector<std::shared_ptr<IMemoryManager> >& GetMemoryManagers ()
+
+inline
+
+ +

Definition at line 48 of file TensorHandleFactoryRegistry.hpp.

+ +

Referenced by LoadedNetwork::CreateWorkingMemHandle().

+
49  {
50  return m_MemoryManagers;
51  }
+
+
+ +

◆ RegisterFactory()

+ +
+
+ + + + + + + + +
void RegisterFactory (std::unique_ptr< ITensorHandleFactoryallocator)
+
+ +

Register a TensorHandleFactory and transfer ownership.

+ +

Definition at line 12 of file TensorHandleFactoryRegistry.cpp.

+ +

Referenced by ClBackend::CreateWorkloadFactory(), NeonBackend::CreateWorkloadFactory(), RefBackend::CreateWorkloadFactory(), MockImportBackend::CreateWorkloadFactory(), RefBackend::RegisterTensorHandleFactories(), ClBackend::RegisterTensorHandleFactories(), MockImportBackend::RegisterTensorHandleFactories(), NeonBackend::RegisterTensorHandleFactories(), and sdb::SampleDynamicBackendId().

+
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 }
+
+
+
+ +

◆ RegisterMemoryManager()

+ +
+
+ + + + + + + + +
void RegisterMemoryManager (std::shared_ptr< IMemoryManagermemoryManger)
+
+
+ +

◆ ReleaseMemory()

+ +
+
+ + + + + + + +
void ReleaseMemory ()
+
+ +

Release memory required for inference.

+ +

Definition at line 74 of file TensorHandleFactoryRegistry.cpp.

+
75 {
76  for (auto& mgr : m_MemoryManagers)
77  {
78  mgr->Release();
79  }
80 }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1