15 #include <unordered_map> 23 class IProfilingService;
31 class IBackendInternal;
42 bool IsBackendRegistered(
const BackendId&
id)
const;
46 std::string GetBackendIdsAsString()
const;
48 void RegisterAllocator(
const BackendId&
id, std::shared_ptr<ICustomAllocator> alloc);
49 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> GetAllocators();
50 void RegisterMemoryOptimizerStrategy(
const BackendId&
id, std::shared_ptr<IMemoryOptimizerStrategy> strategy);
67 void DeregisterAllocator(
const BackendId &
id);
68 void DeregisterMemoryOptimizerStrategy(
const BackendId &
id);
82 std::unordered_map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomMemoryAllocatorMap;
83 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