24 #ifndef SRC_CORE_HELPERS_WINDOWHELPERS_H 25 #define SRC_CORE_HELPERS_WINDOWHELPERS_H 45 template <
typename... Ts>
48 bool window_changed =
false;
52 window_changed |=
w.update_window_if_needed(win);
56 bool padding_changed =
false;
60 padding_changed |=
w.update_padding_if_needed(win);
64 return window_changed;
73 template <
typename... Ts>
96 #ifndef DOXYGEN_SKIP_THIS 106 Window
calculate_max_window(
const ValidRegion &
valid_region,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize());
117 Window
calculate_max_window(
const TensorShape &
shape,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize());
128 inline Window
calculate_max_window(
const ITensorInfo &
info,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize())
187 template <
typename... Shapes>
188 std::pair<TensorShape, Window> compute_output_shape_and_window(
const Shapes &... shapes)
void set(size_t dimension, T value, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
TensorShape shape
Shape of the valid region.
static TensorShape broadcast_shape(const Shapes &... shapes)
If shapes are broadcast compatible, return the broadcasted shape.
const ValidRegion valid_region
Window calculate_max_window_horizontal(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
Copyright (c) 2017-2021 Arm Limited.
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
T && foldl(F &&, T &&value)
Base case of foldl.
Interface describing methods to update access window and padding based on kernel parameters.
ValidRegion intersect_valid_regions(const Ts &... regions)
Intersect multiple valid regions.
void for_each(F &&)
Base case of for_each.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
Window calculate_max_enlarged_window(const ValidRegion &valid_region, const Steps &steps, BorderSize border_size)
Container for valid region of a window.
Describe a multidimensional execution window.
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
Coordinates anchor
Anchor for the start of the valid region.