24.04
|
Go to the documentation of this file.
24 #ifndef ACL_SRC_CPU_KERNELS_RANGE_GENERIC_NEON_IMPL_H
25 #define ACL_SRC_CPU_KERNELS_RANGE_GENERIC_NEON_IMPL_H
44 const auto start_vec =
wrapper::vdup_n(
static_cast<T
>(start), ExactTagType{});
47 const auto window_start_x =
static_cast<int>(window.
x().
start());
48 const auto window_end_x =
static_cast<int>(window.
x().
end());
49 const int window_step_x = 16 /
sizeof(T);
59 int x = window_start_x;
60 const auto out_ptr =
reinterpret_cast<T *
>(output_it.
ptr());
61 for (; x <= (window_end_x - window_step_x); x += window_step_x)
63 for (
int count = 0; count < window_step_x; ++count)
69 const auto res_vec =
wrapper::vmla(start_vec, id_vec, step_vec);
74 for (; x < window_end_x; ++x)
76 const auto res = start + x *
step;
84 #endif // ACL_SRC_CPU_KERNELS_RANGE_GENERIC_NEON_IMPL_H
constexpr int start() const
Return the start of the dimension.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Interface for CPU tensor.
Includes all wrapper headers at once.
Create the appropriate SIMD vector given its type and size in terms of bits.
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.
void neon_range_function(ITensor *output, float start, float step, const Window &window)
uint8x8_t vmla(const uint8x8_t &a, const uint8x8_t &b, const uint8x8_t &c)
Describe one of the image's dimensions with a start, end and step.
uint8x8_t vsetlane(const uint8_t value, const uint8x8_t vector, const unsigned int lane)
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
void vstore(uint8_t *ptr, uint8x8_t val)
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
constexpr int end() const
Return the end of the dimension.
constexpr const Dimension & x() const
Alias to access the first dimension of the window.
uint8x8_t vdup_n(uint8_t value, traits::vector_64_tag)