ArmNN
 20.02
LayerTestResult.hpp File Reference
#include <armnn/Tensor.hpp>
#include <boost/multi_array.hpp>
#include <cstddef>

Go to the source code of this file.

Classes

struct  LayerTestResult< T, n >
 

Functions

template<std::size_t n>
boost::array< unsigned int, n > GetTensorShapeAsArray (const armnn::TensorInfo &tensorInfo)
 

Function Documentation

◆ GetTensorShapeAsArray()

boost::array<unsigned int, n> GetTensorShapeAsArray ( const armnn::TensorInfo tensorInfo)

Definition at line 15 of file LayerTestResult.hpp.

References TensorInfo::GetNumDimensions(), and TensorInfo::GetShape().

16 {
17  BOOST_ASSERT_MSG(n == tensorInfo.GetNumDimensions(),
18  "Attempting to construct a shape array of mismatching size");
19 
20  boost::array<unsigned int, n> shape;
21  for (unsigned int i = 0; i < n; i++)
22  {
23  shape[i] = tensorInfo.GetShape()[i];
24  }
25  return shape;
26 }
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:92