Skip to content

Commit cfa9838

Browse files
Reorder methods in RefinableRuntimeEstimator
1 parent fc49b8e commit cfa9838

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libc/benchmarks/gpu/LibcGpuBenchmark.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ class RefinableRuntimeEstimator {
4343
sum_of_squared_cycles += cycles * cycles;
4444
}
4545

46+
void update(const RefinableRuntimeEstimator &other) noexcept {
47+
iterations += other.iterations;
48+
sum_of_cycles += other.sum_of_cycles;
49+
sum_of_squared_cycles += other.sum_of_squared_cycles;
50+
}
51+
4652
double get_mean() const noexcept {
4753
if (iterations == 0)
4854
return 0.0;
4955

5056
return static_cast<double>(sum_of_cycles) / iterations;
5157
}
5258

53-
void update(const RefinableRuntimeEstimator &other) noexcept {
54-
iterations += other.iterations;
55-
sum_of_cycles += other.sum_of_cycles;
56-
sum_of_squared_cycles += other.sum_of_squared_cycles;
57-
}
58-
5959
double get_variance() const noexcept {
6060
if (iterations == 0)
6161
return 0.0;

0 commit comments

Comments
 (0)