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/src/core/Helpers.cpp b/src/core/Helpers.cpp
index 28e7f4c..c801b09 100644
--- a/src/core/Helpers.cpp
+++ b/src/core/Helpers.cpp
@@ -25,8 +25,11 @@
namespace arm_compute
{
-ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const TensorShape &dst_shape,
- InterpolationPolicy interpolate_policy, SamplingPolicy sampling_policy, bool border_undefined)
+ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info,
+ const TensorShape &dst_shape,
+ InterpolationPolicy interpolate_policy,
+ SamplingPolicy sampling_policy,
+ bool border_undefined)
{
const DataLayout data_layout = src_info.data_layout();
const int idx_width = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH);
@@ -49,9 +52,9 @@
auto valid_end_out_y = std::min<int>(std::ceil(valid_end_in_y * scale_y), dst_shape[idx_height]);
// Handle valid points in case of the bi-linear interpolation
- if(border_undefined)
+ if (border_undefined)
{
- switch(interpolate_policy)
+ switch (interpolate_policy)
{
case InterpolationPolicy::NEAREST_NEIGHBOR:
{
@@ -90,7 +93,7 @@
}
// Setup output valid region
- ValidRegion valid_region{ Coordinates(), dst_shape, dst_shape.num_dimensions() };
+ ValidRegion valid_region{Coordinates(), dst_shape, dst_shape.num_dimensions()};
valid_region.anchor.set(idx_width, std::max(0, valid_start_out_x));
valid_region.anchor.set(idx_height, std::max(0, valid_start_out_y));
@@ -109,14 +112,12 @@
constexpr DataLayoutDimension D = DataLayoutDimension::DEPTH;
constexpr DataLayoutDimension N = DataLayoutDimension::BATCHES;
- static const std::map<DataLayout, std::vector<DataLayoutDimension>> layout_map =
- {
- { DataLayout::NDHWC, { C, W, H, D, N } },
- { DataLayout::NCDHW, { W, H, D, C, N } },
- { DataLayout::NHWC, { C, W, H, N } },
- { DataLayout::NCHW, { W, H, C, N } }
- };
+ static const std::map<DataLayout, std::vector<DataLayoutDimension>> layout_map = {
+ {DataLayout::NDHWC, {C, W, H, D, N}},
+ {DataLayout::NCDHW, {W, H, D, C, N}},
+ {DataLayout::NHWC, {C, W, H, N}},
+ {DataLayout::NCHW, {W, H, C, N}}};
return layout_map;
}
-} // namespace arm_compute
\ No newline at end of file
+} // namespace arm_compute