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 --- 23.02/classarmnn_1_1_backend_options_1_1_var.xhtml | 817 +++++++++++++++++++++ 1 file changed, 817 insertions(+) create mode 100644 23.02/classarmnn_1_1_backend_options_1_1_var.xhtml (limited to '23.02/classarmnn_1_1_backend_options_1_1_var.xhtml') diff --git a/23.02/classarmnn_1_1_backend_options_1_1_var.xhtml b/23.02/classarmnn_1_1_backend_options_1_1_var.xhtml new file mode 100644 index 0000000000..0c3ed147e0 --- /dev/null +++ b/23.02/classarmnn_1_1_backend_options_1_1_var.xhtml @@ -0,0 +1,817 @@ + + + + + + + + + + + + + +ArmNN: BackendOptions::Var Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
BackendOptions::Var Class Reference
+
+
+ +

Very basic type safe variant. + More...

+ +

#include <BackendOptions.hpp>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Var (int i)
 Constructors. More...
 
 Var (unsigned int u)
 
 Var (float f)
 
 Var (bool b)
 
 Var (const char *s)
 
 Var (std::string s)
 
template<typename DisallowedType >
 Var (DisallowedType)
 Disallow implicit conversions from types not explicitly allowed below. More...
 
 Var (const Var &other)
 Copy Construct. More...
 
Varoperator= (const Var &other)
 Copy operator. More...
 
bool IsBool () const
 Type getters. More...
 
bool IsInt () const
 
bool IsUnsignedInt () const
 
bool IsFloat () const
 
bool IsString () const
 
bool AsBool () const
 Value getters. More...
 
int AsInt () const
 
unsigned int AsUnsignedInt () const
 
float AsFloat () const
 
std::string AsString () const
 
std::string ToString ()
 
 ~Var ()
 Destructor. More...
 
+

Detailed Description

+

Very basic type safe variant.

+ +

