62 const size_t width = src.
shape().x();
64 compute_min_max<T>(
src, dst.
min, dst.
max);
68 for(
int i = 0; i < src.num_elements(); ++i)
70 coord.
x =
static_cast<int32_t
>(i % width);
71 coord.y =
static_cast<int32_t
>(i / width);
void compute_min_max(const SimpleTensor< T > &src, T &min, T &max)
std::vector< Coordinates2D > min_loc
Min value location.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
TensorShape shape() const override
Shape of the tensor.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
MinMaxLocationValues< T > min_max_location(const SimpleTensor< T > &src)
Min and max values and locations.
Simple tensor object that stores elements in a consecutive chunk of memory.
int num_elements() const override
Number of elements of the tensor.
std::vector< Coordinates2D > max_loc
Max value location.