blob: 848aac667bca53668d6208e70f3ddd69a9e73efe [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;
30 arm_compute::Tensor m_outputMul;
31 arm_compute::Tensor m_FlattenedIndices;
32 arm_compute::Tensor m_outputGather;
33
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