24.04
|
Go to the documentation of this file.
36 Iterator all_anchors_it(all_anchors, window);
37 Iterator anchors_it(all_anchors, window);
41 const size_t feat_width = anchors_info.
feat_width();
49 const size_t anchor_offset =
id.
y() % num_anchors;
51 const auto out_anchor_ptr =
reinterpret_cast<int16_t *
>(all_anchors_it.
ptr());
54 const size_t shift_idy =
id.y() / num_anchors;
55 const float shiftx = (shift_idy % feat_width) * stride;
56 const float shifty = (shift_idy / feat_width) * stride;
int16_t quantize_qsymm16(float value, const UniformQuantizationInfo &qinfo, RoundingPolicy rounding_policy=RoundingPolicy::TO_NEAREST_UP)
Quantize a value given a 16-bit symmetric quantization scheme.
Interface for CPU tensor.
ComputeAnchors information class.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
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 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.
const std::vector< float > & scale() const
Scale vector accessor.
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
float dequantize_qsymm16(int16_t value, const UniformQuantizationInfo &qinfo)
Dequantize a value given a 16-bit symmetric quantization scheme.
UniformQuantizationInfo uniform() const
Return per layer quantization info.
void compute_all_anchors_qasymm16(const ITensor *anchors, ITensor *all_anchors, ComputeAnchorsInfo anchors_info, const Window &window)
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
uint8_t * ptr_to_element(const Coordinates &id) const
Return a pointer to the element at the passed coordinates.
float spatial_scale() const
const QuantizationInfo qinfo