From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/classarmnn_1_1_tensor_shape.xhtml | 430 ++++++++++++++++++++++++++++++++ 1 file changed, 430 insertions(+) create mode 100644 20.02/classarmnn_1_1_tensor_shape.xhtml (limited to '20.02/classarmnn_1_1_tensor_shape.xhtml') diff --git a/20.02/classarmnn_1_1_tensor_shape.xhtml b/20.02/classarmnn_1_1_tensor_shape.xhtml new file mode 100644 index 0000000000..536257c04e --- /dev/null +++ b/20.02/classarmnn_1_1_tensor_shape.xhtml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + +ArmNN: TensorShape Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TensorShape Class Reference
+
+
+ +

#include <Tensor.hpp>

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

+Public Member Functions

 TensorShape ()
 Empty (invalid) constructor. More...
 
 TensorShape (unsigned int numDimensions)
 
 TensorShape (unsigned int numDimensions, const unsigned int *dimensionSizes)
 
 TensorShape (std::initializer_list< unsigned int > dimensionSizeList)
 
 TensorShape (const TensorShape &other)
 
TensorShapeoperator= (const TensorShape &other)
 
unsigned int operator[] (unsigned int i) const
 
unsigned int & operator[] (unsigned int i)
 
bool operator== (const TensorShape &other) const
 
bool operator!= (const TensorShape &other) const
 
unsigned int GetNumDimensions () const
 
unsigned int GetNumElements () const
 
+

Detailed Description

+
+

Definition at line 20 of file Tensor.hpp.

+

Constructor & Destructor Documentation

+ +

◆ TensorShape() [1/5]

+ +
+
+ + + + + + + +
TensorShape ()
+
+ +

Empty (invalid) constructor.

+ +

Definition at line 23 of file Tensor.cpp.

+
24  : m_NumDimensions(0)
25 {
26 }
+
+
+ +

◆ TensorShape() [2/5]

+ +
+
+ + + + + + + + +
TensorShape (unsigned int numDimensions)
+
+ +

Definition at line 28 of file Tensor.cpp.

+ +

References armnn::MaxNumOfTensorDimensions.

+
29  : m_NumDimensions(numDimensions)
30 {
31  if (numDimensions < 1)
32  {
33  throw InvalidArgumentException("Tensor numDimensions must be greater than 0");
34  }
35 
36  if (numDimensions > MaxNumOfTensorDimensions)
37  {
38  throw InvalidArgumentException("Tensor numDimensions must be less than or equal to MaxNumOfTensorDimensions");
39  }
40 
41  std::fill(m_Dimensions.begin(), m_Dimensions.begin() + m_NumDimensions, 0);
42 }
constexpr unsigned int MaxNumOfTensorDimensions
Definition: Types.hpp:18
+
+
+
+ +

◆ TensorShape() [3/5]

+ +
+
+ + + + + + + + + + + + + + + + + + +
TensorShape (unsigned int numDimensions,
const unsigned int * dimensionSizes 
)
+
+ +

Definition at line 44 of file Tensor.cpp.

+ +

References armnn::MaxNumOfTensorDimensions.

+
45  : m_NumDimensions(numDimensions)
46 {
47  if (numDimensions < 1)
48  {
49  throw InvalidArgumentException("Tensor numDimensions must be greater than 0");
50  }
51 
52  if (numDimensions > MaxNumOfTensorDimensions)
53  {
54  throw InvalidArgumentException("Tensor numDimensions must be less than or equal to MaxNumOfTensorDimensions");
55  }
56 
57  if (dimensionSizes == nullptr)
58  {
59  throw InvalidArgumentException("Tensor dimensionSizes must not be NULL");
60  }
61 
62  std::copy(dimensionSizes, dimensionSizes + numDimensions, m_Dimensions.begin());
63 }
constexpr unsigned int MaxNumOfTensorDimensions
Definition: Types.hpp:18
+
+
+
+ +

◆ TensorShape() [4/5]

+ +
+
+ + + + + + + + +
TensorShape (std::initializer_list< unsigned int > dimensionSizeList)
+
+ +

Definition at line 65 of file Tensor.cpp.

+
66  : TensorShape(boost::numeric_cast<unsigned int>(dimensionSizeList.size()), dimensionSizeList.begin())
67 {
68 }
TensorShape()
Empty (invalid) constructor.
Definition: Tensor.cpp:23
+
+
+
+ +

◆ TensorShape() [5/5]

+ +
+
+ + + + + + + + +
TensorShape (const TensorShapeother)
+
+ +

Definition at line 70 of file Tensor.cpp.

