From 5cc8e56b4ca8d58dc11973c49c10a02a2f13580c Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Tue, 23 Oct 2018 15:14:46 +0100 Subject: IVGCVSW-2053: Validate BackendId parameters for the InferenceTest (EndToEnd tests) / ExecuteNetwork !referencetests:154790 Change-Id: Iaf9608ae1e66460079f2546b30d7fbc9b55bb7dd --- src/backends/RegistryCommon.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/backends') 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 #include #include +#include +#include #include 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() {} -- cgit v1.2.1