23.11
|
Go to the documentation of this file.
60 ICPPKernel::configure(win);
76 const int stride_width = _info.
stride().first;
77 const int stride_height = _info.
stride().second;
78 const int start_width = _info.
pad_left();
79 const int start_height = _info.
pad_top();
80 const int end_width = width_scaled - _info.
pad_right();
81 const int end_height = height_scaled - _info.
pad_bottom();
@ NCHW
Num samples, channels, height, width.
Class to describe a number of elements in each dimension.
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
DataLayout
[DataLayout enum definition]
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
unsigned int pad_right() const
Get the right padding.
@ QASYMM8
quantized, asymmetric fixed-point 8-bit number unsigned
CPPUpsampleKernel()
Default constructor.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
virtual size_t element_size() const =0
Element size in bytes calculated as data_size() * num_channels()
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Interface for CPU tensor.
constexpr auto data_layout
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
constexpr uint8_t * ptr() const
Return a pointer to the current pixel.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
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_funct...
Iterator updated by execute_window_loop for each window element.
Container for valid region of a window.
@ QASYMM8_SIGNED
quantized, asymmetric fixed-point 8-bit number signed
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
virtual DataType data_type() const =0
Data type used for each element of the tensor.
UniformQuantizationInfo uniform() const
Return per layer quantization info.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Describe one of the image's dimensions with a start, end and step.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
unsigned int pad_left() const
Get the left padding.
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
size_t get_data_layout_dimension_index(const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
Get the index of the given dimension.
unsigned int pad_bottom() const
Get the bottom padding.
Describe a multidimensional execution window.
Copyright (c) 2017-2023 Arm Limited.
virtual void set_valid_region(const ValidRegion &valid_region)=0
Set the valid region of the tensor.
void set_num_dimensions(size_t num_dimensions)
Set number of dimensions.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
bool is_parallelisable() const override
Indicates whether or not the kernel is parallelisable.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
void configure(const ITensor *input, ITensor *output, const PadStrideInfo &info)
Set the input and output of the kernel.
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
unsigned int pad_top() const
Get the top padding.
virtual size_t num_dimensions() const =0
The number of dimensions of the tensor (rank)
std::pair< unsigned int, unsigned int > stride() const
Get the stride.
virtual uint8_t * buffer() const =0
Interface to be implemented by the child class to return a pointer to CPU memory.