24.08
|
Go to the documentation of this file.
22 for (
auto& registeredFactory : m_Factories)
24 if (
id == registeredFactory->GetId())
31 m_Factories.push_back(std::move(newFactory));
36 m_MemoryManagers.push_back(memoryManger);
41 for (
auto& factory : m_Factories)
43 if (factory->GetId() ==
id)
55 for (
auto& factory : m_Factories)
57 if (factory->GetId() ==
id && factory->GetImportFlags() ==
static_cast<MemorySourceFlags>(memSource))
69 m_FactoryMappings[copyFactoryId] = importFactoryId;
75 return m_FactoryMappings[copyFactoryId];
80 for (
auto& mgr : m_MemoryManagers)
88 for (
auto& mgr : m_MemoryManagers)
void ReleaseMemory()
Release memory required for inference.
ITensorHandleFactory * GetFactory(ITensorHandleFactory::FactoryId id) const
Find a TensorHandleFactory by Id Returns nullptr if not found.
unsigned int MemorySourceFlags
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
ITensorHandleFactory::FactoryId GetMatchingImportFactoryId(ITensorHandleFactory::FactoryId copyFactoryId)
Get a matching TensorHandleFatory Id for Memory Import given TensorHandleFactory Id for Memory Copy.
void AquireMemory()
Aquire memory required for inference.
MemorySource
Define the Memory Source to reduce copies.
Copyright (c) 2021 ARM Limited and Contributors.
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
void RegisterCopyAndImportFactoryPair(ITensorHandleFactory::FactoryId copyFactoryId, ITensorHandleFactory::FactoryId importFactoryId)
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Impor...