24.02
|
Go to the documentation of this file.
66 for(
unsigned int i = 0; i <
id.num_dimensions(); ++i)
68 offset.set(i, starts[i] +
id[i]);
70 *
reinterpret_cast<T *
>(
dst(
id)) = *
reinterpret_cast<const T *
>(
src(
offset));
82 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
110 starts, ends, strides,
111 begin_mask, end_mask, shrink_axis_mask);
114 unsigned int idx = 0;
117 starts, ends, strides,
118 begin_mask, end_mask, shrink_axis_mask,
true));
122 for(
unsigned int i = 0; i <
id.num_dimensions(); ++i)
124 offset.set(i, starts_abs[i] +
id[i] * final_strides[i]);
126 dst.data()[idx++] = *
reinterpret_cast<const T *
>(
src(
offset));
134 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask);
137 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask);
SimpleTensor< float > src
TensorShape compute_slice_shape(const TensorShape &input_shape, const Coordinates &starts, const Coordinates &ends)
Calculate the slice output shape of a tensor.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
SimpleTensor< T > strided_slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends, BiStrides strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
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...
std::array< T, num_max_dimensions >::const_iterator cbegin() const
Returns a read-only (constant) iterator that points to the first element in the dimension array.
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Simple tensor object that stores elements in a consecutive chunk of memory.
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)