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