aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/include/ckw/KernelWriter.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/include/ckw/KernelWriter.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/include/ckw/KernelWriter.h')
-rw-r--r--compute_kernel_writer/include/ckw/KernelWriter.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/compute_kernel_writer/include/ckw/KernelWriter.h b/compute_kernel_writer/include/ckw/KernelWriter.h
index 7eb6d2894a..d59867fa6f 100644
--- a/compute_kernel_writer/include/ckw/KernelWriter.h
+++ b/compute_kernel_writer/include/ckw/KernelWriter.h
@@ -100,10 +100,29 @@ public:
/** Write the unary expression statement: `<dst> = <op> <src>;`.
*
* @param[in] dst The destination tile.
- * @param[in] src The source tile.
* @param[in] op The unary operator.
+ * @param[in] src The source tile.
+ */
+ virtual void op_unary(const TileOperand &dst, UnaryOp op, const TileOperand &src) = 0;
+
+ /** Write the binary expression statement: `<dst> = <op>(<first>, <second>);`.
+ *
+ * @param[in] dst The destination tile.
+ * @param[in] op The binary operator.
+ * @param[in] first The first source tile.
+ * @param[in] second The second source tile.
+ */
+ virtual void op_binary(const TileOperand &dst, BinaryOp op, const TileOperand &first, const TileOperand &second) = 0;
+
+ /** Write ternary expression statement: `<dst> = <op>(<first>, <second>, <third>);`.
+ *
+ * @param[in] dst The destination tile.
+ * @param[in] op The ternary operator.
+ * @param[in] first The first source tile.
+ * @param[in] second The second source tile.
+ * @param[in] third The third source tile.
*/
- virtual void op_unary(const TileOperand &dst, const TileOperand &src, UnaryOp op) = 0;
+ virtual void op_ternary(const TileOperand &dst, TernaryOp op, const TileOperand &first, const TileOperand &second, const TileOperand &third) = 0;
// =============================================================================================
// Misc