Francis Murtagh | 43aec58 | 2019-05-27 12:14:10 +0100 | [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 | #include "BaseIterator.hpp" |
| 11 | #include "Decoders.hpp" |
| 12 | #include "Encoders.hpp" |
| 13 | |
| 14 | |
| 15 | namespace armnn |
| 16 | { |
| 17 | |
| 18 | class RefFullyConnectedWorkload : public BaseWorkload<FullyConnectedQueueDescriptor> |
| 19 | { |
| 20 | public: |
| 21 | explicit RefFullyConnectedWorkload(const FullyConnectedQueueDescriptor& descriptor, |
| 22 | const WorkloadInfo& info); |
| 23 | |
| 24 | void PostAllocationConfigure() override; |
| 25 | |
| 26 | virtual void Execute() const override; |
| 27 | |
| 28 | private: |
| 29 | std::unique_ptr<ScopedCpuTensorHandle> m_Weight; |
| 30 | std::unique_ptr<ScopedCpuTensorHandle> m_Bias; |
| 31 | |
| 32 | std::unique_ptr<Decoder<float>> m_InputDecoder; |
| 33 | std::unique_ptr<Encoder<float>> m_OutputEncoder; |
| 34 | std::unique_ptr<Decoder<float>> m_WeightDecoder; |
| 35 | std::unique_ptr<Decoder<float>> m_BiasDecoder; |
| 36 | |
| 37 | TensorShape m_InputShape; |
| 38 | TensorShape m_OutputShape; |
| 39 | TensorShape m_WeightShape; |
| 40 | unsigned int m_NumActivations; |
| 41 | }; |
| 42 | |
| 43 | } //namespace armnn |