narpra01 | 4951d84 | 2019-01-18 16:53:53 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <backendsCommon/Workload.hpp> |
| 9 | #include <backendsCommon/WorkloadData.hpp> |
| 10 | |
| 11 | #include <armnn/TypesUtils.hpp> |
| 12 | |
| 13 | namespace armnn |
| 14 | { |
| 15 | |
| 16 | template <armnn::DataType DataType> |
| 17 | class RefGatherWorkload : public FirstInputTypedWorkload<GatherQueueDescriptor, DataType> |
| 18 | { |
| 19 | public: |
| 20 | |
| 21 | static const std::string& GetName() |
| 22 | { |
| 23 | static const std::string name = std::string("RefGather") + GetDataTypeName(DataType) + "Workload"; |
| 24 | return name; |
| 25 | } |
| 26 | |
| 27 | using FirstInputTypedWorkload<GatherQueueDescriptor, DataType>::m_Data; |
| 28 | using FirstInputTypedWorkload<GatherQueueDescriptor, DataType>::FirstInputTypedWorkload; |
| 29 | |
| 30 | void Execute() const override; |
| 31 | }; |
| 32 | |
| 33 | using RefGatherFloat32Workload = RefGatherWorkload<DataType::Float32>; |
| 34 | using RefGatherUint8Workload = RefGatherWorkload<DataType::QuantisedAsymm8>; |
| 35 | |
| 36 | } // namespace armnn |