aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/DynamicBackendUtils.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-08-05 12:16:47 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-08-05 16:32:05 +0000
commite7d449893b85a00a063836bd01dce4f925a24dd2 (patch)
treebff2b2770caa91c3bbf7270db8a21a3f4eb9964f /src/backends/backendsCommon/DynamicBackendUtils.hpp
parent4fc3c48c2d230d8c55aa01aa98e32b6df7cafc0c (diff)
downloadarmnn-e7d449893b85a00a063836bd01dce4f925a24dd2.tar.gz
IVGCVSW-3541 Get the paths where to load the dynamic backends from
* Adds GetBackendPaths and IsPathValid to DynamicBackendUtils * Adds related unit tests Change-Id: I94e377d92a88a4b5d48026f6ad5b4d5387d20c21 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/backends/backendsCommon/DynamicBackendUtils.hpp')
-rw-r--r--src/backends/backendsCommon/DynamicBackendUtils.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backends/backendsCommon/DynamicBackendUtils.hpp b/src/backends/backendsCommon/DynamicBackendUtils.hpp
index 0a2d428fd3..f0bfd3b220 100644
--- a/src/backends/backendsCommon/DynamicBackendUtils.hpp
+++ b/src/backends/backendsCommon/DynamicBackendUtils.hpp
@@ -11,9 +11,14 @@
#include <string>
#include <dlfcn.h>
+#include <vector>
#include <boost/format.hpp>
+#if !defined(DYNAMIC_BACKEND_PATHS)
+#define DYNAMIC_BACKEND_PATHS ""
+#endif
+
namespace armnn
{
@@ -28,9 +33,13 @@ public:
static bool IsBackendCompatible(const BackendVersion& backendVersion);
+ static std::vector<std::string> GetBackendPaths(const std::string& overrideBackendPath = "");
+ static bool IsPathValid(const std::string& path);
+
protected:
- /// Protected for testing purposes
+ /// Protected methods for testing purposes
static bool IsBackendCompatibleImpl(const BackendVersion& backendApiVersion, const BackendVersion& backendVersion);
+ static std::vector<std::string> GetBackendPathsImpl(const std::string& backendPaths);
private:
static std::string GetDlError();