Release 18.08
[platform/upstream/armnn.git] / src / armnn / backends / ClWorkloads / ClConvolution2dUint8Workload.hpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
4 //
5
6 #pragma once
7
8 #include "backends/ClWorkloadUtils.hpp"
9
10 #include "arm_compute/runtime/MemoryManagerOnDemand.h"
11
12 #include <memory>
13
14 namespace armnn
15 {
16
17 class ClConvolution2dUint8Workload : public Uint8Workload<Convolution2dQueueDescriptor>
18 {
19 public:
20     ClConvolution2dUint8Workload(const Convolution2dQueueDescriptor& descriptor, const WorkloadInfo& info,
21                                  std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager);
22     void Execute() const override;
23
24 private:
25     mutable arm_compute::CLConvolutionLayer m_ConvolutionLayer;
26
27     std::unique_ptr<arm_compute::CLTensor> m_KernelTensor;
28     std::unique_ptr<arm_compute::CLTensor> m_BiasTensor;
29
30     void FreeUnusedTensors();
31 };
32
33 } //namespace armnn
34