23.08
|
Go to the documentation of this file.
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);
58 w.update_padding_if_needed(win);
62 return window_changed;
71 template <
typename... Ts>
94 #ifndef DOXYGEN_SKIP_THIS
104 Window
calculate_max_window(
const ValidRegion &
valid_region,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize());
115 Window
calculate_max_window(
const TensorShape &
shape,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize());
126 inline Window
calculate_max_window(
const ITensorInfo &
info,
const Steps &steps = Steps(),
bool skip_border =
false, BorderSize border_size = BorderSize())
210 template <
typename... Shapes>
211 std::pair<TensorShape, Window> compute_output_shape_and_window(
const Shapes &... shapes)
SimpleTensor< float > src
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)
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
const ValidRegion valid_region
Interface describing methods to update access window and padding based on kernel parameters.
Window calculate_max_window_horizontal(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
static TensorShape broadcast_shape(const Shapes &... shapes)
If shapes are broadcast compatible, return the broadcasted shape.
Container for valid region of a window.
ValidRegion intersect_valid_regions(const Ts &... regions)
Intersect multiple valid regions.
Describe a multidimensional execution window.
TensorShape shape
Shape of the valid region.
std::pair< Window, size_t > calculate_squashed_or_max_window(const ITensorInfo &src0, const ITensorInfo &src1)
Copyright (c) 2017-2023 Arm Limited.
Window calculate_max_enlarged_window(const ValidRegion &valid_region, const Steps &steps, BorderSize border_size)
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
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.
T && foldl(F &&, T &&value)
Base case of foldl.
void for_each(F &&)
Base case of for_each.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
Coordinates anchor
Anchor for the start of the valid region.