aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/Power.hpp
diff options
context:
space:
mode:
authorJohn Mcloughlin <john.mcloughlin@arm.com>2023-05-15 17:03:49 +0100
committerJohn Mcloughlin <john.mcloughlin@arm.com>2023-05-17 12:29:54 +0100
commit0ec008761ab26110dcb108d544be4040a14fd403 (patch)
tree87bbc145ff2a4ea3221440b0fbd7c91a5b8a7c91 /src/backends/reference/workloads/Power.hpp
parent499ebd917d8399f0a9d4d7e6e40a0ec321a4bab4 (diff)
downloadarmnn-0ec008761ab26110dcb108d544be4040a14fd403.tar.gz
IVGCVSW-7400 POW IVGCVSW-7278 SQUARED_DIFFERENCE.
* Added 2 new operators as ElementWiseBinary ops * Ref End to End and unit tests * Serialize and Deserialize tests * Delegate and Opaque Delegate tests * TfLite Parser tests Signed-off-by: John Mcloughlin <john.mcloughlin@arm.com> Change-Id: I537158127f602f0c41ca0402aa31655cd3bd4281
Diffstat (limited to 'src/backends/reference/workloads/Power.hpp')
-rw-r--r--src/backends/reference/workloads/Power.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/backends/reference/workloads/Power.hpp b/src/backends/reference/workloads/Power.hpp
new file mode 100644
index 0000000000..744328e8bf
--- /dev/null
+++ b/src/backends/reference/workloads/Power.hpp
@@ -0,0 +1,27 @@
+//
+// Copyright © 2023 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <iostream>
+
+namespace armnn
+{
+
+template<typename T>
+struct power
+{
+ typedef T result_type;
+ typedef T first_argument_type;
+
+ T
+ operator()(const T& input1, const T& input2) const
+ {
+ T power = armnn::numeric_cast<T>(std::pow(static_cast<float>(input1), static_cast<float>(input2)));
+ return power;
+ }
+};
+
+} //namespace armnn