blob: 4da3bbd703657e61d59a01ac58bc8804422b30bf [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5
arovir019e53a352018-08-31 15:26:35 +01006#include "ClReshapeFloatWorkload.hpp"
David Beckac42efd2018-09-26 17:41:13 +01007#include <backends/cl/ClTensorHandle.hpp>
8#include <backends/CpuTensorHandle.hpp>
telsoa014fcda012018-03-09 14:13:49 +00009
Matthew Bentham14e46692018-09-20 15:35:30 +010010#include "ClWorkloadUtils.hpp"
11
telsoa014fcda012018-03-09 14:13:49 +000012namespace armnn
13{
14
arovir019e53a352018-08-31 15:26:35 +010015ClReshapeFloatWorkload::ClReshapeFloatWorkload(const ReshapeQueueDescriptor& descriptor, const WorkloadInfo& info)
telsoa01c577f2c2018-08-31 09:22:23 +010016 : FloatWorkload<ReshapeQueueDescriptor>(descriptor, info)
telsoa014fcda012018-03-09 14:13:49 +000017{
arovir019e53a352018-08-31 15:26:35 +010018 m_Data.ValidateInputsOutputs("ClReshapeFloatWorkload", 1, 1);
telsoa014fcda012018-03-09 14:13:49 +000019
20 arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
21 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
22
23 m_Layer.configure(&input, &output);
24}
25
arovir019e53a352018-08-31 15:26:35 +010026void ClReshapeFloatWorkload::Execute() const
telsoa014fcda012018-03-09 14:13:49 +000027{
arovir019e53a352018-08-31 15:26:35 +010028 ARMNN_SCOPED_PROFILING_EVENT_CL("ClReshapeFloatWorkload_Execute");
telsoa014fcda012018-03-09 14:13:49 +000029 m_Layer.run();
30}
31
32} //namespace armnn
33