Nattapat Chaimanowong | 1216b58 | 2018-11-23 15:33:41 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "RefStridedSliceWorkload.hpp" |
| 7 | #include "StridedSlice.hpp" |
| 8 | |
| 9 | #include "RefWorkloadUtils.hpp" |
| 10 | #include "TypeUtils.hpp" |
| 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | template<armnn::DataType DataType> |
| 16 | void RefStridedSliceWorkload<DataType>::Execute() const |
| 17 | { |
| 18 | using T = ResolveType<DataType>; |
| 19 | |
| 20 | ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute"); |
| 21 | |
| 22 | const TensorInfo& inputInfo = GetTensorInfo(m_Data.m_Inputs[0]); |
| 23 | const TensorInfo& outputInfo = GetTensorInfo(m_Data.m_Outputs[0]); |
| 24 | |
| 25 | const T* inputData = GetInputTensorData<T>(0, m_Data); |
| 26 | T* outputData = GetOutputTensorData<T>(0, m_Data); |
| 27 | |
| 28 | StridedSlice(inputInfo, outputInfo, m_Data.m_Parameters, inputData, outputData); |
| 29 | } |
| 30 | |
| 31 | template class RefStridedSliceWorkload<DataType::Float32>; |
| 32 | template class RefStridedSliceWorkload<DataType::QuantisedAsymm8>; |
| 33 | |
| 34 | } //namespace armnn |