45 struct FloorSelectorData
50 using FloorSelectorPtr = std::add_pointer<bool(
const FloorSelectorData &data)>
::type;
51 using FloorUKernelPtr = std::add_pointer<void(
const void *,
void *,
int)>
::type;
60 static const FloorUKernel available_kernels[] =
64 [](
const FloorSelectorData & data) {
return data.dt ==
DataType::F16; },
69 [](
const FloorSelectorData & data) {
return data.dt ==
DataType::F32; },
80 const FloorUKernel *get_implementation(
const FloorSelectorData &data)
82 for(
const auto &uk : available_kernels)
84 if(uk.is_selected(data))
96 const auto *uk = get_implementation(FloorSelectorData{
src->data_type() });
100 if(
dst->total_size() > 0)
123 ICPPKernel::configure(win);
154 const auto *
ukernel = get_implementation(FloorSelectorData{
src->info()->data_type() });
171 return "CpuFloorKernel";
Window infer_window(const ITensorInfo *src, const ITensorInfo *dst)
Infer execution window.
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.
#define REGISTER_FP16_NEON(func_name)
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of CpuFloorKernel.
bool empty() const
Checks if pack is empty.
#define REGISTER_FP32_NEON(func_name)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Store the tensor's metadata.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
Describe one of the image's dimensions with a start, end and step.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
decltype(strategy::transforms) typedef type
Interface for CPU tensor.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
const ITensor * get_const_tensor(int id) const
Get constant tensor of a given id.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Class to describe a number of elements in each dimension.
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...
const FloorSelectorPtr is_selected
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.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
Information about executing thread and CPU.
void fp16_neon_floor(const void *src, void *dst, int len)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
ActivationKernelPtr ukernel
Status validate_arguments(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo *output_stage)
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
void fp32_neon_floor(const void *src, void *dst, int len)
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
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...
const char * name() const override
Name of the kernel.
void configure(const ITensorInfo *src, ITensorInfo *dst)
Configure kernel for a given list of arguments.
constexpr int end() const
Return the end of the dimension.
Iterator updated by execute_window_loop for each window element.
DataType
Available data types.
constexpr int start() const
Return the start of the dimension.
Describe a multidimensional execution window.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
constexpr const Dimension & x() const
Alias to access the first dimension of the window.