From 34b6c3a08c3fd3f99cf675921a319b8678a98273 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Tue, 22 Aug 2023 11:11:23 +0100 Subject: Add CKW binary and ternary statements Resolves: COMPMID-6388 Signed-off-by: Viet-Hoa Do Change-Id: Ia0cd1486f368af54053066f489cac83b9de01789 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10182 Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- compute_kernel_writer/src/cl/CLHelpers.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'compute_kernel_writer/src/cl/CLHelpers.h') 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 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 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 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 -- cgit v1.2.1