24.02.1
|
Go to the documentation of this file.
41 const auto src_shape =
src.shape();
46 const uint32_t num_elements =
dst.num_elements();
47 for(uint32_t idx = 0; idx < num_elements; idx++)
51 const size_t x = coord.
x();
52 const size_t y = coord.
y();
53 const size_t z = coord.
z();
54 const size_t w = coord[3];
56 Coordinates src_coords{ x % src_shape[0], y % src_shape[1], z % src_shape[2],
w % src_shape[3] };
SimpleTensor< float > src
int coord2index(const TensorShape &shape, const Coordinates &coord)
Linearise the given coordinate.
SimpleTensor< T > tile(const SimpleTensor< T > &src, const Multiples &multiples)
T z() const
Alias to access the size of the third dimension.
Coordinates index2coord(const TensorShape &shape, int index)
Convert a linear index into n-dimensional coordinates.
T x() const
Alias to access the size of the first dimension.
TensorShape compute_tiled_shape(const TensorShape &input_shape, const Multiples &multiples)
Calculate the tiled shape of a tensor.
Simple tensor object that stores elements in a consecutive chunk of memory.
Copyright (c) 2017-2024 Arm Limited.
std::vector< uint32_t > Multiples
Information to produce a tiled version of a Tensor.
T y() const
Alias to access the size of the second dimension.