aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2019-05-14 10:22:36 +0100
committerUsama Arif <usama.arif@arm.com>2019-05-15 17:09:25 +0000
commit52c54f61b97bcedab309bfa761e193939e12e739 (patch)
treee99186abb3c6a69ef26b17e8fb57817ee56efe53 /arm_compute/runtime/CL/functions/CLElementwiseOperations.h
parenteb312ef6c20e8548c43eb9d4a3edf7265bc6777b (diff)
downloadComputeLibrary-52c54f61b97bcedab309bfa761e193939e12e739.tar.gz
COMPMID-2270: Implement POW operator for CL
Change-Id: Id14ecdc62439d90eb247bb75990d6593637cb42e Signed-off-by: Usama Arif <usama.arif@arm.com> Reviewed-on: https://review.mlplatform.org/c/1129 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLElementwiseOperations.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLElementwiseOperations.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arm_compute/runtime/CL/functions/CLElementwiseOperations.h b/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
index 1740bb0e4d..27215e81c1 100644
--- a/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
+++ b/arm_compute/runtime/CL/functions/CLElementwiseOperations.h
@@ -202,5 +202,33 @@ public:
*/
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output);
};
+
+/** Basic function to run @ref CLArithmeticOperationKernel for power
+ *
+ * @note The tensor data type for the inputs must be F16/F32.
+ * @note The function performs an elementwise power of in1 to in2 (i.e., out[i] = in1[i] ^ in2[i])
+ */
+class CLElementwisePower : public ICLSimpleFunction
+{
+public:
+ /** Initialise the kernel's inputs, output and conversion policy.
+ *
+ * @param[in, out] input1 First tensor input. Data types supported: F16/F32.
+ * The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
+ * @param[in, out] input2 Second tensor input. Data types supported: F16/F32.
+ * The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
+ * @param[out] output Output tensor. Data types supported:F16/F32.
+ */
+ void configure(ICLTensor *input1, ICLTensor *input2, ICLTensor *output);
+ /** Static function to check if given info will lead to a valid configuration of @ref CLArithmeticOperationKernel for power
+ *
+ * @param[in] input1 First tensor input info. Data types supported: F16/F32.
+ * @param[in] input2 Second tensor input info. Data types supported: F16/F32.
+ * @param[in] output Output tensor info. Data types supported: F16/F32.
+ *
+ * @return a status
+ */
+ static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output);
+};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLELEMENTWISEOPERATIONS_H__ */