From f0c0468b3b4c8938fa817c3df8a20c8d4610ced6 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 3 Feb 2023 09:17:31 +0000 Subject: ipa: raspberrypi: histogram: Add a constructor for an empty histogram Add a default constructor to the RPiController::Histogram class that creates an empty histogram. Since this is a cumulative histogram, push a value of 0 into the first (and only) bin to signify this. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/controller/histogram.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ipa/raspberrypi') diff --git a/src/ipa/raspberrypi/controller/histogram.h b/src/ipa/raspberrypi/controller/histogram.h index 66a68b08..6b3e3a9e 100644 --- a/src/ipa/raspberrypi/controller/histogram.h +++ b/src/ipa/raspberrypi/controller/histogram.h @@ -20,6 +20,11 @@ namespace RPiController { class Histogram { public: + Histogram() + { + cumulative_.push_back(0); + } + template Histogram(T *histogram, int num) { assert(num); -- cgit v1.2.1