+
71  : m_NumDimensions(other.m_NumDimensions)
72 {
73  std::copy(other.m_Dimensions.cbegin(), other.m_Dimensions.cbegin() + other.m_NumDimensions, m_Dimensions.begin());
74 }
+
+
+

Member Function Documentation

+ +

◆ GetNumDimensions()

+ +
+
+ + + + + +
+ + + + + + + +
unsigned int GetNumDimensions () const
+
+inline
+
+ +

Definition at line 43 of file Tensor.hpp.

+ +

References TensorShape::GetNumElements().

+ +

Referenced by armnn::BatchToSpaceNd(), armnn::boost_test_print_type(), ShapesAreBroadcastCompatible::CalcInputSize(), armnnDeserializer::CheckShape(), ClStackWorkload::ClStackWorkload(), armnnUtils::ConvertTensorShapeToString(), armnn::CopyTensorContentsGeneric(), OnnxParser::CreateNetworkFromString(), RefL2NormalizationWorkload::Execute(), armnnUtils::ExpandDims(), ExpandTensorShapeTo3dForPermute(), armnnUtils::GetNumElementsAfter(), armnnUtils::GetNumElementsBetween(), SerializerVisitor::GetVersionTable(), ArgMinMaxLayer::InferOutputShapes(), PreluLayer::InferOutputShapes(), ComparisonLayer::InferOutputShapes(), StackLayer::InferOutputShapes(), armnn::LogSoftmax(), NeonStackWorkload::NeonStackWorkload(), armnn::operator<<(), armnnTfParser::OutputShapeOfExpandDims(), armnnTfParser::OutputShapeOfSqueeze(), armnn::Pad(), armnnUtils::Permuted(), ParserPrototxtFixture< armnnOnnxParser::IOnnxParser >::RunTest(), ShapesAreBroadcastCompatible::ShapesAreBroadcastCompatible(), ShapesAreSameRank::ShapesAreSameRank(), armnn::Slice(), armnn::Softmax(), TensorBufferArrayView< DataType >::TensorBufferArrayView(), TfParser::TfParser(), armnnUtils::TransposeTensorShape(), StackQueueDescriptor::Validate(), ArgMinMaxQueueDescriptor::Validate(), SerializerVisitor::VisitQuantizedLstmLayer(), SerializerVisitor::VisitReshapeLayer(), and SerializerVisitor::VisitStackLayer().

+
43 { return m_NumDimensions; }
+
+
+ +

◆ GetNumElements()

+ +
+
+ + + + + + + +
unsigned int GetNumElements () const
+
+ +

Definition at line 106 of file Tensor.cpp.

+ +

References CHECK_LOCATION.

+ +

Referenced by armnn::DepthToSpace(), armnnUtils::FindMinMax(), TensorShape::GetNumDimensions(), and armnn::TransposeConvolution2dImpl().

+
107 {
108  if (m_NumDimensions == 0)
109  {
110  return 0;
111  }
112 
113  unsigned int count = 1;
114  for (unsigned int i = 0; i < m_NumDimensions; i++)
115  {
116  count *= m_Dimensions[i];
117  }
118 
119  return count;
120 }
+
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool operator!= (const TensorShapeother) const
+
+ +

Definition at line 101 of file Tensor.cpp.

+
102 {
103  return !(*this == other);
104 }
+
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
TensorShape & operator= (const TensorShapeother)
+
+ +

Definition at line 76 of file Tensor.cpp.

+
77 {
78  m_NumDimensions = other.m_NumDimensions;
79  std::copy(other.m_Dimensions.cbegin(), other.m_Dimensions.cbegin() + other.m_NumDimensions, m_Dimensions.begin());
80  return *this;
81 }
+
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool operator== (const TensorShapeother) const
+
+ +

Definition at line 95 of file Tensor.cpp.

+ +

Referenced by TensorInfo::HasMultipleQuantizationScales().

+
96 {
97  return ((m_NumDimensions == other.m_NumDimensions) &&
98  std::equal(m_Dimensions.cbegin(), m_Dimensions.cbegin() + m_NumDimensions, other.m_Dimensions.cbegin()));
99 }
+
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
unsigned int operator[] (unsigned int i) const
+
+ +

Definition at line 83 of file Tensor.cpp.

+
84 {
85  CheckDimensionIndex(i);
86  return m_Dimensions.at(i);
87 }
+
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
unsigned int & operator[] (unsigned int i)
+
+ +

Definition at line 89 of file Tensor.cpp.

+
90 {
91  CheckDimensionIndex(i);
92  return m_Dimensions.at(i);
93 }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1