21.08
|
#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< profiling::ProfilingService &> profilingService) |
void | RegisterAllocator (const BackendId &id, std::shared_ptr< ICustomAllocator > alloc) |
std::unordered_map< BackendId, std::shared_ptr< ICustomAllocator > > | GetAllocators () |
BackendRegistry () | |
virtual | ~BackendRegistry () |
void | Deregister (const BackendId &id) |
void | DeregisterAllocator (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 26 of file BackendRegistry.hpp.
using FactoryFunction = std::function<PointerType()> |
Definition at line 30 of file BackendRegistry.hpp.
|
protected |
Definition at line 59 of file BackendRegistry.hpp.
using PointerType = IBackendInternalUniquePtr |
Definition at line 29 of file BackendRegistry.hpp.
|
inline |
Definition at line 42 of file BackendRegistry.hpp.
|
inlinevirtual |
Definition at line 43 of file BackendRegistry.hpp.
void Deregister | ( | const BackendId & | id | ) |
Definition at line 39 of file BackendRegistry.cpp.
References BackendRegistry::DeregisterAllocator().
Referenced by DynamicBackendUtils::DeregisterDynamicBackends(), TEST_SUITE(), MockBackendInitialiser::~MockBackendInitialiser(), and MockImportBackendInitialiser::~MockImportBackendInitialiser().
void DeregisterAllocator | ( | const BackendId & | id | ) |
Definition at line 121 of file BackendRegistry.cpp.
Referenced by BackendRegistry::Deregister().
std::unordered_map< BackendId, std::shared_ptr< ICustomAllocator > > GetAllocators | ( | ) |
Definition at line 126 of file BackendRegistry.cpp.
BackendIdSet GetBackendIds | ( | ) | const |
Definition at line 73 of file BackendRegistry.cpp.
Referenced by BackendRegistry::GetBackendIdsAsString(), and TEST_SUITE().
std::string GetBackendIdsAsString | ( | ) | const |
Definition at line 83 of file BackendRegistry.cpp.
References BackendRegistry::GetBackendIds().
Referenced by InferenceModel< IParser, TDataType >::AddCommandLineOptions(), main(), and ProgramOptions::ProgramOptions().
BackendRegistry::FactoryFunction GetFactory | ( | const BackendId & | id | ) | const |
Definition at line 55 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by armnn::GetILayerSupportByBackendId(), LoadedNetwork::MakeLoadedNetwork(), armnn::Optimize(), RuntimeImpl::RuntimeImpl(), and TEST_SUITE().
bool IsBackendRegistered | ( | const BackendId & | id | ) | const |
Definition at line 50 of file BackendRegistry.cpp.
Referenced by armnn::GetILayerSupportByBackendId(), and DynamicBackendUtils::RegisterDynamicBackendsImpl().
void Register | ( | const BackendId & | id, |
BackendRegistry::FactoryFunction | factory | ||
) |
Definition at line 19 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by MockBackendInitialiser::MockBackendInitialiser(), MockImportBackendInitialiser::MockImportBackendInitialiser(), DynamicBackendUtils::RegisterDynamicBackendsImpl(), BackendRegistry::StaticRegistryInitializer::StaticRegistryInitializer(), and TEST_SUITE().
void RegisterAllocator | ( | const BackendId & | id, |
std::shared_ptr< ICustomAllocator > | alloc | ||
) |
Definition at line 110 of file BackendRegistry.cpp.
References CHECK_LOCATION.
Referenced by RuntimeImpl::RuntimeImpl().
void SetProfilingService | ( | armnn::Optional< profiling::ProfilingService &> | profilingService | ) |
Definition at line 105 of file BackendRegistry.cpp.
Referenced by RuntimeImpl::RuntimeImpl(), and RuntimeImpl::~RuntimeImpl().
size_t Size | ( | ) | const |
Definition at line 68 of file BackendRegistry.cpp.
Referenced by RuntimeEmptyTestImpl(), RuntimeInvalidOverridePathTestImpl(), and TEST_SUITE().
|
staticprotected |
For testing only.
Definition at line 100 of file BackendRegistry.cpp.
References armnn::swap().