telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
David Beck | ac42efd | 2018-09-26 17:41:13 +0100 | [diff] [blame] | 8 | #include <backends/Workload.hpp> |
| 9 | #include <backends/WorkloadData.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 10 | |
| 11 | #include <armnn/Types.hpp> |
| 12 | |
| 13 | namespace armnn |
| 14 | { |
| 15 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 16 | // Base class template providing an implementation of the Constant layer common to all data types. |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 17 | template <armnn::DataType DataType> |
| 18 | class RefBaseConstantWorkload : public TypedWorkload<ConstantQueueDescriptor, DataType> |
| 19 | { |
| 20 | public: |
| 21 | RefBaseConstantWorkload(const ConstantQueueDescriptor& descriptor, const WorkloadInfo& info) |
| 22 | : TypedWorkload<ConstantQueueDescriptor, DataType>(descriptor, info) |
| 23 | , m_RanOnce(false) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | virtual void Execute() const override; |
| 28 | |
| 29 | private: |
| 30 | mutable bool m_RanOnce; |
| 31 | }; |
| 32 | |
| 33 | } //namespace armnn |