From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- .../_neon_backend_model_context_8cpp_source.xhtml | 126 +++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 21.02/_neon_backend_model_context_8cpp_source.xhtml (limited to '21.02/_neon_backend_model_context_8cpp_source.xhtml') diff --git a/21.02/_neon_backend_model_context_8cpp_source.xhtml b/21.02/_neon_backend_model_context_8cpp_source.xhtml new file mode 100644 index 0000000000..eb5a1f613a --- /dev/null +++ b/21.02/_neon_backend_model_context_8cpp_source.xhtml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + +ArmNN: src/backends/neon/NeonBackendModelContext.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.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.
+
DataLayout::NCHW false
+
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