24.02
|
#include <BackendRegistry.hpp>
Classes | |
struct | StaticRegistryInitializer |
Public Types | |
using | PointerType = IBackendInternalUniquePtr |
using | FactoryFunction = std::function< PointerType()> |
Public Member Functions | |
void | Register (const BackendId &id, FactoryFunction factory) |
bool | IsBackendRegistered (const BackendId &id) const |
FactoryFunction | GetFactory (const BackendId &id) const |
size_t | Size () const |
BackendIdSet | GetBackendIds () const |
std::string | GetBackendIdsAsString () const |
void | SetProfilingService (armnn::Optional< arm::pipe::IProfilingService & > profilingService) |
void | RegisterAllocator (const BackendId &id, std::shared_ptr< ICustomAllocator > alloc) |
std::unordered_map< BackendId, std::shared_ptr< ICustomAllocator > > | GetAllocators () |
void | RegisterMemoryOptimizerStrategy (const BackendId &id, std::shared_ptr< IMemoryOptimizerStrategy > strategy) |
MemoryOptimizerStrategiesMapRef | GetMemoryOptimizerStrategies () |
BackendRegistry () | |
virtual | ~BackendRegistry () |
void | Deregister (const BackendId &id) |
void | DeregisterAllocator (const BackendId &id) |
void | DeregisterMemoryOptimizerStrategy (const BackendId &id) |
Protected Types | |
using | FactoryStorage = std::unordered_map< BackendId, FactoryFunction > |
Static Protected Member Functions | |
static void | Swap (BackendRegistry &instance, FactoryStorage &other) |
For testing only. More... | |
Definition at line 35 of file BackendRegistry.hpp.
using FactoryFunction = std::function<PointerType()> |
Definition at line 39 of file BackendRegistry.hpp.
|
protected |
Definition at line 71 of file BackendRegistry.hpp.
using PointerType = IBackendInternalUniquePtr |
Definition at line 38 of file BackendRegistry.hpp.
|
inline |
Definition at line 53 of file BackendRegistry.hpp.
|
inlinevirtual |
Definition at line 54 of file BackendRegistry.hpp.
void Deregister | ( | const BackendId & | id | ) |
Definition at line 41 of file BackendRegistry.cpp.
References BackendRegistry::DeregisterAllocator(), OptionalBase::has_value(), and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by DynamicBackendUtils::DeregisterDynamicBackends().
void DeregisterAllocator | ( | const BackendId & | id | ) |
Definition at line 123 of file BackendRegistry.cpp.
Referenced by BackendRegistry::Deregister().
void DeregisterMemoryOptimizerStrategy | ( | const BackendId & | id | ) |
Definition at line 145 of file BackendRegistry.cpp.
std::unordered_map< BackendId, std::shared_ptr< ICustomAllocator > > GetAllocators | ( | ) |
Definition at line 128 of file BackendRegistry.cpp.
BackendIdSet GetBackendIds | ( | ) | const |
Definition at line 75 of file BackendRegistry.cpp.
Referenced by BackendRegistry::GetBackendIdsAsString().
std::string GetBackendIdsAsString | ( | ) | const |
BackendRegistry::FactoryFunction GetFactory | ( | const BackendId & | id | ) | const |
Definition at line 57 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by armnn::GetILayerSupportByBackendId(), and RuntimeImpl::RuntimeImpl().
MemoryOptimizerStrategiesMapRef GetMemoryOptimizerStrategies | ( | ) |
Definition at line 150 of file BackendRegistry.cpp.
bool IsBackendRegistered | ( | const BackendId & | id | ) | const |
Definition at line 52 of file BackendRegistry.cpp.
Referenced by armnn::GetILayerSupportByBackendId(), and DynamicBackendUtils::RegisterDynamicBackendsImpl().
void Register | ( | const BackendId & | id, |
BackendRegistry::FactoryFunction | factory | ||
) |
Definition at line 21 of file BackendRegistry.cpp.
References CHECK_LOCATION, OptionalBase::has_value(), and OptionalReferenceSwitch< IsReference, T >::value().
Referenced by DynamicBackendUtils::RegisterDynamicBackendsImpl(), and BackendRegistry::StaticRegistryInitializer::StaticRegistryInitializer().
void RegisterAllocator | ( | const BackendId & | id, |
std::shared_ptr< ICustomAllocator > | alloc | ||
) |
Definition at line 112 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by RuntimeImpl::RuntimeImpl().
void RegisterMemoryOptimizerStrategy | ( | const BackendId & | id, |
std::shared_ptr< IMemoryOptimizerStrategy > | strategy | ||
) |
Definition at line 133 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by RuntimeImpl::RuntimeImpl().
void SetProfilingService | ( | armnn::Optional< arm::pipe::IProfilingService & > | profilingService | ) |
Definition at line 107 of file BackendRegistry.cpp.
Referenced by RuntimeImpl::~RuntimeImpl().
size_t Size | ( | ) | const |
Definition at line 70 of file BackendRegistry.cpp.
|
staticprotected |