15 #include <unordered_map> 23 class ProfilingService;
25 class IBackendInternal;
36 bool IsBackendRegistered(
const BackendId&
id)
const;
40 std::string GetBackendIdsAsString()
const;
42 void RegisterAllocator(
const BackendId&
id, std::shared_ptr<ICustomAllocator> alloc);
43 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> GetAllocators();
44 void RegisterMemoryOptimizerStrategy(
const BackendId&
id, std::shared_ptr<IMemoryOptimizerStrategy> strategy);
61 void DeregisterAllocator(
const BackendId &
id);
62 void DeregisterMemoryOptimizerStrategy(
const BackendId &
id);
76 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomMemoryAllocatorMap;
77 std::unordered_map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>> m_MemoryOptimizerStrategyMap;
StaticRegistryInitializer(BackendRegistry &instance, const BackendId &id, FactoryFunction factory)
IBackendInternalUniquePtr PointerType
std::function< PointerType()> FactoryFunction
void Register(const BackendId &id, FactoryFunction factory)
std::unordered_set< BackendId > BackendIdSet
std::unordered_map< BackendId, FactoryFunction > FactoryStorage
std::unordered_map< BackendId, std::shared_ptr< IMemoryOptimizerStrategy > > MemoryOptimizerStrategiesMapRef
BackendRegistry & BackendRegistryInstance()
Copyright (c) 2021 ARM Limited and Contributors.
virtual ~BackendRegistry()
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr