xref: /aosp_15_r20/external/armnn/src/backends/cl/workloads/ClMeanWorkload.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 "ClBaseWorkload.hpp"
9 
10 #include <arm_compute/runtime/CL/functions/CLReduceMean.h>
11 
12 namespace armnn
13 {
14 
15 arm_compute::Status ClMeanValidate(const TensorInfo& input,
16                                    const TensorInfo& output,
17                                    const MeanDescriptor& descriptor);
18 
19 class ClMeanWorkload : public ClBaseWorkload<MeanQueueDescriptor>
20 {
21 public:
22     ClMeanWorkload(const MeanQueueDescriptor& descriptor,
23                    const WorkloadInfo& info,
24                    const arm_compute::CLCompileContext& clCompileContext);
25 
26     void Execute() const override;
27 
28 private:
29     // Not using CLMeanStdDev, as 4D input tensor support for Mean has been added to a new function called CLReduceMean.
30     mutable arm_compute::CLReduceMean m_Layer;
31 };
32 
33 } //namespace armnn
34