diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-05 14:12:11 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-09 08:49:22 +0100 |
commit | 0c2b2897cb65b562b97014ae748e91d8b9a3d3b4 (patch) | |
tree | f4833fedc412ab4c434ca3c4181389f54b6487d2 /src/backends/backendsCommon/DynamicBackend.hpp | |
parent | e54aa06ec19813b737513ecb8224285d98e871ba (diff) | |
download | armnn-0c2b2897cb65b562b97014ae748e91d8b9a3d3b4.tar.gz |
IVGCVSW-3596 Register the dynamic backends in the BackendRegistry
* Added getter for the factory function in the DynamicBackend class
* Added new RegisterDynamicBackends method in utils class
* Added dynamic backend registration process in the Runtime class
* Added new dummy dynamic backend objects for testing
* Added unit tests for dynamic backend registration
* Added convenience methods to BackendId
Change-Id: I01e147d1d6f01bf56747ad946f73f867af5770c4
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/backends/backendsCommon/DynamicBackend.hpp')
-rw-r--r-- | src/backends/backendsCommon/DynamicBackend.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backends/backendsCommon/DynamicBackend.hpp b/src/backends/backendsCommon/DynamicBackend.hpp index b202309c31..34c001958d 100644 --- a/src/backends/backendsCommon/DynamicBackend.hpp +++ b/src/backends/backendsCommon/DynamicBackend.hpp @@ -6,6 +6,7 @@ #pragma once #include "IBackendInternal.hpp" +#include "BackendRegistry.hpp" #include <functional> #include <memory> @@ -13,7 +14,7 @@ namespace armnn { -class DynamicBackend +class DynamicBackend final { public: using HandleCloser = std::function<void(const void*)>; @@ -25,10 +26,13 @@ public: BackendId GetBackendId(); BackendVersion GetBackendVersion(); IBackendInternalUniquePtr GetBackend(); + BackendRegistry::FactoryFunction GetFactoryFunction(); private: + /// Private utility functions template<typename BackendFunctionType> BackendFunctionType SetFunctionPointer(const std::string& backendFunctionName); + IBackendInternalUniquePtr CreateBackend(); /// Backend function pointer types using IdFunctionType = const char*(*)(); |