10 #include <unordered_map>
20 class IProfilingService;
28 class IBackendInternal;
29 class ICustomAllocator;
30 class IMemoryOptimizerStrategy;
49 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>>
GetAllocators();
84 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomMemoryAllocatorMap;
85 std::unordered_map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>> m_MemoryOptimizerStrategyMap;
void Register(const BackendId &id, FactoryFunction factory)
void DeregisterMemoryOptimizerStrategy(const BackendId &id)
std::unordered_map< BackendId, FactoryFunction > FactoryStorage
void AddMappedGpuBackend(const BackendId &id)
bool IsBackendRegistered(const BackendId &id) const
void Deregister(const BackendId &id)
static void Swap(BackendRegistry &instance, FactoryStorage &other)
For testing only.
void SetProfilingService(armnn::Optional< arm::pipe::IProfilingService & > profilingService)
BackendIdSet GetBackendIds() const
std::unordered_map< BackendId, std::shared_ptr< ICustomAllocator > > GetAllocators()
virtual ~BackendRegistry()
void RegisterAllocator(const BackendId &id, std::shared_ptr< ICustomAllocator > alloc)
MemoryOptimizerStrategiesMapRef GetMemoryOptimizerStrategies()
std::function< PointerType()> FactoryFunction
void RegisterMemoryOptimizerStrategy(const BackendId &id, std::shared_ptr< IMemoryOptimizerStrategy > strategy)
IBackendInternalUniquePtr PointerType
std::string GetBackendIdsAsString() const
BackendIdVector GetMappedGpuBackends()
void DeregisterAllocator(const BackendId &id)
FactoryFunction GetFactory(const BackendId &id) const
Copyright (c) 2021 ARM Limited and Contributors.
std::unordered_set< BackendId > BackendIdSet
std::unordered_map< BackendId, std::shared_ptr< IMemoryOptimizerStrategy > > MemoryOptimizerStrategiesMapRef
BackendRegistry & BackendRegistryInstance()
std::vector< BackendId > BackendIdVector
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
StaticRegistryInitializer(BackendRegistry &instance, const BackendId &id, FactoryFunction factory)