41 void scale_complex(
float *c_in,
float *c_out,
bool is_conjugate,
float scale)
54 Status validate_arguments(
const ITensorInfo *
input,
const ITensorInfo *output)
59 if((output !=
nullptr) && (output->total_size() != 0))
69 std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output)
82 return std::make_pair(Status{}, win);
87 : _input(nullptr), _output(nullptr), _scale(), _run_in_place(false), _is_conj(false)
98 _run_in_place = (output ==
nullptr) || (output == input);
100 _scale = config.
scale;
103 auto win_config = validate_and_configure_window(input->
info(), _run_in_place ? nullptr : output->
info());
105 INEKernel::configure(win_config.second);
127 Iterator out(_run_in_place ? _input : _output, input_window);
131 scale_complex(reinterpret_cast<float *>(in.
ptr()), reinterpret_cast<float *>(out.
ptr()), _is_conj, _scale);
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
float32x2_t vdiv(const float32x2_t &a, const float32x2_t &b)
const Window & window() const
The maximum window the kernel can be executed on.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const FFTScaleKernelInfo &config)
Static function to check if given info will lead to a valid configuration of NEFFTScaleKernel.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
1 channel, 1 F32 per channel
Store the tensor's metadata.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Interface for CPU tensor.
Copyright (c) 2017-2021 Arm Limited.
uint8_t vgetlane(const uint8x8_t vector, const unsigned int lane)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
Descriptor for FFT scale kernels.
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
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 set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
uint8x8_t vsetlane(const uint8_t value, const uint8x8_t vector, const unsigned int lane)
void configure(ITensor *input, ITensor *output, const FFTScaleKernelInfo &config)
Set the input and output tensors.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
NEFFTScaleKernel()
Constructor.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Information about executing thread and CPU.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
uint8x8_t vload(const uint8_t *ptr)
void vstore(uint8_t *ptr, uint8x8_t val)
#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...
Includes all wrapper headers at once.
float scale
Axis to perform the kernel on.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
Iterator updated by execute_window_loop for each window element.
Describe a multidimensional execution window.
bool conjugate
Flag to conjugate the output/.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)