24.02.1
|
Go to the documentation of this file.
42 void scale_complex(
float *c_in,
float *c_out,
bool is_conjugate,
float scale)
60 if ((output !=
nullptr) && (output->total_size() != 0))
75 if (output !=
nullptr)
83 return std::make_pair(Status{}, win);
88 : _input(nullptr), _output(nullptr), _scale(), _run_in_place(false), _is_conj(false)
99 _run_in_place = (output ==
nullptr) || (output ==
input);
101 _scale = config.
scale;
106 INEKernel::configure(win_config.second);
128 Iterator out(_run_in_place ? _input : _output, input_window);
133 { scale_complex(
reinterpret_cast<float *
>(in.
ptr()),
reinterpret_cast<float *
>(out.
ptr()), _is_conj, _scale); },
NEFFTScaleKernel()
Constructor.
float scale
Axis to perform the kernel on.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
uint8_t vgetlane(const uint8x8_t vector, const unsigned int lane)
Interface for CPU tensor.
void configure(ITensor *input, ITensor *output, const FFTScaleKernelInfo &config)
Set the input and output tensors.
Includes all wrapper headers at once.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
#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.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
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.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
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.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
std::pair< Status, Window > validate_and_configure_window(ITensorInfo *src, ITensorInfo *dst)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
uint8x8_t vsetlane(const uint8_t value, const uint8x8_t vector, const unsigned int lane)
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
void vstore(uint8_t *ptr, uint8x8_t val)
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
uint8x8_t vload(const uint8_t *ptr)
Store the tensor's metadata.
bool conjugate
Flag to conjugate the output/.
@ F32
32-bit floating-point number
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
float32x2_t vdiv(const float32x2_t &a, const float32x2_t &b)
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.