24 #ifndef SRC_CORE_HELPERS_UTILS_H 25 #define SRC_CORE_HELPERS_UTILS_H 40 template <
typename T,
typename... Ts>
46 Strides strides(stride_x, fixed_strides...);
50 strides.
set(i, shape[i - 1] * strides[i - 1]);
62 template <
typename... Ts>
void set(size_t dimension, T value, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
virtual size_t num_dimensions() const =0
The number of dimensions of the tensor (rank)
unsigned int get_next_power_two(unsigned int x)
Given an integer value, this function returns the next power of two.
Store the tensor's metadata.
Copyright (c) 2017-2021 Arm Limited.
Strides compute_strides(const ITensorInfo &info, T stride_x, Ts &&... fixed_strides)
Create a strides object based on the provided strides and the tensor dimensions.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
virtual size_t element_size() const =0
Element size in bytes calculated as data_size() * num_channels()
Strides of an item in bytes.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)