42 struct BoundingBoxTransformSelectorData
50 struct BoundingBoxTransformKernel
57 static const BoundingBoxTransformKernel available_kernels[] =
60 "fp32_neon_boundingboxtransform",
61 [](
const BoundingBoxTransformSelectorData & data) {
return data.dt ==
DataType::F32; },
64 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 66 "fp16_neon_boundingboxtransform",
67 [](
const BoundingBoxTransformSelectorData & data) {
return data.dt ==
DataType::F16; },
70 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC 71 #if defined(ARM_COMPUTE_ENABLE_NEON) 73 "qu16_neon_boundingboxtransform",
74 [](
const BoundingBoxTransformSelectorData & data) {
return data.dt ==
DataType::QASYMM16; },
77 #endif //defined(ARM_COMPUTE_ENABLE_NEON) 86 const BoundingBoxTransformKernel *get_implementation(
const BoundingBoxTransformSelectorData &data)
88 for(
const auto &uk : available_kernels)
90 if(uk.is_selected(data))
98 Status
validate_arguments(
const ITensorInfo *boxes,
const ITensorInfo *pred_boxes,
const ITensorInfo *deltas,
const BoundingBoxTransformInfo &
info)
114 const UniformQuantizationInfo deltas_qinfo = deltas->quantization_info().uniform();
123 if(pred_boxes->total_size() > 0)
130 const UniformQuantizationInfo pred_qinfo = pred_boxes->quantization_info().uniform();
141 : _boxes(nullptr), _pred_boxes(nullptr), _deltas(nullptr), _bbinfo(0, 0, 0)
155 _pred_boxes = pred_boxes;
164 INEKernel::configure(win);
179 const auto *uk = get_implementation(BoundingBoxTransformSelectorData{ _boxes->
info()->
data_type() });
182 uk->ukernel(_boxes, _pred_boxes, _deltas, _bbinfo, window);
void neon_qu16_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &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 ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(tensor)
#define REGISTER_FP16_NEON(func_name)
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
#define REGISTER_FP32_NEON(func_name)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
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.
quantized, asymmetric fixed-point 16-bit number
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#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.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
Copyright (c) 2017-2022 Arm Limited.
1 channel, 1 F16 per channel
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
void neon_fp16_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &window)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
quantized, asymmetric fixed-point 8-bit number unsigned
Class to describe a number of elements in each dimension.
#define REGISTER_QSYMM16_NEON(func_name)
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...
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.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
void neon_fp32_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &window)
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Information about executing thread and CPU.
#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_ERROR_ON_NULLPTR(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN(t,...)
DataType
Available data types.
Describe a multidimensional execution window.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)