aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/BackendOptions.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn/BackendOptions.hpp')
-rw-r--r--include/armnn/BackendOptions.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/armnn/BackendOptions.hpp b/include/armnn/BackendOptions.hpp
index 33cecf6614..e5694493d3 100644
--- a/include/armnn/BackendOptions.hpp
+++ b/include/armnn/BackendOptions.hpp
@@ -314,4 +314,13 @@ inline std::string ParseStringBackendOption(const armnn::BackendOptions::Var& va
return defaultValue;
}
+inline int ParseIntBackendOption(const armnn::BackendOptions::Var& value, int defaultValue)
+{
+ if (value.IsInt())
+ {
+ return value.AsInt();
+ }
+ return defaultValue;
+}
+
} //namespace armnn