From de36e4a9c299028e792c3a5bd99ad0816d806077 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 13 Mar 2020 16:26:19 +0000 Subject: IVGCVSW-3726 Upload ArmNN Doxygen files * Upload current ArmNN Doxygen files Signed-off-by: Ryan OShea Change-Id: I8989ed16ee40a99a4495b100bd009cf3e24a7285 --- .../classarmnn_utils_1_1_data_layout_indexed.html | 332 +++++++++++++++++++++ 1 file changed, 332 insertions(+) create mode 100644 Documentation/classarmnn_utils_1_1_data_layout_indexed.html (limited to 'Documentation/classarmnn_utils_1_1_data_layout_indexed.html') diff --git a/Documentation/classarmnn_utils_1_1_data_layout_indexed.html b/Documentation/classarmnn_utils_1_1_data_layout_indexed.html new file mode 100644 index 0000000000..0f319e5803 --- /dev/null +++ b/Documentation/classarmnn_utils_1_1_data_layout_indexed.html @@ -0,0 +1,332 @@ + + + + + + + +ArmNN: DataLayoutIndexed Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
ArmNN +  NotReleased +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
DataLayoutIndexed Class Reference
+
+
+ +

#include <DataLayoutIndexed.hpp>

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

+Public Member Functions

 DataLayoutIndexed (armnn::DataLayout dataLayout)
 
armnn::DataLayout GetDataLayout () const
 
unsigned int GetChannelsIndex () const
 
unsigned int GetHeightIndex () const
 
unsigned int GetWidthIndex () const
 
unsigned int GetIndex (const armnn::TensorShape &shape, unsigned int batchIndex, unsigned int channelIndex, unsigned int heightIndex, unsigned int widthIndex) const
 
+

Detailed Description

+
+

Definition at line 17 of file DataLayoutIndexed.hpp.

+

Constructor & Destructor Documentation

+ +

◆ DataLayoutIndexed()

+ +
+
+ + + + + + + + +
DataLayoutIndexed (armnn::DataLayout dataLayout)
+
+ +

Definition at line 13 of file DataLayoutIndexed.cpp.

+ +

References armnn::NCHW, and armnn::NHWC.

+
14  : m_DataLayout(dataLayout)
15 {
16  switch (dataLayout)
17  {
19  m_ChannelsIndex = 3;
20  m_HeightIndex = 1;
21  m_WidthIndex = 2;
22  break;
24  m_ChannelsIndex = 1;
25  m_HeightIndex = 2;
26  m_WidthIndex = 3;
27  break;
28  default:
29  throw armnn::InvalidArgumentException("Unknown DataLayout value: " +
30  std::to_string(static_cast<int>(dataLayout)));
31  }
32 }
+ + +
+
+
+

Member Function Documentation

+ +

◆ GetChannelsIndex()

+ + + +

◆ GetDataLayout()

+ +
+
+ + + + + +
+ + + + + + + +
armnn::DataLayout GetDataLayout () const
+
+inline
+
+ +

Definition at line 22 of file DataLayoutIndexed.hpp.

+ +

Referenced by CompareDepthwiseConvolution2dTestImpl(), armnn::GetOffset(), armnn::Offset(), and armnnUtils::operator==().

+
22 { return m_DataLayout; }
+
+
+ +

◆ GetHeightIndex()

+ + + +

◆ GetIndex()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
unsigned int GetIndex (const armnn::TensorShapeshape,
unsigned int batchIndex,
unsigned int channelIndex,
unsigned int heightIndex,
unsigned int widthIndex 
) const
+
+inline
+
+ +

Definition at line 27 of file DataLayoutIndexed.hpp.

+ +

References armnn::NCHW, armnn::NHWC, and armnnUtils::operator==().

+ +

Referenced by armnn::BatchNormImpl(), armnn::Convolve(), TensorBufferArrayView< DataType >::Get(), armnn::InstanceNorm(), armnn::Pooling2d(), armnn::Resize(), and armnn::TransposeConvolution2dImpl().

+
30  {
31  BOOST_ASSERT( batchIndex < shape[0] || ( shape[0] == 0 && batchIndex == 0 ) );
32  BOOST_ASSERT( channelIndex < shape[m_ChannelsIndex] ||
33  ( shape[m_ChannelsIndex] == 0 && channelIndex == 0) );
34  BOOST_ASSERT( heightIndex < shape[m_HeightIndex] ||
35  ( shape[m_HeightIndex] == 0 && heightIndex == 0) );
36  BOOST_ASSERT( widthIndex < shape[m_WidthIndex] ||
37  ( shape[m_WidthIndex] == 0 && widthIndex == 0) );
38 
39  // Offset the given indices appropriately depending on the data layout
40  switch (m_DataLayout)
41  {
43  batchIndex *= shape[1] * shape[2] * shape[3]; // batchIndex *= heightIndex * widthIndex * channelIndex
44  heightIndex *= shape[m_WidthIndex] * shape[m_ChannelsIndex];
45  widthIndex *= shape[m_ChannelsIndex];
46  // channelIndex stays unchanged
47  break;
49  default:
50  batchIndex *= shape[1] * shape[2] * shape[3]; // batchIndex *= heightIndex * widthIndex * channelIndex
51  channelIndex *= shape[m_HeightIndex] * shape[m_WidthIndex];
52  heightIndex *= shape[m_WidthIndex];
53  // widthIndex stays unchanged
54  break;
55  }
56 
57  // Get the value using the correct offset
58  return batchIndex + channelIndex + heightIndex + widthIndex;
59  }
+ +
+
+
+ +

◆ GetWidthIndex()

+ + +
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1