42 const auto *indices_ptr = static_cast<const uint32_t *>(indices.
data());
51 for(
unsigned int dim = 0; dim <
id.num_dimensions(); ++dim)
53 if(dim == actual_axis)
55 offset.set(dim, indices_ptr[
id[dim]]);
62 *reinterpret_cast<T *>(
dst(
id)) = *reinterpret_cast<const T *>(
src(
offset));
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
TensorShape shape() const override
Shape of the tensor.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
SimpleTensor< float > src
SimpleTensor< T > gather(const SimpleTensor< T > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
Copyright (c) 2017-2021 Arm Limited.
Simple tensor object that stores elements in a consecutive chunk of memory.
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...
Describe a multidimensional execution window.
TensorShape compute_gather_shape(const TensorShape &input_shape, const TensorShape &indices_shape, uint32_t actual_axis)
const T * data() const
Constant pointer to the underlying buffer.