diff options
Diffstat (limited to 'compute_kernel_writer/src/cl/CLHelpers.h')
-rw-r--r-- | compute_kernel_writer/src/cl/CLHelpers.h | 27 |
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 |