16 template <
typename DataType>
24 , m_DataLayout(dataLayout)
27 "Only $d tensors are supported by TensorBufferArrayView.");
30 DataType&
Get(
unsigned int b,
unsigned int c,
unsigned int h,
unsigned int w)
const
32 return m_Data[m_DataLayout.
GetIndex(m_Shape, b, c, h, w)];
#define ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(_cond, _str)
TensorBufferArrayView(const TensorShape &shape, DataType *data, armnnUtils::DataLayoutIndexed dataLayout=DataLayout::NCHW)
DataType & Get(unsigned int b, unsigned int c, unsigned int h, unsigned int w) const
unsigned int GetNumDimensions() const
Function that returns the tensor rank.
Provides access to the appropriate indexes for Channels, Height and Width based on DataLayout.
unsigned int GetIndex(const armnn::TensorShape &shape, unsigned int batchIndex, unsigned int channelIndex, unsigned int heightIndex, unsigned int widthIndex) const
Copyright (c) 2021 ARM Limited and Contributors.