24.04
|
Go to the documentation of this file.
24 #ifndef SRC_CORE_SVE_KERNELS_NEGENERATEPROPOSALSLAYERKERNEL_IMPL_H
25 #define SRC_CORE_SVE_KERNELS_NEGENERATEPROPOSALSLAYERKERNEL_IMPL_H
41 Iterator all_anchors_it(all_anchors, window);
42 Iterator anchors_it(all_anchors, window);
46 const size_t feat_width = anchors_info.
feat_width();
52 const size_t anchor_offset =
id.
y() % num_anchors;
54 const auto out_anchor_ptr =
reinterpret_cast<T *
>(all_anchors_it.
ptr());
57 const size_t shift_idy =
id.y() / num_anchors;
58 const T shiftx = (shift_idy % feat_width) * stride;
59 const T shifty = (shift_idy / feat_width) * stride;
61 *out_anchor_ptr = *anchor_ptr + shiftx;
62 *(out_anchor_ptr + 1) = *(1 + anchor_ptr) + shifty;
63 *(out_anchor_ptr + 2) = *(2 + anchor_ptr) + shiftx;
64 *(out_anchor_ptr + 3) = *(3 + anchor_ptr) + shifty;
75 #endif //define SRC_CORE_SVE_KERNELS_NEGENERATEPROPOSALSLAYERKERNEL_IMPL_H
Interface for CPU tensor.
Includes all wrapper headers at once.
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.
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
void compute_all_anchors_qasymm16(const ITensor *anchors, ITensor *all_anchors, ComputeAnchorsInfo anchors_info, const Window &window)
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.
void compute_all_anchors(const ITensor *anchors, ITensor *all_anchors, ComputeAnchorsInfo anchors_info, const Window &window)
float spatial_scale() const