Apply clang-format on repository

Code is formatted as per a revised clang format configuration
file(not part of this delivery). Version 14.0.6 is used.

Exclusion List:
- files with .cl extension
- files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...)
And the following directories
- compute_kernel_writer/validation/
- tests/
- include/
- src/core/NEON/kernels/convolution/
- src/core/NEON/kernels/arm_gemm/
- src/core/NEON/kernels/arm_conv/
- data/

There will be a follow up for formatting of .cl files and the
files under tests/ and compute_kernel_writer/validation/.

Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>
Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
diff --git a/compute_kernel_writer/src/cl/helpers/CLMemoryOpImage2dHelper.cpp b/compute_kernel_writer/src/cl/helpers/CLMemoryOpImage2dHelper.cpp
index 55f88f4..b7d146b 100644
--- a/compute_kernel_writer/src/cl/helpers/CLMemoryOpImage2dHelper.cpp
+++ b/compute_kernel_writer/src/cl/helpers/CLMemoryOpImage2dHelper.cpp
@@ -28,11 +28,11 @@
 #include "ckw/types/MemoryOperation.h"
 #include "ckw/types/TensorStorageType.h"
 
-#include "src/ITensor.h"
-#include "src/Tensor3dMapper.h"
 #include "src/cl/CLKernelWriter.h"
 #include "src/cl/CLTensorArgument.h"
 #include "src/cl/CLTile.h"
+#include "src/ITensor.h"
+#include "src/Tensor3dMapper.h"
 
 namespace ckw
 {
@@ -66,31 +66,36 @@
 {
 }
 
-bool CLMemoryOpImage2dHelper::validate(const CLKernelWriter *writer, const ITensor *tensor, const TensorSampler *sampler, const Tensor3dMapper *mapper, MemoryOperation op, const CLTile *dst)
+bool CLMemoryOpImage2dHelper::validate(const CLKernelWriter *writer,
+                                       const ITensor        *tensor,
+                                       const TensorSampler  *sampler,
+                                       const Tensor3dMapper *mapper,
+                                       MemoryOperation       op,
+                                       const CLTile         *dst)
 {
     CKW_UNUSED(writer, tensor, mapper);
 
-    if(dst->info().width() != 4)
+    if (dst->info().width() != 4)
     {
         return false;
     }
-    if(sampler->address_mode_x() != TensorSamplerAddressModeX::None)
+    if (sampler->address_mode_x() != TensorSamplerAddressModeX::None)
     {
         return false;
     }
-    if(sampler->address_mode_z() != TensorSamplerAddressModeZ::None)
+    if (sampler->address_mode_z() != TensorSamplerAddressModeZ::None)
     {
         return false;
     }
-    if(sampler->storage() != TensorStorageType::Texture2dReadOnly && op == MemoryOperation::Load)
+    if (sampler->storage() != TensorStorageType::Texture2dReadOnly && op == MemoryOperation::Load)
     {
         return false;
     }
-    if(sampler->storage() != TensorStorageType::Texture2dWriteOnly && op == MemoryOperation::Store)
+    if (sampler->storage() != TensorStorageType::Texture2dWriteOnly && op == MemoryOperation::Store)
     {
         return false;
     }
-    if((dst->info().data_type() != DataType::Fp32) && (dst->info().data_type() != DataType::Fp16))
+    if ((dst->info().data_type() != DataType::Fp32) && (dst->info().data_type() != DataType::Fp16))
     {
         return false;
     }
@@ -102,7 +107,7 @@
     CKW_UNUSED(coord);
 
     const TensorSamplerAddressModeY address_mode_y = _sampler->address_mode_y();
-    switch(address_mode_y)
+    switch (address_mode_y)
     {
         case TensorSamplerAddressModeY::SkipLessThanZero:
             _writer->op_write_raw_code("if(" + coord + " >= 0)\n{\n");
@@ -118,7 +123,7 @@
 void CLMemoryOpImage2dHelper::out_of_bound_finalize_y()
 {
     const TensorSamplerAddressModeY address_mode_y = _sampler->address_mode_y();
-    switch(address_mode_y)
+    switch (address_mode_y)
     {
         case TensorSamplerAddressModeY::SkipLessThanZero:
             _writer->op_write_raw_code("}\n");
@@ -131,15 +136,19 @@
     }
 }
 
-std::string CLMemoryOpImage2dHelper::to_ls_image2d(MemoryOperation op, int32_t vector_width, const std::string &data, const std::string &sampler, const std::string &address) const
+std::string CLMemoryOpImage2dHelper::to_ls_image2d(MemoryOperation    op,
+                                                   int32_t            vector_width,
+                                                   const std::string &data,
+                                                   const std::string &sampler,
+                                                   const std::string &address) const
 {
     CKW_UNUSED(vector_width);
 
     const TensorStorageType tensor_storage = _sampler->storage();
-    const std::string image2d_obj    = _tensor->storage(tensor_storage).val;
-    const std::string post_fix = _dst->info().data_type() == DataType::Fp32 ? "f" : "h";
+    const std::string       image2d_obj    = _tensor->storage(tensor_storage).val;
+    const std::string       post_fix       = _dst->info().data_type() == DataType::Fp32 ? "f" : "h";
 
-    switch(op)
+    switch (op)
     {
         case MemoryOperation::Load:
             return data + " = read_image" + post_fix + "(" + image2d_obj + ", " + sampler + ", " + address + ")";
@@ -155,7 +164,7 @@
 {
     const auto address_mode_y = _sampler->address_mode_y();
 
-    switch(address_mode_y)
+    switch (address_mode_y)
     {
         case TensorSamplerAddressModeY::None:
             return "CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST";
@@ -167,17 +176,19 @@
     }
 }
 
-std::string CLMemoryOpImage2dHelper::to_ls_image2d_address(const std::string &x, const std::string &y, const std::string &z,
+std::string CLMemoryOpImage2dHelper::to_ls_image2d_address(const std::string &x,
+                                                           const std::string &y,
+                                                           const std::string &z,
                                                            const std::string &b) const
 {
     std::string coord_x = "(" + x + ") >> 2";
     std::string coord_y = "(";
 
-    if(y != "0")
+    if (y != "0")
     {
         coord_y += y;
     }
-    if(z != "0" && (_mapper->dim_z().str != "1"))
+    if (z != "0" && (_mapper->dim_z().str != "1"))
     {
         const std::string dim = _mapper->dim_y().str;
         coord_y += " + (";
@@ -185,7 +196,7 @@
         coord_y += " * ";
         coord_y += dim;
     }
-    if(b != "0" && (_mapper->dim_batch().str != "1"))
+    if (b != "0" && (_mapper->dim_batch().str != "1"))
     {
         const std::string dim0 = _mapper->dim_y().str;
         const std::string dim1 = _mapper->dim_z().str;