33 const size_t offset = (align_corners && output_size > 1) ? 1 : 0;
34 const auto in = input_size -
offset;
35 const auto out = output_size -
offset;
40 return static_cast<float>(in) / static_cast<float>(out);
47 if(data_layout == DataLayout::NHWC)
53 return (
CPUInfo::get().get_isa().
sve ==
true && policy == InterpolationPolicy::NEAREST_NEIGHBOR);
56 case DataType::QASYMM8:
57 case DataType::QASYMM8_SIGNED:
58 return (border_mode != BorderMode::REPLICATE) || (policy == InterpolationPolicy::NEAREST_NEIGHBOR);
BorderMode
Methods available to handle borders.
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
InterpolationPolicy
Interpolation method.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
float calculate_resize_ratio(size_t input_size, size_t output_size, bool align_corners=false)
Returns resize ratio between input and output with consideration of aligned corners.
static CPUInfo & get()
Access the KernelLibrary singleton.
bool is_precomputation_required(DataLayout data_layout, DataType data_type, InterpolationPolicy policy, BorderMode border_mode)
Returns if precomputation of indices and/or weights is required or/not.
DataType
Available data types.
DataLayout
[DataLayout enum definition]