Add a couple of comments clarifying `dot_` and `FuncOutput`
PiperOrigin-RevId: 508019650
diff --git a/hwy/examples/benchmark.cc b/hwy/examples/benchmark.cc
index 55afd3b..14a4929 100644
--- a/hwy/examples/benchmark.cc
+++ b/hwy/examples/benchmark.cc
@@ -144,7 +144,10 @@
sum0 = Add(sum0, sum1);
sum2 = Add(sum2, sum3);
sum0 = Add(sum0, sum2);
+ // Remember to store the result in `dot_` for verification; see `Verify`.
dot_ = GetLane(SumOfLanes(d, sum0));
+ // Return the result so that the benchmarking framework can ensure that the
+ // computation is not elided by the compiler.
return static_cast<FuncOutput>(dot_);
}
void Verify(size_t num_items) {