Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 1 | // |
Matthew Sloyan | 21a6a1a | 2022-06-30 17:13:04 +0100 | [diff] [blame] | 2 | // Copyright © 2022 Arm Ltd and Contributors. All rights reserved. |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "BaseIterator.hpp" |
| 9 | |
Finn Williams | 73c547d | 2022-02-15 20:47:34 +0000 | [diff] [blame] | 10 | #include "RefBaseWorkload.hpp" |
Colm Donelan | 0c47974 | 2021-12-10 12:43:54 +0000 | [diff] [blame] | 11 | #include <armnn/backends/WorkloadData.hpp> |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 12 | |
| 13 | namespace armnn |
| 14 | { |
| 15 | |
Finn Williams | 73c547d | 2022-02-15 20:47:34 +0000 | [diff] [blame] | 16 | class RefComparisonWorkload : public RefBaseWorkload<ComparisonQueueDescriptor> |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 17 | { |
| 18 | public: |
Finn Williams | 73c547d | 2022-02-15 20:47:34 +0000 | [diff] [blame] | 19 | using RefBaseWorkload<ComparisonQueueDescriptor>::m_Data; |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 20 | |
| 21 | RefComparisonWorkload(const ComparisonQueueDescriptor& descriptor, const WorkloadInfo& info); |
| 22 | void PostAllocationConfigure() override; |
| 23 | void Execute() const override; |
Matthew Sloyan | 21a6a1a | 2022-06-30 17:13:04 +0100 | [diff] [blame] | 24 | void ExecuteAsync(ExecutionData& executionData) override; |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 25 | |
| 26 | private: |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 27 | void PostAllocationConfigure(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs); |
| 28 | void Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const; |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 29 | using InType = float; |
| 30 | using OutType = bool; |
| 31 | |
| 32 | std::unique_ptr<Decoder<InType>> m_Input0; |
| 33 | std::unique_ptr<Decoder<InType>> m_Input1; |
| 34 | std::unique_ptr<Encoder<OutType>> m_Output; |
| 35 | }; |
| 36 | |
| 37 | } // namespace armnn |