Minor fixes in CKW

* Address some outstanding issues from previous commits.

Resolves: COMPMID-6387
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: Iab504c20e9b30601b8745c092259a74ccfedf804
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10215
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/compute_kernel_writer/src/cl/CLKernelWriter.cpp b/compute_kernel_writer/src/cl/CLKernelWriter.cpp
index c64b741..4284388 100644
--- a/compute_kernel_writer/src/cl/CLKernelWriter.cpp
+++ b/compute_kernel_writer/src/cl/CLKernelWriter.cpp
@@ -314,7 +314,7 @@
     }
 }
 
-void CLKernelWriter::op_if_generic(bool is_else, const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body)
+void CLKernelWriter::op_if_generic(const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body, bool is_else_if)
 {
     const auto &lhs_tile = to_cl_tile(lhs);
     const auto &rhs_tile = to_cl_tile(rhs);
@@ -325,7 +325,7 @@
     CKW_ASSERT(lhs_tile.is_scalar());
     CKW_ASSERT(rhs_tile.is_scalar());
 
-    if(is_else)
+    if(is_else_if)
     {
         append_code("else ");
     }
@@ -337,12 +337,12 @@
 
 void CLKernelWriter::op_if(const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body)
 {
-    op_if_generic(false, lhs, op, rhs, body);
+    op_if_generic(lhs, op, rhs, body, false /* is_else_if */);
 }
 
 void CLKernelWriter::op_else_if(const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body)
 {
-    op_if_generic(true, lhs, op, rhs, body);
+    op_if_generic(lhs, op, rhs, body, true /* is_else_if */);
 }
 
 void CLKernelWriter::op_else(const std::function<void()> &body)
@@ -453,7 +453,7 @@
 
 TileOperand CLKernelWriter::declare_constant_tile(const ConstantData &data)
 {
-    auto tile = std::make_unique<CLTile>(get_values(data), get_data_type(data));
+    auto              tile    = std::make_unique<CLTile>(get_values(data), get_data_type(data));
     const TileOperand operand = create_tile_operand(*tile);
     _constant_tiles.insert(std::move(tile));
 
@@ -525,8 +525,8 @@
 void CLKernelWriter::op_load(const TileOperand &tile_op, const TensorOperand &tensor_op, TensorSampler &sampler,
                              const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch)
 {
-    const CLTile dilation_x({{"1"}}, DataType::Int32);
-    const CLTile dilation_y({{"1"}}, DataType::Int32);
+    const CLTile dilation_x({ { "1" } }, DataType::Int32);
+    const CLTile dilation_y({ { "1" } }, DataType::Int32);
 
     op_load_store(MemoryOperation::Load, tile_op, tensor_op, sampler, x, y, z, batch, dilation_x, dilation_y);
 }
@@ -544,8 +544,8 @@
 void CLKernelWriter::op_store(const TensorOperand &tensor_op, const TileOperand &tile_op, TensorSampler &sampler,
                               const TileOperand &x, const TileOperand &y, const TileOperand &z, const TileOperand &batch)
 {
-    const CLTile dilation_x({{"1"}}, DataType::Int32);
-    const CLTile dilation_y({{"1"}}, DataType::Int32);
+    const CLTile dilation_x({ { "1" } }, DataType::Int32);
+    const CLTile dilation_y({ { "1" } }, DataType::Int32);
 
     op_load_store(MemoryOperation::Store, tile_op, tensor_op, sampler, x, y, z, batch, dilation_x, dilation_y);
 }
diff --git a/compute_kernel_writer/src/cl/CLKernelWriter.h b/compute_kernel_writer/src/cl/CLKernelWriter.h
index 9fc7e55..9458ced 100644
--- a/compute_kernel_writer/src/cl/CLKernelWriter.h
+++ b/compute_kernel_writer/src/cl/CLKernelWriter.h
@@ -198,13 +198,13 @@
      *
      * It is used for both @ref CLKernelWriter::op_if and @ref CLKernelWriter::op_else_if.
      *
-     * @param[in] is_else True if this is an `else if` block, otherwise this is an `if` block.
-     * @param[in] lhs     The LHS tile of the condition.
-     * @param[in] op      The relational binary operator.
-     * @param[in] rhs     The RHS tile of the condition.
-     * @param[in] body    The function that writes the body of the else-if block.
+     * @param[in] lhs        The LHS tile of the condition.
+     * @param[in] op         The relational binary operator.
+     * @param[in] rhs        The RHS tile of the condition.
+     * @param[in] body       The function that writes the body of the else-if block.
+     * @param[in] is_else_if True if this is an `else if` block, otherwise this is an `if` block.
      */
-    void op_if_generic(bool is_else, const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body);
+    void op_if_generic(const TileOperand &lhs, BinaryOp op, const TileOperand &rhs, const std::function<void()> &body, bool is_else_if);
 
     // For attributes
 private: