Release 18.08
[platform/upstream/armnn.git] / src / armnn / backends / ClWorkloads / ClReshapeUint8Workload.cpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // See LICENSE file in the project root for full license information.
4 //
5
6 #include "ClReshapeUint8Workload.hpp"
7 #include "backends/ClTensorHandle.hpp"
8 #include "backends/CpuTensorHandle.hpp"
9
10 namespace armnn
11 {
12 ClReshapeUint8Workload::ClReshapeUint8Workload(const ReshapeQueueDescriptor& descriptor, const WorkloadInfo& info)
13     : Uint8Workload<ReshapeQueueDescriptor>(descriptor, info)
14 {
15     m_Data.ValidateInputsOutputs("ClReshapeUint8Workload", 1, 1);
16
17     arm_compute::ICLTensor& input  = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
18     arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
19     m_Layer.configure(&input, &output);
20 }
21
22 void ClReshapeUint8Workload::Execute() const
23 {
24     ARMNN_SCOPED_PROFILING_EVENT_CL("ClReshapeUint8Workload_Execute");
25
26     m_Layer.run();
27 }
28
29 } //namespace armnn