[PATCH] D139797: [exegesis] Benchmark: provide optional progress meter / ETA

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 03:52:02 PST 2022


courbet added inline comments.


================
Comment at: llvm/tools/llvm-exegesis/lib/ProgressMeter.h:20
+
+template <typename NumTy, typename DenTy> class SimpleMovingAverage {
+  NumTy Accumulated = NumTy(0);
----------------
Please add a small descriptove comment so that one doe snot have to read the code, somehting like:

```
// Represents `\sum_{i=1..accumulated}{step_i} / accumulated`, where `step_i` is the value passed to the `i`-th call to `step()`, and `accumulated` is the total number of calls to `step()`.
```


================
Comment at: llvm/tools/llvm-exegesis/lib/ProgressMeter.h:41
+
+template <typename NumTy, typename DenTy>
+inline void SimpleMovingAverage<NumTy, DenTy>::step(NumTy Quantity) {
----------------
Any reason not to inline this (and other members) ? That's a lot of  repeated typing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139797/new/

https://reviews.llvm.org/D139797



More information about the llvm-commits mailing list