24 std::vector<ITensorHandle*> outputs)
const
36 auto getNumberOfElements = [](
const TensorShape& tensorShape,uint32_t startAxis, uint32_t lastAxis)
39 for (uint32_t i = startAxis; i < lastAxis; i++)
41 count *= tensorShape[i];
46 uint32_t channelsAxis =
m_Data.m_Parameters.m_Axis;
48 const uint32_t numGroups =
m_Data.m_Parameters.m_NumGroups;
49 const uint32_t groupSize = tensorShape[channelsAxis] / numGroups;
51 uint32_t outerSize = getNumberOfElements(tensorShape, 0, channelsAxis);
52 uint32_t innerSize = getNumberOfElements(tensorShape, channelsAxis + 1, tensorShape.GetNumDimensions());
54 for (uint32_t outer = 0; outer < outerSize; ++outer)
56 for (uint32_t inner = 0; inner < innerSize; ++inner)
58 uint32_t decoderStep1 = outer * tensorShape[channelsAxis] * innerSize + inner;
59 decoder += decoderStep1;
60 uint32_t encoderStep1 = outer * tensorShape[channelsAxis] * innerSize + inner;
61 encoder += encoderStep1;
62 for (uint32_t i = 0; i < groupSize; i++)
64 for (uint32_t j = 0; j < numGroups; j++, encoder += innerSize, encoderStep1 += innerSize)
66 decoder += innerSize * (i + j * groupSize);
67 float decoded = decoder.
Get();
69 decoder -= innerSize * (i + j * groupSize);
72 decoder -= decoderStep1;
73 encoder -= encoderStep1;
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
ChannelShuffleQueueDescriptor m_Data
virtual IType Get() const =0
void Execute() const override
const TensorShape & GetShape() const
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< Decoder< T > > MakeDecoder(const TensorInfo &info, const void *data=nullptr)
std::unique_ptr< Encoder< T > > MakeEncoder(const TensorInfo &info, void *data=nullptr)
armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)