diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2017-06-13 15:19:51 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 13:03:43 +0100 |
commit | f795986c8d4594279c277b14a33d29e48b2a4def (patch) | |
tree | 83c6c888e69fa380acaf81988f6a05d8035f627d /tests/validation/ReferenceCPP.cpp | |
parent | 7b06cde62a19ae0fda7bbbf0ab0bf18a88470af8 (diff) | |
download | ComputeLibrary-f795986c8d4594279c277b14a33d29e48b2a4def.tar.gz |
COMPMID-378 NEMeanStdDev test completed.
Change-Id: I46fb77c0cb507a4c0fe3264a89dd7b2ba63c44dc
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/77427
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
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) { |