From 8d2ca734165a068478df7cffa46185680b05cd20 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 24 Feb 2023 10:28:19 +0000 Subject: Update Doxygen docu for 23.02 Signed-off-by: Nikhil Raj Change-Id: Ie6c19a27d50fefab2796b2b5875374e81f5bf971 --- .../_neon_backend_model_context_8cpp_source.xhtml | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 23.02/_neon_backend_model_context_8cpp_source.xhtml (limited to '23.02/_neon_backend_model_context_8cpp_source.xhtml') diff --git a/23.02/_neon_backend_model_context_8cpp_source.xhtml b/23.02/_neon_backend_model_context_8cpp_source.xhtml new file mode 100644 index 0000000000..df8ea8e857 --- /dev/null +++ b/23.02/_neon_backend_model_context_8cpp_source.xhtml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + +ArmNN: src/backends/neon/NeonBackendModelContext.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
NeonBackendModelContext.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 namespace
9 {
10 
11 bool ParseBool(const armnn::BackendOptions::Var& value, bool defaultValue)
12 {
13  if (value.IsBool())
14  {
15  return value.AsBool();
16  }
17  return defaultValue;
18 }
19 
20 unsigned int ParseUnsignedInt(const armnn::BackendOptions::Var& value, unsigned int defaultValue)
21 {
22  if (value.IsUnsignedInt())
23  {
24  return value.AsUnsignedInt();
25  }
26  return defaultValue;
27 }
28 
29 } // namespace anonymous
30 
31 namespace armnn
32 {
33 
35  : m_IsFastMathEnabled(false), m_NumberOfThreads(0)
36 {
37  if (!modelOptions.empty())
38  {
39  ParseOptions(modelOptions, "CpuAcc", [&](std::string name, const BackendOptions::Var& value)
40  {
41  if (name == "FastMathEnabled")
42  {
43  m_IsFastMathEnabled |= ParseBool(value, false);
44  }
45  if (name == "NumberOfThreads")
46  {
47  m_NumberOfThreads |= ParseUnsignedInt(value, 0);
48  }
49  });
50  }
51 }
52 
54 {
55  return m_IsFastMathEnabled;
56 }
57 
59 {
60  return m_NumberOfThreads;
61 }
62 
63 } // namespace armnn
Very basic type safe variant.
+
void ParseOptions(const std::vector< BackendOptions > &options, BackendId backend, F f)
+
std::vector< BackendOptions > ModelOptions
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+ + +
NeonBackendModelContext(const ModelOptions &modelOptions)
+
unsigned int AsUnsignedInt() const
+
bool AsBool() const
Value getters.
+
bool IsBool() const
Type getters.
+ +
+
+ + + + -- cgit v1.2.1