John Mcloughlin | 0ec0087 | 2023-05-15 17:03:49 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2023 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <iostream> |
| 9 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | template<typename T> |
| 14 | struct power |
| 15 | { |
| 16 | typedef T result_type; |
| 17 | typedef T first_argument_type; |
| 18 | |
| 19 | T |
| 20 | operator()(const T& input1, const T& input2) const |
| 21 | { |
| 22 | T power = armnn::numeric_cast<T>(std::pow(static_cast<float>(input1), static_cast<float>(input2))); |
| 23 | return power; |
| 24 | } |
| 25 | }; |
| 26 | |
| 27 | } //namespace armnn |