Nattapat Chaimanowong | ae2c5f0 | 2019-04-24 16:19:57 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "RefActivationWorkload.hpp" |
| 7 | |
| 8 | #include "Activation.hpp" |
| 9 | #include "Decoders.hpp" |
| 10 | #include "Encoders.hpp" |
| 11 | #include "RefWorkloadUtils.hpp" |
| 12 | |
| 13 | #include "Profiling.hpp" |
| 14 | |
| 15 | namespace armnn |
| 16 | { |
| 17 | |
| 18 | void RefActivationWorkload::Execute() const |
| 19 | { |
| 20 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefActivationWorkload_Execute"); |
| 21 | |
| 22 | const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]); |
| 23 | const TensorInfo& outputInfo = GetTensorInfo(m_Data.m_Outputs[0]); |
| 24 | |
| 25 | Activation(*MakeDecoder<float>(inputInfo, m_Data.m_Inputs[0]->Map()), |
| 26 | *MakeEncoder<float>(outputInfo, m_Data.m_Outputs[0]->Map()), |
| 27 | inputInfo, |
| 28 | m_Data.m_Parameters.m_Function, |
| 29 | m_Data.m_Parameters.m_A, |
| 30 | m_Data.m_Parameters.m_B); |
| 31 | } |
| 32 | |
| 33 | } //namespace armnn |