summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/histogram.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-07-27 09:55:18 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-27 18:12:13 +0300
commitacd5d9979fca93bf7a0ffa6f5d08f5cf43ba0cee (patch)
treeb2fb78d222edac459107da0d54991e7a7f5b4dbb /src/ipa/raspberrypi/controller/histogram.cpp
parent177df04d2b7f357ebe41f1a9809ab68b6f948082 (diff)
ipa: raspberrypi: Change to C style code comments
As part of the on-going refactor efforts for the source files in src/ipa/raspberrypi/, switch all C++ style comments to C style comments. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller/histogram.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/histogram.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/raspberrypi/controller/histogram.cpp b/src/ipa/raspberrypi/controller/histogram.cpp
index e865bef0..91a759b5 100644
--- a/src/ipa/raspberrypi/controller/histogram.cpp
+++ b/src/ipa/raspberrypi/controller/histogram.cpp
@@ -30,13 +30,13 @@ double Histogram::quantile(double q, int first, int last) const
last = cumulative_.size() - 2;
assert(first <= last);
uint64_t items = q * total();
- while (first < last) // binary search to find the right bin
+ while (first < last) /* binary search to find the right bin */
{
int middle = (first + last) / 2;
if (cumulative_[middle + 1] > items)
- last = middle; // between first and middle
+ last = middle; /* between first and middle */
else
- first = middle + 1; // after middle
+ first = middle + 1; /* after middle */
}
assert(items >= cumulative_[first] && items <= cumulative_[last + 1]);
double frac = cumulative_[first + 1] == cumulative_[first] ? 0
@@ -59,6 +59,6 @@ double Histogram::interQuantileMean(double qLo, double qHi) const
sumBinFreq += bin * freq;
cumulFreq += freq;
}
- // add 0.5 to give an average for bin mid-points
+ /* add 0.5 to give an average for bin mid-points */
return sumBinFreq / cumulFreq + 0.5;
}