ArmNN
 24.02
TypesUtils.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2018-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <armnn/BackendId.hpp>
8 #include <armnn/Exceptions.hpp>
9 #include <armnn/Tensor.hpp>
10 #include <armnn/Types.hpp>
11 
12 #include <stdint.h>
13 #include <cmath>
14 #include <ostream>
15 #include <set>
16 #include <type_traits>
17 
18 namespace armnn
19 {
20 
21 constexpr char const* GetStatusAsCString(Status status)
22 {
23  switch (status)
24  {
25  case armnn::Status::Success: return "Status::Success";
26  case armnn::Status::Failure: return "Status::Failure";
27  default: return "Unknown";
28  }
29 }
30 
31 constexpr char const* GetActivationFunctionAsCString(ActivationFunction activation)
32 {
33  switch (activation)
34  {
35  case ActivationFunction::Sigmoid: return "Sigmoid";
36  case ActivationFunction::TanH: return "TanH";
37  case ActivationFunction::Linear: return "Linear";
38  case ActivationFunction::ReLu: return "ReLu";
39  case ActivationFunction::BoundedReLu: return "BoundedReLu";
40  case ActivationFunction::SoftReLu: return "SoftReLu";
41  case ActivationFunction::LeakyReLu: return "LeakyReLu";
42  case ActivationFunction::Abs: return "Abs";
43  case ActivationFunction::Sqrt: return "Sqrt";
44  case ActivationFunction::Square: return "Square";
45  case ActivationFunction::Elu: return "Elu";
46  case ActivationFunction::HardSwish: return "HardSwish";
47  case ActivationFunction::Gelu: return "Gelu";
48  default: return "Unknown";
49  }
50 }
51 
52 constexpr char const* GetArgMinMaxFunctionAsCString(ArgMinMaxFunction function)
53 {
54  switch (function)
55  {
56  case ArgMinMaxFunction::Max: return "Max";
57  case ArgMinMaxFunction::Min: return "Min";
58  default: return "Unknown";
59  }
60 }
61 
62 constexpr char const* GetComparisonOperationAsCString(ComparisonOperation operation)
63 {
64  switch (operation)
65  {
66  case ComparisonOperation::Equal: return "Equal";
67  case ComparisonOperation::Greater: return "Greater";
68  case ComparisonOperation::GreaterOrEqual: return "GreaterOrEqual";
69  case ComparisonOperation::Less: return "Less";
70  case ComparisonOperation::LessOrEqual: return "LessOrEqual";
71  case ComparisonOperation::NotEqual: return "NotEqual";
72  default: return "Unknown";
73  }
74 }
75 
76 constexpr char const* GetBinaryOperationAsCString(BinaryOperation operation)
77 {
78  switch (operation)
79  {
80  case BinaryOperation::Add: return "Add";
81  case BinaryOperation::Div: return "Div";
82  case BinaryOperation::Maximum: return "Maximum";
83  case BinaryOperation::Minimum: return "Minimum";
84  case BinaryOperation::Mul: return "Mul";
85  case BinaryOperation::Power: return "Power";
86  case BinaryOperation::SqDiff: return "SqDiff";
87  case BinaryOperation::Sub: return "Sub";
88  default: return "Unknown";
89  }
90 }
91 
92 constexpr char const* GetUnaryOperationAsCString(UnaryOperation operation)
93 {
94  switch (operation)
95  {
96  case UnaryOperation::Abs: return "Abs";
97  case UnaryOperation::Ceil: return "Ceil";
98  case UnaryOperation::Exp: return "Exp";
99  case UnaryOperation::Sqrt: return "Sqrt";
100  case UnaryOperation::Rsqrt: return "Rsqrt";
101  case UnaryOperation::Neg: return "Neg";
102  case UnaryOperation::Log: return "Log";
103  case UnaryOperation::LogicalNot: return "LogicalNot";
104  case UnaryOperation::Sin: return "Sin";
105  default: return "Unknown";
106  }
107 }
108 
110 {
111  switch (operation)
112  {
113  case LogicalBinaryOperation::LogicalAnd: return "LogicalAnd";
114  case LogicalBinaryOperation::LogicalOr: return "LogicalOr";
115  default: return "Unknown";
116  }
117 }
118 
119 constexpr char const* GetFusedTypeAsCString(FusedKernelType type)
120 {
121  switch (type)
122  {
123  case FusedKernelType::AddMulAdd: return "AddMulAdd";
124  default: return "Unknown";
125  }
126 }
127 
128 constexpr char const* GetPoolingAlgorithmAsCString(PoolingAlgorithm pooling)
129 {
130  switch (pooling)
131  {
132  case PoolingAlgorithm::Average: return "Average";
133  case PoolingAlgorithm::Max: return "Max";
134  case PoolingAlgorithm::L2: return "L2";
135  default: return "Unknown";
136  }
137 }
138 
140 {
141  switch (rounding)
142  {
143  case OutputShapeRounding::Ceiling: return "Ceiling";
144  case OutputShapeRounding::Floor: return "Floor";
145  default: return "Unknown";
146  }
147 }
148 
149 constexpr char const* GetPaddingMethodAsCString(PaddingMethod method)
150 {
151  switch (method)
152  {
153  case PaddingMethod::Exclude: return "Exclude";
154  case PaddingMethod::IgnoreValue: return "IgnoreValue";
155  default: return "Unknown";
156  }
157 }
158 
159 constexpr char const* GetPaddingModeAsCString(PaddingMode mode)
160 {
161  switch (mode)
162  {
163  case PaddingMode::Constant: return "Exclude";
164  case PaddingMode::Symmetric: return "Symmetric";
165  case PaddingMode::Reflect: return "Reflect";
166  default: return "Unknown";
167  }
168 }
169 
170 constexpr char const* GetReduceOperationAsCString(ReduceOperation reduce_operation)
171 {
172  switch (reduce_operation)
173  {
174  case ReduceOperation::Sum: return "Sum";
175  case ReduceOperation::Max: return "Max";
176  case ReduceOperation::Mean: return "Mean";
177  case ReduceOperation::Min: return "Min";
178  case ReduceOperation::Prod: return "Prod";
179  default: return "Unknown";
180  }
181 }
182 constexpr unsigned int GetDataTypeSize(DataType dataType)
183 {
184  switch (dataType)
185  {
186  case DataType::BFloat16:
187  case DataType::Float16: return 2U;
188  case DataType::Float32:
189  case DataType::Signed32: return 4U;
190  case DataType::Signed64: return 8U;
191  case DataType::QAsymmU8: return 1U;
192  case DataType::QAsymmS8: return 1U;
193  case DataType::QSymmS8: return 1U;
194  case DataType::QSymmS16: return 2U;
195  case DataType::Boolean: return 1U;
196  default: return 0U;
197  }
198 }
199 
200 template <unsigned N>
201 constexpr bool StrEqual(const char* strA, const char (&strB)[N])
202 {
203  bool isEqual = true;
204  for (unsigned i = 0; isEqual && (i < N); ++i)
205  {
206  isEqual = (strA[i] == strB[i]);
207  }
208  return isEqual;
209 }
210 
211 /// Deprecated function that will be removed together with
212 /// the Compute enum
213 constexpr armnn::Compute ParseComputeDevice(const char* str)
214 {
215  if (armnn::StrEqual(str, "CpuAcc"))
216  {
217  return armnn::Compute::CpuAcc;
218  }
219  else if (armnn::StrEqual(str, "CpuRef"))
220  {
221  return armnn::Compute::CpuRef;
222  }
223  else if (armnn::StrEqual(str, "GpuAcc"))
224  {
225  return armnn::Compute::GpuAcc;
226  }
227  else
228  {
230  }
231 }
232 
233 constexpr const char* GetDataTypeName(DataType dataType)
234 {
235  switch (dataType)
236  {
237  case DataType::Float16: return "Float16";
238  case DataType::Float32: return "Float32";
239  case DataType::Signed64: return "Signed64";
240  case DataType::QAsymmU8: return "QAsymmU8";
241  case DataType::QAsymmS8: return "QAsymmS8";
242  case DataType::QSymmS8: return "QSymmS8";
243  case DataType::QSymmS16: return "QSymm16";
244  case DataType::Signed32: return "Signed32";
245  case DataType::Boolean: return "Boolean";
246  case DataType::BFloat16: return "BFloat16";
247 
248  default:
249  return "Unknown";
250  }
251 }
252 
253 constexpr const char* GetDataLayoutName(DataLayout dataLayout)
254 {
255  switch (dataLayout)
256  {
257  case DataLayout::NCHW: return "NCHW";
258  case DataLayout::NHWC: return "NHWC";
259  case DataLayout::NDHWC: return "NDHWC";
260  case DataLayout::NCDHW: return "NCDHW";
261  default: return "Unknown";
262  }
263 }
264 
266 {
267  switch (channel)
268  {
269  case NormalizationAlgorithmChannel::Across: return "Across";
270  case NormalizationAlgorithmChannel::Within: return "Within";
271  default: return "Unknown";
272  }
273 }
274 
276 {
277  switch (method)
278  {
279  case NormalizationAlgorithmMethod::LocalBrightness: return "LocalBrightness";
280  case NormalizationAlgorithmMethod::LocalContrast: return "LocalContrast";
281  default: return "Unknown";
282  }
283 }
284 
285 constexpr const char* GetResizeMethodAsCString(ResizeMethod method)
286 {
287  switch (method)
288  {
289  case ResizeMethod::Bilinear: return "Bilinear";
290  case ResizeMethod::NearestNeighbor: return "NearestNeighbour";
291  default: return "Unknown";
292  }
293 }
294 
295 constexpr const char* GetMemBlockStrategyTypeName(MemBlockStrategyType memBlockStrategyType)
296 {
297  switch (memBlockStrategyType)
298  {
299  case MemBlockStrategyType::SingleAxisPacking: return "SingleAxisPacking";
300  case MemBlockStrategyType::MultiAxisPacking: return "MultiAxisPacking";
301  default: return "Unknown";
302  }
303 }
304 
305 template<typename T>
307  : std::integral_constant<bool, std::is_floating_point<T>::value && sizeof(T) == 2>
308 {};
309 
310 template<typename T>
311 constexpr bool IsQuantizedType()
312 {
313  return std::is_integral<T>::value;
314 }
315 
316 constexpr bool IsQuantized8BitType(DataType dataType)
317 {
318  return dataType == DataType::QAsymmU8 ||
319  dataType == DataType::QAsymmS8 ||
320  dataType == DataType::QSymmS8;
321 }
322 
323 constexpr bool IsQuantizedType(DataType dataType)
324 {
325  return dataType == DataType::QSymmS16 || IsQuantized8BitType(dataType);
326 }
327 
328 inline std::ostream& operator<<(std::ostream& os, Status stat)
329 {
330  os << GetStatusAsCString(stat);
331  return os;
332 }
333 
334 
335 inline std::ostream& operator<<(std::ostream& os, const armnn::TensorShape& shape)
336 {
337  os << "[";
339  {
340  for (uint32_t i = 0; i < shape.GetNumDimensions(); ++i)
341  {
342  if (i != 0)
343  {
344  os << ",";
345  }
346  if (shape.GetDimensionSpecificity(i))
347  {
348  os << shape[i];
349  }
350  else
351  {
352  os << "?";
353  }
354  }
355  }
356  else
357  {
358  os << "Dimensionality Not Specified";
359  }
360  os << "]";
361  return os;
362 }
363 
364 /// Quantize a floating point data type into an 8-bit data type.
365 /// @param value - The value to quantize.
366 /// @param scale - The scale (must be non-zero).
367 /// @param offset - The offset.
368 /// @return - The quantized value calculated as round(value/scale)+offset.
369 ///
370 template<typename QuantizedType>
371 QuantizedType Quantize(float value, float scale, int32_t offset);
372 
373 /// Dequantize an 8-bit data type into a floating point data type.
374 /// @param value - The value to dequantize.
375 /// @param scale - The scale (must be non-zero).
376 /// @param offset - The offset.
377 /// @return - The dequantized value calculated as (value-offset)*scale.
378 ///
379 template <typename QuantizedType>
380 float Dequantize(QuantizedType value, float scale, int32_t offset);
381 
382 inline void VerifyTensorInfoDataType(const armnn::TensorInfo & info, armnn::DataType dataType)
383 {
384  if (info.GetDataType() != dataType)
385  {
386  std::stringstream ss;
387  ss << "Unexpected datatype:" << armnn::GetDataTypeName(info.GetDataType())
388  << " for tensor:" << info.GetShape()
389  << ". The type expected to be: " << armnn::GetDataTypeName(dataType);
390  throw armnn::Exception(ss.str());
391  }
392 }
393 
394 } //namespace armnn
armnn::ArgMinMaxFunction::Max
@ Max
armnn::PaddingMode::Symmetric
@ Symmetric
armnn::GetBinaryOperationAsCString
constexpr char const * GetBinaryOperationAsCString(BinaryOperation operation)
Definition: TypesUtils.hpp:76
armnn::MemBlockStrategyType::MultiAxisPacking
@ MultiAxisPacking
armnn::ParseComputeDevice
constexpr armnn::Compute ParseComputeDevice(const char *str)
Deprecated function that will be removed together with the Compute enum.
Definition: TypesUtils.hpp:213
armnn::Compute::Undefined
@ Undefined
armnn::BinaryOperation::Mul
@ Mul
armnn::DataType::Boolean
@ Boolean
armnn::NormalizationAlgorithmChannel::Within
@ Within
armnn::BinaryOperation::Add
@ Add
armnn::GetLogicalBinaryOperationAsCString
constexpr char const * GetLogicalBinaryOperationAsCString(LogicalBinaryOperation operation)
Definition: TypesUtils.hpp:109
armnn::ComparisonOperation::LessOrEqual
@ LessOrEqual
armnn::DataLayout::NCDHW
@ NCDHW
armnn::IsQuantized8BitType
constexpr bool IsQuantized8BitType(DataType dataType)
Definition: TypesUtils.hpp:316
armnn::Compute::GpuAcc
@ GpuAcc
GPU Execution: OpenCL: ArmCompute.
armnn::ActivationFunction::LeakyReLu
@ LeakyReLu
armnn::GetResizeMethodAsCString
constexpr const char * GetResizeMethodAsCString(ResizeMethod method)
Definition: TypesUtils.hpp:285
armnn::ResizeMethod
ResizeMethod
Definition: Types.hpp:166
armnn::DataLayout
DataLayout
Definition: Types.hpp:62
armnn::DataLayout::NHWC
@ NHWC
armnn::ActivationFunction::SoftReLu
@ SoftReLu
armnn::Compute::CpuRef
@ CpuRef
CPU Execution: Reference C++ kernels.
armnn::GetStatusAsCString
constexpr char const * GetStatusAsCString(Status status)
Definition: TypesUtils.hpp:21
armnn::IsHalfType
Definition: TypesUtils.hpp:306
armnn::TensorShape::GetDimensionSpecificity
bool GetDimensionSpecificity(unsigned int i) const
Gets information about if the dimension size has been specified or not.
Definition: Tensor.cpp:211
armnn::ActivationFunction::Sqrt
@ Sqrt
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::OutputShapeRounding
OutputShapeRounding
Definition: Types.hpp:221
armnn::NormalizationAlgorithmMethod::LocalBrightness
@ LocalBrightness
Krichevsky 2012: Local Brightness Normalization.
armnn::NormalizationAlgorithmMethod
NormalizationAlgorithmMethod
Definition: Types.hpp:213
armnn::BinaryOperation::Sub
@ Sub
armnn::GetDataTypeName
constexpr const char * GetDataTypeName(DataType dataType)
Definition: TypesUtils.hpp:233
armnn::OutputShapeRounding::Floor
@ Floor
BackendId.hpp
armnn::DataType::Float32
@ Float32
armnn::GetDataLayoutName
constexpr const char * GetDataLayoutName(DataLayout dataLayout)
Definition: TypesUtils.hpp:253
armnn::ActivationFunction::TanH
@ TanH
armnn::LogicalBinaryOperation::LogicalOr
@ LogicalOr
armnn::PoolingAlgorithm::L2
@ L2
armnn::PaddingMode
PaddingMode
The padding mode controls whether the padding should be filled with constant values (Constant),...
Definition: Types.hpp:200
armnn::DataType::QAsymmU8
@ QAsymmU8
armnn::ArgMinMaxFunction
ArgMinMaxFunction
Definition: Types.hpp:103
armnn::ActivationFunction::BoundedReLu
@ BoundedReLu
min(a, max(b, input)) ReLu1 & ReLu6.
armnn::DataType::QSymmS8
@ QSymmS8
armnn::UnaryOperation::Neg
@ Neg
armnn::LogicalBinaryOperation
LogicalBinaryOperation
Definition: Types.hpp:119
armnn::GetActivationFunctionAsCString
constexpr char const * GetActivationFunctionAsCString(ActivationFunction activation)
Definition: TypesUtils.hpp:31
armnn::ReduceOperation::Mean
@ Mean
armnn::ActivationFunction::HardSwish
@ HardSwish
armnn::DataType::QSymmS16
@ QSymmS16
armnn::ActivationFunction::Gelu
@ Gelu
armnn::DataType::BFloat16
@ BFloat16
armnn::NormalizationAlgorithmChannel::Across
@ Across
armnn::ComparisonOperation::NotEqual
@ NotEqual
armnn::Compute
Compute
The Compute enum is now deprecated and it is now being replaced by BackendId.
Definition: BackendId.hpp:21
armnn::ComparisonOperation::GreaterOrEqual
@ GreaterOrEqual
armnn::FusedKernelType::AddMulAdd
@ AddMulAdd
armnn::GetPaddingMethodAsCString
constexpr char const * GetPaddingMethodAsCString(PaddingMethod method)
Definition: TypesUtils.hpp:149
armnn::GetFusedTypeAsCString
constexpr char const * GetFusedTypeAsCString(FusedKernelType type)
Definition: TypesUtils.hpp:119
armnn::DataLayout::NDHWC
@ NDHWC
armnn::TensorShape
Definition: Tensor.hpp:20
armnn::BinaryOperation::Maximum
@ Maximum
armnn::DataType::Float16
@ Float16
armnn::BinaryOperation::SqDiff
@ SqDiff
armnn::UnaryOperation::Rsqrt
@ Rsqrt
armnn::TensorShape::GetNumDimensions
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Definition: Tensor.cpp:174
armnn::ComparisonOperation::Less
@ Less
armnn::UnaryOperation::Sqrt
@ Sqrt
armnn::UnaryOperation::LogicalNot
@ LogicalNot
armnn::operator<<
std::ostream & operator<<(std::ostream &os, const std::vector< Compute > &compute)
Deprecated function that will be removed together with the Compute enum.
Definition: BackendId.hpp:47
armnn::UnaryOperation::Exp
@ Exp
armnn::GetPoolingAlgorithmAsCString
constexpr char const * GetPoolingAlgorithmAsCString(PoolingAlgorithm pooling)
Definition: TypesUtils.hpp:128
armnn::PaddingMethod::Exclude
@ Exclude
The padding fields don't count and are ignored.
armnn::DataType
DataType
Definition: Types.hpp:48
armnn::VerifyTensorInfoDataType
void VerifyTensorInfoDataType(const armnn::TensorInfo &info, armnn::DataType dataType)
Definition: TypesUtils.hpp:382
armnn::ActivationFunction::Elu
@ Elu
armnn::PaddingMethod::IgnoreValue
@ IgnoreValue
The padding fields count, but are ignored.
armnn::UnaryOperation::Sin
@ Sin
armnn::Dequantize
float Dequantize(QuantizedType value, float scale, int32_t offset)
Dequantize an 8-bit data type into a floating point data type.
Definition: TypesUtils.cpp:52
armnn::ActivationFunction::Linear
@ Linear
armnn::MemBlockStrategyType
MemBlockStrategyType
Definition: Types.hpp:253
armnn::ReduceOperation::Sum
@ Sum
armnn::GetDataTypeSize
constexpr unsigned int GetDataTypeSize(DataType dataType)
Definition: TypesUtils.hpp:182
armnn::MemBlockStrategyType::SingleAxisPacking
@ SingleAxisPacking
armnn::Status::Success
@ Success
armnn::Dimensionality::NotSpecified
@ NotSpecified
armnn::Exception
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46
armnn::Quantize
QuantizedType Quantize(float value, float scale, int32_t offset)
Quantize a floating point data type into an 8-bit data type.
Definition: TypesUtils.cpp:30
armnn::GetNormalizationAlgorithmChannelAsCString
constexpr const char * GetNormalizationAlgorithmChannelAsCString(NormalizationAlgorithmChannel channel)
Definition: TypesUtils.hpp:265
armnn::ResizeMethod::NearestNeighbor
@ NearestNeighbor
armnn::ActivationFunction
ActivationFunction
Definition: Types.hpp:86
armnn::BoostLogSeverityMapping::info
@ info
armnn::BinaryOperation::Power
@ Power
armnn::UnaryOperation
UnaryOperation
Definition: Types.hpp:125
armnn::PoolingAlgorithm::Average
@ Average
armnn::DataType::Signed32
@ Signed32
armnn::UnaryOperation::Ceil
@ Ceil
armnn::GetArgMinMaxFunctionAsCString
constexpr char const * GetArgMinMaxFunctionAsCString(ArgMinMaxFunction function)
Definition: TypesUtils.hpp:52
armnn::ReduceOperation::Prod
@ Prod
armnn::ActivationFunction::Abs
@ Abs
armnn::DataType::QAsymmS8
@ QAsymmS8
armnn::ResizeMethod::Bilinear
@ Bilinear
armnn::ArgMinMaxFunction::Min
@ Min
armnn::FusedKernelType
FusedKernelType
Definition: Types.hpp:266
armnn::GetOutputShapeRoundingAsCString
constexpr char const * GetOutputShapeRoundingAsCString(OutputShapeRounding rounding)
Definition: TypesUtils.hpp:139
armnn::UnaryOperation::Log
@ Log
armnn::GetPaddingModeAsCString
constexpr char const * GetPaddingModeAsCString(PaddingMode mode)
Definition: TypesUtils.hpp:159
armnn::LogicalBinaryOperation::LogicalAnd
@ LogicalAnd
armnn::ComparisonOperation
ComparisonOperation
Definition: Types.hpp:109
Tensor.hpp
armnn::Status
Status
Definition: Types.hpp:42
armnn::GetNormalizationAlgorithmMethodAsCString
constexpr const char * GetNormalizationAlgorithmMethodAsCString(NormalizationAlgorithmMethod method)
Definition: TypesUtils.hpp:275
armnn::BinaryOperation
BinaryOperation
Definition: Types.hpp:138
armnn::GetUnaryOperationAsCString
constexpr char const * GetUnaryOperationAsCString(UnaryOperation operation)
Definition: TypesUtils.hpp:92
armnn::GetReduceOperationAsCString
constexpr char const * GetReduceOperationAsCString(ReduceOperation reduce_operation)
Definition: TypesUtils.hpp:170
armnn::StrEqual
constexpr bool StrEqual(const char *strA, const char(&strB)[N])
Definition: TypesUtils.hpp:201
armnn::BinaryOperation::Minimum
@ Minimum
armnn::IsQuantizedType
constexpr bool IsQuantizedType()
Definition: TypesUtils.hpp:311
armnn::Compute::CpuAcc
@ CpuAcc
CPU Execution: NEON: ArmCompute.
armnn::ActivationFunction::ReLu
@ ReLu
Exceptions.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
Types.hpp
armnn::PoolingAlgorithm::Max
@ Max
armnn::ReduceOperation
ReduceOperation
Definition: Types.hpp:157
armnn::UnaryOperation::Abs
@ Abs
armnn::ReduceOperation::Min
@ Min
armnn::ActivationFunction::Square
@ Square
armnn::PoolingAlgorithm
PoolingAlgorithm
Definition: Types.hpp:150
armnn::BinaryOperation::Div
@ Div
armnn::OutputShapeRounding::Ceiling
@ Ceiling
armnn::DataType::Signed64
@ Signed64
armnn::NormalizationAlgorithmChannel
NormalizationAlgorithmChannel
Definition: Types.hpp:207
armnn::ComparisonOperation::Equal
@ Equal
armnn::NormalizationAlgorithmMethod::LocalContrast
@ LocalContrast
Jarret 2009: Local Contrast Normalization.
armnn::PaddingMethod
PaddingMethod
The padding method modifies the output of pooling layers.
Definition: Types.hpp:188
armnn::TensorShape::GetDimensionality
Dimensionality GetDimensionality() const
Function that returns the tensor type.
Definition: Tensor.hpp:92
armnn::PaddingMode::Reflect
@ Reflect
armnn::GetComparisonOperationAsCString
constexpr char const * GetComparisonOperationAsCString(ComparisonOperation operation)
Definition: TypesUtils.hpp:62
armnn::GetMemBlockStrategyTypeName
constexpr const char * GetMemBlockStrategyTypeName(MemBlockStrategyType memBlockStrategyType)
Definition: TypesUtils.hpp:295
armnn::PaddingMode::Constant
@ Constant
armnn::Status::Failure
@ Failure
armnn::ReduceOperation::Max
@ Max
armnn::DataLayout::NCHW
@ NCHW
armnn::ActivationFunction::Sigmoid
@ Sigmoid
armnn::ComparisonOperation::Greater
@ Greater