24.02.1
|
Go to the documentation of this file.
45 static const std::vector<CpuFloorKernel::FloorKernel> available_kernels = {
46 {
"neon_fp16_floor", [](
const DataTypeISASelectorData &data) {
return data.dt ==
DataType::F16 && data.isa.fp16; },
48 {
"neon_fp32_floor", [](
const DataTypeISASelectorData &data) {
return data.dt ==
DataType::F32; },
60 if (
dst->total_size() > 0)
81 _run_method = uk->ukernel;
82 _name = std::string(
"CpuFloorKernel").append(
"/").append(uk->name);
87 ICPPKernel::configure(win);
126 win, [&](
const Coordinates &) { _run_method(src_it.
ptr(), dst_it.
ptr(), len); }, src_it, dst_it);
131 return _name.c_str();
136 return available_kernels;
Class to describe a number of elements in each dimension.
constexpr int start() const
Return the start of the dimension.
SimpleTensor< float > src
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
void fp32_neon_floor(const void *src, void *dst, int len)
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.
static CPUInfo & get()
Access the KernelLibrary singleton.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
Interface for CPU tensor.
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
#define REGISTER_FP16_NEON(func_name)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
#define REGISTER_FP32_NEON(func_name)
void configure(const ITensorInfo *src, ITensorInfo *dst)
Configure kernel for a given list of arguments.
bool empty() const
Checks if pack is empty.
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
constexpr uint8_t * ptr() const
Return a pointer to the current pixel.
const ITensor * get_const_tensor(int id) const
Get constant tensor of a given id.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
const char * name() const override
Name of the kernel.
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 fp16_neon_floor(const void *src, void *dst, int len)
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...
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
Window infer_window(const ITensorInfo *src, const ITensorInfo *dst)
Infer execution window.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Describe one of the image's dimensions with a start, end and step.
static const auto * get_implementation(const SelectorType &selector, KernelSelectionType selection_type=KernelSelectionType::Supported)
Micro-kernel selector.
static const std::vector< FloorKernel > & get_available_kernels()
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
@ F16
16-bit floating-point number
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
@ F32
32-bit floating-point number
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
constexpr int end() const
Return the end of the dimension.
constexpr const Dimension & x() const
Alias to access the first dimension of the window.