David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 1 | // |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 8 | #include "ClBaseWorkload.hpp" |
Matthew Bentham | 14e4669 | 2018-09-20 15:35:30 +0100 | [diff] [blame] | 9 | |
Matthew Bentham | 9b3e738 | 2020-02-05 21:39:55 +0000 | [diff] [blame] | 10 | #include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h> |
David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 15 | class ClSubtractionWorkload : public ClBaseWorkload<SubtractionQueueDescriptor> |
David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 16 | { |
| 17 | public: |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 18 | ClSubtractionWorkload(const SubtractionQueueDescriptor& descriptor, |
| 19 | const WorkloadInfo& info, |
| 20 | const arm_compute::CLCompileContext& clCompileContext); |
David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 21 | |
| 22 | void Execute() const override; |
| 23 | |
| 24 | private: |
| 25 | mutable arm_compute::CLArithmeticSubtraction m_Layer; |
| 26 | }; |
| 27 | |
arovir01 | 085f0a4 | 2018-10-08 14:48:19 +0100 | [diff] [blame] | 28 | arm_compute::Status ClSubtractionValidate(const TensorInfo& input0, |
| 29 | const TensorInfo& input1, |
Mike Kelly | 07810fc | 2020-11-12 10:58:48 +0000 | [diff] [blame] | 30 | const TensorInfo& output, |
| 31 | const ActivationDescriptor* activationDescriptor = nullptr); |
David Beck | 4a8692c | 2018-09-07 16:19:24 +0100 | [diff] [blame] | 32 | } //namespace armnn |