diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2018-10-23 15:14:46 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-25 09:49:58 +0100 |
commit | 5cc8e56b4ca8d58dc11973c49c10a02a2f13580c (patch) | |
tree | 99f67a0652d2ee27f6cdbdc21c39001e529ee4f1 /src/backends | |
parent | 8853c1f6a802fe7549b89b74ed850aec455b923a (diff) | |
download | armnn-5cc8e56b4ca8d58dc11973c49c10a02a2f13580c.tar.gz |
IVGCVSW-2053: Validate BackendId parameters for the InferenceTest (EndToEnd tests) / ExecuteNetwork
!referencetests:154790
Change-Id: Iaf9608ae1e66460079f2546b30d7fbc9b55bb7dd
Diffstat (limited to 'src/backends')
-rw-r--r-- | src/backends/RegistryCommon.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/backends/RegistryCommon.hpp b/src/backends/RegistryCommon.hpp index 27663b6dea..616a63bd53 100644 --- a/src/backends/RegistryCommon.hpp +++ b/src/backends/RegistryCommon.hpp @@ -8,6 +8,8 @@ #include <armnn/Exceptions.hpp> #include <functional> #include <memory> +#include <sstream> +#include <string> #include <unordered_map> namespace armnn @@ -65,6 +67,23 @@ public: return result; } + std::string GetBackendIdsAsString() const + { + static const std::string delimitator = ", "; + + std::stringstream output; + for (auto& backendId : GetBackendIds()) + { + if (output.tellp() != std::streampos(0)) + { + output << delimitator; + } + output << backendId; + } + + return output.str(); + } + RegistryCommon() {} virtual ~RegistryCommon() {} |