diff options
Diffstat (limited to 'tests/validation/ReferenceCPP.cpp')
-rw-r--r-- | tests/validation/ReferenceCPP.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/validation/ReferenceCPP.cpp b/tests/validation/ReferenceCPP.cpp index ddb84835c3..5c429ea864 100644 --- a/tests/validation/ReferenceCPP.cpp +++ b/tests/validation/ReferenceCPP.cpp @@ -56,6 +56,15 @@ void ReferenceCPP::absolute_difference(const RawTensor &src1, const RawTensor &s TensorVariant d = TensorFactory::get_tensor(dst); boost::apply_visitor(absolute_difference_visitor(), s1, s2, d); } + +// Mean and standard deviation +void ReferenceCPP::mean_and_standard_deviation(const RawTensor &src, float &mean, float &std_dev) +{ + ARM_COMPUTE_ERROR_ON(src.data_type() != DataType::U8); + const Tensor<uint8_t> s(src.shape(), src.data_type(), src.fixed_point_position(), reinterpret_cast<const uint8_t *>(src.data())); + tensor_operations::mean_and_standard_deviation(s, mean, std_dev); +} + // Integral image void ReferenceCPP::integral_image(const RawTensor &src, RawTensor &dst) { @@ -64,6 +73,7 @@ void ReferenceCPP::integral_image(const RawTensor &src, RawTensor &dst) Tensor<uint32_t> d(dst.shape(), dst.data_type(), dst.fixed_point_position(), reinterpret_cast<uint32_t *>(dst.data())); tensor_operations::integral_image(s, d); } + // Accumulate void ReferenceCPP::accumulate(const RawTensor &src, RawTensor &dst) { |