From afd38f0c617d6f89b2b4532c6c44f116617e2b6f Mon Sep 17 00:00:00 2001 From: Felix Thomasmathibalan Date: Wed, 27 Sep 2023 17:46:17 +0100 Subject: 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 Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir --- src/core/Helpers.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/core/Helpers.cpp') diff --git a/src/core/Helpers.cpp b/src/core/Helpers.cpp index 28e7f4c1e5..c801b097b5 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 @@ ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const Tens auto valid_end_out_y = std::min(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 @@ ValidRegion calculate_valid_region_scale(const ITensorInfo &src_info, const Tens } // 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 @@ const std::map> &get_layout_map() constexpr DataLayoutDimension D = DataLayoutDimension::DEPTH; constexpr DataLayoutDimension N = DataLayoutDimension::BATCHES; - static const std::map> 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> 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 -- cgit v1.2.1