41 const auto step_vec =
wrapper::vdup_n(static_cast<T>(step), ExactTagType{});
42 const auto start_vec =
wrapper::vdup_n(static_cast<T>(start), ExactTagType{});
45 const auto window_start_x =
static_cast<int>(window.
x().
start());
46 const auto window_end_x =
static_cast<int>(window.
x().
end());
47 const int window_step_x = 16 /
sizeof(T);
55 int x = window_start_x;
56 const auto out_ptr =
reinterpret_cast<T *
>(output_it.
ptr());
57 for(; x <= (window_end_x - window_step_x); x += window_step_x)
59 for(
int count = 0; count < window_step_x; ++count)
65 const auto res_vec =
wrapper::vmla(start_vec, id_vec, step_vec);
70 for(; x < window_end_x; ++x)
72 const auto res = start + x *
step;
88 #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(ENABLE_FP16_KERNELS) 89 template void neon_range_function<float16_t>(
ITensor *output,
float start,
float step,
const Window &window);
template void neon_range_function< float32_t >(ITensor *output, float start, float step, const Window &window)
template void neon_range_function< int32_t >(ITensor *output, float start, float step, const Window &window)
Describe one of the image's dimensions with a start, end and step.
void neon_range_function(ITensor *output, float start, float step, const Window &window)
Interface for CPU tensor.
Copyright (c) 2017-2022 Arm Limited.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
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 set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
uint8x8_t vsetlane(const uint8_t value, const uint8x8_t vector, const unsigned int lane)
template void neon_range_function< int16_t >(ITensor *output, float start, float step, const Window &window)
template void neon_range_function< uint32_t >(ITensor *output, float start, float step, const Window &window)
template void neon_range_function< int8_t >(ITensor *output, float start, float step, const Window &window)
void vstore(uint8_t *ptr, uint8x8_t val)
uint8x8_t vdup_n(uint8_t value, traits::vector_64_tag)
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...
Includes all wrapper headers at once.
uint8x8_t vmla(const uint8x8_t &a, const uint8x8_t &b, const uint8x8_t &c)
constexpr int end() const
Return the end of the dimension.
Iterator updated by execute_window_loop for each window element.
template void neon_range_function< uint8_t >(ITensor *output, float start, float step, const Window &window)
constexpr int start() const
Return the start of the dimension.
Describe a multidimensional execution window.
template void neon_range_function< uint16_t >(ITensor *output, float start, float step, const Window &window)
constexpr const Dimension & x() const
Alias to access the first dimension of the window.