aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/src/cl/CLHelpers.h
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-08-22 11:11:23 +0100
committerViet-Hoa Do <viet-hoa.do@arm.com>2023-08-24 09:48:58 +0000
commit34b6c3a08c3fd3f99cf675921a319b8678a98273 (patch)
treeb52068faf874063b79f0e4ddd7d587e785bb65bf /compute_kernel_writer/src/cl/CLHelpers.h
parent3a9ecdfdc76abd7f9acdab42a1f7e4c0188d6f48 (diff)
downloadComputeLibrary-34b6c3a08c3fd3f99cf675921a319b8678a98273.tar.gz
Add CKW binary and ternary statements
Resolves: COMPMID-6388 Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com> Change-Id: Ia0cd1486f368af54053066f489cac83b9de01789 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10182 Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/src/cl/CLHelpers.h')
-rw-r--r--compute_kernel_writer/src/cl/CLHelpers.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/compute_kernel_writer/src/cl/CLHelpers.h b/compute_kernel_writer/src/cl/CLHelpers.h
index 3c1a7724e2..370ffc700c 100644
--- a/compute_kernel_writer/src/cl/CLHelpers.h
+++ b/compute_kernel_writer/src/cl/CLHelpers.h
@@ -70,9 +70,36 @@ std::string cl_get_assignment_op_as_string(AssignmentOp op);
* - str: the function name or the operator in OpenCL language.
*
* @param[in] op The unary operator.
+ *
+ * @return The information about the unary operation.
*/
std::tuple<bool, std::string> cl_get_unary_op(UnaryOp op);
+/** Return the information about the binary operation.
+ *
+ * The result contains:
+ * - is_func: true if it's a function and false if it's an binary operator in OpenCL language.
+ * - str: the function name or the operator in OpenCL language.
+ *
+ * @param[in] op The binary operator.
+ * @param[in] data_type The input data type.
+ *
+ * @return The information about the binary operation.
+ */
+std::tuple<bool, std::string> cl_get_binary_op(BinaryOp op, DataType data_type);
+
+/** Return the information about the ternary operation.
+ *
+ * The result contains:
+ * - is_func: true if it's a function and false if it's a ternary operator in OpenCL language.
+ * - str: the function name or the operator in OpenCL language.
+ *
+ * @param[in] op The ternary operator.
+ *
+ * @return The information about the ternary operation.
+ */
+std::tuple<bool, std::string> cl_get_ternary_op(TernaryOp op);
+
/** Helper function to return the OpenCL vector size that accommodate the the desired width
*
* @param[in] width The desired width