Definition at line 38 of file BackendOptions.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Var() [1/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (int i)
+
+inlineexplicit
+
+ +

Constructors.

+ +

Definition at line 43 of file BackendOptions.hpp.

+
43 : m_Vals(i), m_Type(VarTypes::Integer) {};
+
+
+ +

◆ Var() [2/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (unsigned int u)
+
+inlineexplicit
+
+ +

Definition at line 44 of file BackendOptions.hpp.

+
44 : m_Vals(u), m_Type(VarTypes::UnsignedInteger) {};
+
+
+ +

◆ Var() [3/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (float f)
+
+inlineexplicit
+
+ +

Definition at line 45 of file BackendOptions.hpp.

+
45 : m_Vals(f), m_Type(VarTypes::Float) {};
+
+
+ +

◆ Var() [4/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (bool b)
+
+inlineexplicit
+
+ +

Definition at line 46 of file BackendOptions.hpp.

+
46 : m_Vals(b), m_Type(VarTypes::Boolean) {};
+
+
+ +

◆ Var() [5/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (const char * s)
+
+inlineexplicit
+
+ +

Definition at line 47 of file BackendOptions.hpp.

+
47 : m_Vals(s), m_Type(VarTypes::String) {};
+
+
+ +

◆ Var() [6/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (std::string s)
+
+inlineexplicit
+
+ +

Definition at line 48 of file BackendOptions.hpp.

+
48 : m_Vals(s), m_Type(VarTypes::String) {};
+
+
+ +

◆ Var() [7/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (DisallowedType )
+
+inline
+
+ +

Disallow implicit conversions from types not explicitly allowed below.

+ +

Definition at line 52 of file BackendOptions.hpp.

+
53  {
54  static_assert(CheckAllowed<DisallowedType>::value, "Type is not allowed for Var<DisallowedType>.");
55  assert(false && "Unreachable code");
56  }
+
+
+ +

◆ Var() [8/8]

+ +
+
+ + + + + +
+ + + + + + + + +
Var (const Varother)
+
+inline
+
+ +

Copy Construct.

+ +

Definition at line 59 of file BackendOptions.hpp.

+
60  : m_Type(other.m_Type)
61  {
62  switch(m_Type)
63  {
64  case VarTypes::String:
65  {
66  new (&m_Vals.s) std::string(other.m_Vals.s);
67  break;
68  }
69  default:
70  {
71  DoOp(other, [](auto& a, auto& b)
72  {
73  a = b;
74  });
75  break;
76  }
77  }
78  }
+
+
+ +

◆ ~Var()

+ +
+
+ + + + + +
+ + + + + + + +
~Var ()
+
+inline
+
+ +

Destructor.

+ +

Definition at line 138 of file BackendOptions.hpp.

+ +

References armnn::Boolean, BackendOptions::Var::IsBool(), BackendOptions::Var::IsFloat(), BackendOptions::Var::IsInt(), BackendOptions::Var::IsString(), and BackendOptions::Var::IsUnsignedInt().

+
139  {
140  DoOp(*this, [this](auto& a, auto&)
141  {
142  Destruct(a);
143  });
144  }
+
+
+

Member Function Documentation

+ +

◆ AsBool()

+ +
+
+ + + + + +
+ + + + + + + +
bool AsBool () const
+
+inline
+
+ +

Value getters.

+ +

Definition at line 119 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), armnn::Optimize(), armnn::ParseBooleanBackendOption(), and armnn::ValidateSourcesMatchOptimizedNetwork().

+
119 { assert(IsBool()); return m_Vals.b; }
bool IsBool() const
Type getters.
+
+
+
+ +

◆ AsFloat()

+ +
+
+ + + + + +
+ + + + + + + +
float AsFloat () const
+
+inline
+
+ +

Definition at line 122 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability().

+
122 { assert(IsFloat()); return m_Vals.f; }
+
+
+
+ +

◆ AsInt()

+ +
+
+ + + + + +
+ + + + + + + +
int AsInt () const
+
+inline
+
+ +

Definition at line 120 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), armnn::ParseIntBackendOption(), and armnn::ParseTuningLevel().

+
120 { assert(IsInt()); return m_Vals.i; }
+
+
+
+ +

◆ AsString()

+ +
+
+ + + + + +
+ + + + + + + +
std::string AsString () const
+
+inline
+
+ +

Definition at line 123 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), and armnn::ParseStringBackendOption().

+
123 { assert(IsString()); return m_Vals.s; }
+
+
+
+ +

◆ AsUnsignedInt()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int AsUnsignedInt () const
+
+inline
+
+ +

Definition at line 121 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability().

+
121 { assert(IsUnsignedInt()); return m_Vals.u; }
+
+
+
+ +

◆ IsBool()

+ +
+
+ + + + + +
+ + + + + + + +
bool IsBool () const
+
+inline
+
+ +

Type getters.

+ +

Definition at line 112 of file BackendOptions.hpp.

+ +

References armnn::Boolean.

+ +

Referenced by armnn::HasCapability(), armnn::ParseBooleanBackendOption(), and BackendOptions::Var::~Var().

+
112 { return m_Type == VarTypes::Boolean; }
+
+
+ +

◆ IsFloat()

+ +
+
+ + + + + +
+ + + + + + + +
bool IsFloat () const
+
+inline
+
+ +

Definition at line 115 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), and BackendOptions::Var::~Var().

+
115 { return m_Type == VarTypes::Float; }
+
+
+ +

◆ IsInt()

+ +
+
+ + + + + +
+ + + + + + + +
bool IsInt () const
+
+inline
+
+ +

Definition at line 113 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), armnn::ParseIntBackendOption(), armnn::ParseTuningLevel(), and BackendOptions::Var::~Var().

+
113 { return m_Type == VarTypes::Integer; }
+
+
+ +

◆ IsString()

+ +
+
+ + + + + +
+ + + + + + + +
bool IsString () const
+
+inline
+
+ +

Definition at line 116 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), armnn::ParseStringBackendOption(), and BackendOptions::Var::~Var().

+
116 { return m_Type == VarTypes::String; }
+
+
+ +

◆ IsUnsignedInt()

+ +
+
+ + + + + +
+ + + + + + + +
bool IsUnsignedInt () const
+
+inline
+
+ +

Definition at line 114 of file BackendOptions.hpp.

+ +

Referenced by armnn::HasCapability(), and BackendOptions::Var::~Var().

+
114 { return m_Type == VarTypes::UnsignedInteger; }
+
+
+ +

◆ operator=()

+ +
+
+ + + + + +
+ + + + + + + + +
Var& operator= (const Varother)
+
+inline
+
+ +

Copy operator.

+ +

Definition at line 81 of file BackendOptions.hpp.

+
82  {
83  // Destroy existing string
84  if (m_Type == VarTypes::String)
85  {
86  Destruct(m_Vals.s);
87  }
88 
89  m_Type = other.m_Type;
90  switch(m_Type)
91  {
92  case VarTypes::String:
93  {
94 
95  new (&m_Vals.s) std::string(other.m_Vals.s);
96  break;
97  }
98  default:
99  {
100  DoOp(other, [](auto& a, auto& b)
101  {
102  a = b;
103  });
104  break;
105  }
106  }
107 
108  return *this;
109  };
+
+
+ +

◆ ToString()

+ +
+
+ + + + + +
+ + + + + + + +
std::string ToString ()
+
+inline
+
+ +

Definition at line 124 of file BackendOptions.hpp.

+ +

Referenced by OptimizerOptions::ToString().

+
125  {
126  if (IsBool()) { return AsBool() ? "true" : "false"; }
127  else if (IsInt()) { return std::to_string(AsInt()); }
128  else if (IsUnsignedInt()) { return std::to_string(AsUnsignedInt()); }
129  else if (IsFloat()) { return std::to_string(AsFloat()); }
130  else if (IsString()) { return AsString(); }
131  else
132  {
133  throw armnn::InvalidArgumentException("Unknown data type for string conversion");
134  }
135  }
+ + + +
std::string AsString() const
+ +
unsigned int AsUnsignedInt() const
+
bool AsBool() const
Value getters.
+
bool IsBool() const
Type getters.
+ + +
+
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.1