aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/WindowIterator.h
diff options
context:
space:
mode:
authorFelix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-27 17:46:17 +0100
committerfelixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-28 12:08:05 +0000
commitafd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch)
tree03bc7d5a762099989b16a656fa8d397b490ed70e /arm_compute/core/WindowIterator.h
parentbdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff)
downloadComputeLibrary-afd38f0c617d6f89b2b4532c6c44f116617e2b6f.tar.gz
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>
Diffstat (limited to 'arm_compute/core/WindowIterator.h')
-rw-r--r--arm_compute/core/WindowIterator.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/arm_compute/core/WindowIterator.h b/arm_compute/core/WindowIterator.h
index b1e399c872..29302c410a 100644
--- a/arm_compute/core/WindowIterator.h
+++ b/arm_compute/core/WindowIterator.h
@@ -28,7 +28,6 @@
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Window.h"
-
namespace arm_compute
{
/** Convert an offset in window steps into absolute coordinates.
@@ -41,7 +40,7 @@ namespace arm_compute
inline Coordinates convert_window_coord_to_position(const Window &w, const Coordinates &offset)
{
Coordinates position;
- for(unsigned int i = 0; i < Coordinates::num_max_dimensions; ++i)
+ for (unsigned int i = 0; i < Coordinates::num_max_dimensions; ++i)
{
position.set(i, w[i].start() + offset[i] * w[i].step());
}
@@ -165,7 +164,7 @@ public:
template <typename M>
void iterate_3D(M &&on_new_row_size)
{
- while(_end.z() != _position.z())
+ while (_end.z() != _position.z())
{
iterate_2D_internal(on_new_row_size, _w.x().end() - _w.x().step(), _w.y().end() - _w.y().step());
_position[2] += _w.z().step();
@@ -212,7 +211,7 @@ private:
void iterate_2D_internal(M &&on_new_row_size, int end_x, int end_y)
{
//Is there more than one row to process ?
- if(end_y == _position.y())
+ if (end_y == _position.y())
{
// Both start and end belong to the same row:
iterate_over_dim0(end_x + _w.x().step(), on_new_row_size);
@@ -220,7 +219,7 @@ private:
else
{
// Do we start from the beginning of the row ?
- if(_w.x().start() != _position.x())
+ if (_w.x().start() != _position.x())
{
//Start in the middle of a row: process left-over X
iterate_over_dim0(_w.x().end(), on_new_row_size);
@@ -229,7 +228,7 @@ private:
//Middle rows
bool no_leftover = end_x + _w.x().step() == _w.x().end();
- if(no_leftover)
+ if (no_leftover)
{
//Switch to full row size:
on_new_row_size(_w[0].start(), _w.x().end());
@@ -241,7 +240,7 @@ private:
else
{
// Are there full rows to process ?
- if(_position[1] != end_y)
+ if (_position[1] != end_y)
{
//Switch to full row size:
on_new_row_size(_w[0].start(), _w.x().end());
@@ -261,7 +260,7 @@ private:
*/
void iterate_over_dim1(int end)
{
- for(; _position[1] != end; _position[1] += _w[1].step())
+ for (; _position[1] != end; _position[1] += _w[1].step())
{
_position[0] = _w[0].start();
iterate_over_dim0(_w[0].end());
@@ -288,7 +287,7 @@ private:
{
// Both start and end belong to the same row:
ARM_COMPUTE_ERROR_ON(_position[0] > end);
- for(; _position.x() < end; _position[0] += _w[0].step())
+ for (; _position.x() < end; _position[0] += _w[0].step())
{
_lambda_function(_position);
}
@@ -310,9 +309,10 @@ private:
* @return A WindowIterator object.
*/
template <typename L>
-WindowIterator<L> create_window_iterator(const Window &w, const Coordinates &start, const Coordinates &end, L &&lambda_function)
+WindowIterator<L>
+create_window_iterator(const Window &w, const Coordinates &start, const Coordinates &end, L &&lambda_function)
{
return WindowIterator<L>(w, start, end, std::move(lambda_function));
}
-}
+} // namespace arm_compute
#endif /*ARM_COMPUTE_WINDOW_ITERATOR_H*/