24.02.1
|
Go to the documentation of this file.
32 namespace tensor_transform
36 return index >=
static_cast<int>(strides.
num_dimensions()) ? 1 : strides[index];
52 int start = starts[index];
79 int32_t shrink_axis_mask)
91 int stop = ends[index];
96 if (start_on_index == std::numeric_limits<int>::max())
98 stop = start_on_index;
102 stop = start_on_index + 1;
131 int32_t shrink_axis_mask)
140 starts_abs.set(i, start_i);
145 return std::make_tuple(starts_abs, ends_abs, final_strides);
154 int32_t shrink_axis_mask,
155 bool return_unshrinked)
157 unsigned int index = 0;
168 if (return_unshrinked || !is_shrink)
171 (range < 0 && stride >= 0) ||
172 (
range > 0 && stride <= 0))
179 int dim =
range / stride + (
range % stride != 0 ? 1 : 0);
190 int32_t end_mask = 0;
DataType clamp(const DataType &n, const DataType &lower=std::numeric_limits< RangeType >::lowest(), const DataType &upper=std::numeric_limits< RangeType >::max())
Performs clamping among a lower and upper value.
bool is_bit_set(T v, unsigned int idx)
Checks if the idx-th bit is set in an integral type.
SimpleTensor< T > range(SimpleTensor< T > &dst, float start, const size_t num_of_elements, float step)
TensorShape input_shape
Validate test suite is to test ARM_COMPUTE_RETURN_ON_* macros we use to check the validity of given a...
Copyright (c) 2017-2024 Arm Limited.
void end(TokenStream &in, bool &valid)
TensorShape & set(size_t dimension, size_t value, bool apply_dim_correction=true, bool increase_dim_unit=true)
Accessor to set the value of one of the dimensions.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.