xref: /aosp_15_r20/external/armnn/src/backends/neon/workloads/NeonMinimumWorkload.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2017 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 <neon/workloads/NeonWorkloadUtils.hpp>
11 
12 #include <arm_compute/runtime/NEON/functions/NEElementwiseOperations.h>
13 
14 namespace armnn
15 {
16 
17 /// Validate function for validating the inputs and output.
18 /// @param [in] input0 The input0 value to be validated.
19 /// @param [in] input1 The input1 value to be validated.
20 /// @param [in] output The output value to be validated.
21 arm_compute::Status NeonMinimumWorkloadValidate(const TensorInfo& input0,
22                                                 const TensorInfo& input1,
23                                                 const TensorInfo& output);
24 
25 class NeonMinimumWorkload : public NeonBaseWorkload<MinimumQueueDescriptor>
26 {
27 public:
28     /// Create a NeonMinimumWorkload.
29     /// @param [in] descriptor The MinimumQueueDescriptor to configure this operation.
30     /// @param [in] info The workload where this operation can be found.
31     NeonMinimumWorkload(const MinimumQueueDescriptor& descriptor, const WorkloadInfo& info);
32 
33     /// Execute the Minimum operation.
34     virtual void Execute() const override;
35 
36 private:
37     mutable arm_compute::NEElementwiseMin m_MinLayer;
38 };
39 
40 } //namespace armnn
41