diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-10-08 17:29:44 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-11-13 11:47:06 +0100 |
commit | 6d9baefca8a7e8d7e74dcd03e6cd06a30f2c1601 (patch) | |
tree | 0ba6680fec00424d9a9dbca9965e9c94ce6fed2a /src | |
parent | f328b61f663a5a0d4842807a55ed8a7567a07c26 (diff) |
ipa: libipa: Add data accessor to Histogram
For debugging purposes it is helpful to access the internal data of the
histogram. Add an accessor for that.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipa/libipa/histogram.cpp | 6 | ||||
-rw-r--r-- | src/ipa/libipa/histogram.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp index 5fbfadf5..10e44b54 100644 --- a/src/ipa/libipa/histogram.cpp +++ b/src/ipa/libipa/histogram.cpp @@ -63,6 +63,12 @@ Histogram::Histogram(Span<const uint32_t> data) */ /** + * \fn Histogram::data() + * \brief Retrieve the internal data + * \return The data + */ + +/** * \fn Histogram::total() * \brief Retrieve the total number of values in the data set * \return Number of values diff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h index 6fd64168..a926002c 100644 --- a/src/ipa/libipa/histogram.h +++ b/src/ipa/libipa/histogram.h @@ -36,6 +36,7 @@ public: } size_t bins() const { return cumulative_.size() - 1; } + const Span<const uint64_t> data() const { return cumulative_; } uint64_t total() const { return cumulative_[cumulative_.size() - 1]; } uint64_t cumulativeFrequency(double bin) const; double quantile(double q, uint32_t first = 0, uint32_t last = UINT_MAX) const; |