Compute Library
Helpers.h File Reference
#include "arm_compute/core/Error.h"
#include "arm_compute/core/IAccessWindow.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Validate.h"
#include "arm_compute/core/Window.h"
#include <array>
#include <cstddef>
#include <cstdint>
#include <tuple>
#include "arm_compute/core/Helpers.inl"

Go to the source code of this file.

Data Structures

class  Iterator
 Iterator updated by execute_window_loop for each window element. More...


 Copyright (c) 2017-2023 Arm Limited.


template<typename L , typename... Ts>
void execute_window_loop (const Window &w, L &&lambda_function, Ts &&...iterators)
 Iterate through the passed window, automatically adjusting the iterators and calling the lambda_functino for each element. More...
template<typename T >
void permute (Dimensions< T > &dimensions, const PermutationVector &perm)
 Permutes given Dimensions according to a permutation vector. More...
void permute (TensorShape &shape, const PermutationVector &perm)
 Permutes given TensorShape according to a permutation vector. More...
ValidRegion calculate_valid_region_scale (const ITensorInfo &src_info, const TensorShape &dst_shape, InterpolationPolicy interpolate_policy, SamplingPolicy sampling_policy, bool border_undefined)
 Helper function to calculate the Valid Region for Scale. More...
Coordinates index2coords (const TensorShape &shape, int index)
 Convert a linear index into n-dimensional coordinates. More...
int coords2index (const TensorShape &shape, const Coordinates &coord)
 Convert n-dimensional coordinates into a linear index. More...
const std::map< DataLayout, std::vector< DataLayoutDimension > > & get_layout_map ()
 Returns a static map used to find an index or dimension based on a data layout. More...
size_t get_data_layout_dimension_index (const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
 Get the index of the given dimension. More...
DataLayoutDimension get_index_data_layout_dimension (const DataLayout &data_layout, const size_t index)
 Get the DataLayoutDimension of a given index and layout. More...
Size2D compute_winograd_convolution_tiles (const Size2D &in_dims, const Size2D &kernel_size, const Size2D &output_tile_size, const PadStrideInfo &conv_info)
 Calculate the number of output tiles required by Winograd Convolution layer. More...
template<typename T >
wrap_around (T x, T m)
 Wrap-around a number within the range 0 <= x < m. More...
Coordinates & convert_negative_axis (Coordinates &coords, int max_value)
 Convert negative coordinates to positive in the range [0, num_dims_input]. More...