blob: e9588f4d4157aafc50bb6873d17bbc82d98b80c2 [file] [log] [blame]
Teresa Charlinbd22c7d2022-04-26 18:14:12 +01001//
2// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include "NeonBaseWorkload.hpp"
9
10#include "arm_compute/runtime/Tensor.h"
11#include "arm_compute/runtime/NEON/functions/NEGather.h"
12#include "arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h"
13#include "arm_compute/runtime/NEON/functions/NEReductionOperation.h"
14#include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h"
15
16namespace armnn
17{
18arm_compute::Status NeonGatherNdWorkloadValidate(const TensorInfo& input,
19 const TensorInfo& indices,
20 const TensorInfo& output);
21
22class NeonGatherNdWorkload : public NeonBaseWorkload<GatherNdQueueDescriptor>
23{
24public:
25 NeonGatherNdWorkload(const GatherNdQueueDescriptor& descriptor, const WorkloadInfo& info);
26 virtual void Execute() const override;
27
28private:
29 arm_compute::Tensor m_FlattenedCoeff;
Teresa Charlinb190da22022-05-09 16:25:47 +010030 arm_compute::Tensor m_OutputMul;
Teresa Charlinbd22c7d2022-04-26 18:14:12 +010031 arm_compute::Tensor m_FlattenedIndices;
Teresa Charlinb190da22022-05-09 16:25:47 +010032 arm_compute::Tensor m_OutputGather;
Teresa Charlinbd22c7d2022-04-26 18:14:12 +010033
34 mutable arm_compute::NEPixelWiseMultiplication m_MulLayer;
35 mutable arm_compute::NEReductionOperation m_ReduceSumLayer;
36 mutable arm_compute::NEGather m_GatherLayer;
37 mutable arm_compute::NEReshapeLayer m_ReshapeLayer;
38
39};
40
41} //namespace armnn