diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-02-03 09:17:31 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-02-09 11:33:52 +0000 |
commit | f0c0468b3b4c8938fa817c3df8a20c8d4610ced6 (patch) | |
tree | 8ed0e8541892d47bf9d47f6c44afc91d8014f674 /src/ipa/raspberrypi/controller | |
parent | 312bd707bd27a0d20b3b9e04fa35985aea5c7a1e (diff) |
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 <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller')
-rw-r--r-- | src/ipa/raspberrypi/controller/histogram.h | 5 |
1 files changed, 5 insertions, 0 deletions
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<typename T> Histogram(T *histogram, int num) { assert(num); |