Iterate over a portion of a Window.
More...
#include <WindowIterator.h>
template<typename L>
class arm_compute::WindowIterator< L >
Iterate over a portion of a Window.
Definition at line 144 of file WindowIterator.h.
◆ WindowIterator()
Construct a WindowIterator object.
- Parameters
-
[in] | w | Window to use for the iteration |
[in] | start | Where to start iterating from (In Window coordinates) |
[in] | end | Where to stop iterating (In Window coordinates). |
[in] | lambda_function | Lambda function to call for every iteration between start and end. (It will be called last for end - 1) |
Definition at line 154 of file WindowIterator.h.
155 : _lambda_function(std::move(lambda_function)),
Coordinates convert_window_coord_to_position(const Window &w, const Coordinates &offset)
Convert an offset in window steps into absolute coordinates.
void end(TokenStream &in, bool &valid)
◆ end_position()
Returns the coordinates in absolute coordinates of the end position.
- Returns
- End position coordinates.
Definition at line 205 of file WindowIterator.h.
◆ iterate_2D()
void iterate_2D |
( |
M && |
on_new_row_size | ) |
|
|
inline |
Iterate over the lowest 2 dimensions of the window.
- Parameters
-
[in] | on_new_row_size | Callback to be called before lambda_function every time the width of the row processed changes. |
Definition at line 184 of file WindowIterator.h.
186 iterate_2D_internal(on_new_row_size, _end.
x(), _end.
y());
T x() const
Alias to access the size of the first dimension.
T y() const
Alias to access the size of the second dimension.
◆ iterate_3D()
void iterate_3D |
( |
M && |
on_new_row_size | ) |
|
|
inline |
Iterate over the lowest 3 dimensions of the window.
- Parameters
-
[in] | on_new_row_size | Callback to be called before lambda_function every time the width of the row processed changes. |
Definition at line 166 of file WindowIterator.h.
168 while(_end.
z() != _position.
z())
170 iterate_2D_internal(on_new_row_size, _w.
x().
end() - _w.
x().
step(), _w.
y().
end() - _w.
y().
step());
171 _position[2] += _w.
z().
step();
172 _position[1] = _w.
y().
start();
173 _position[0] = _w.
x().
start();
constexpr int step() const
Return the step of the dimension.
constexpr const Dimension & z() const
Alias to access the third dimension of the window.
T z() const
Alias to access the size of the third dimension.
void iterate_2D(M &&on_new_row_size)
Iterate over the lowest 2 dimensions of the window.
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
constexpr int end() const
Return the end of the dimension.
constexpr int start() const
Return the start of the dimension.
constexpr const Dimension & x() const
Alias to access the first dimension of the window.
◆ set_step()
void set_step |
( |
size_t |
dim, |
|
|
int |
step |
|
) |
| |
|
inline |
Change the step used for the iteration.
- Note
- Does not affect the start and end points.
- Parameters
-
[in] | dim | Dimension to change |
[in] | step | New step to use for the given dimension. |
Definition at line 196 of file WindowIterator.h.
void set_dimension_step(size_t dimension, int step)
Set the step of a given dimension.
The documentation for this class was generated from the following file: