Matteo Martincigh | ab9e525 | 2019-06-13 17:27:46 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "RefPreluWorkload.hpp" |
| 7 | |
| 8 | #include "RefWorkloadUtils.hpp" |
| 9 | #include "PreluImpl.hpp" |
| 10 | |
| 11 | #include <Profiling.hpp> |
| 12 | |
| 13 | namespace armnn |
| 14 | { |
| 15 | |
| 16 | RefPreluWorkload::RefPreluWorkload(const PreluQueueDescriptor& descriptor, |
| 17 | const WorkloadInfo& info) |
| 18 | : BaseWorkload(descriptor, info) |
| 19 | {} |
| 20 | |
| 21 | void RefPreluWorkload::Execute() const |
| 22 | { |
| 23 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefPreluWorkload_Execute"); |
| 24 | |
| 25 | std::unique_ptr<Decoder<float>> inputDecoder = MakeDecoder<float>(GetTensorInfo(m_Data.m_Inputs[0]), |
| 26 | m_Data.m_Inputs[0]->Map()); |
| 27 | std::unique_ptr<Decoder<float>> alphaDecoder = MakeDecoder<float>(GetTensorInfo(m_Data.m_Inputs[1]), |
| 28 | m_Data.m_Inputs[1]->Map()); |
| 29 | std::unique_ptr<Encoder<float>> outputEncoder = MakeEncoder<float>(GetTensorInfo(m_Data.m_Outputs[0]), |
| 30 | m_Data.m_Outputs[0]->Map()); |
| 31 | |
| 32 | PreluImpl(m_Data, *inputDecoder, *alphaDecoder, *outputEncoder); |
| 33 | } |
| 34 | |
| 35 | } // namespace armnn |