diff options
author | Dan Albert <danalbert@google.com> | 2014-09-25 15:43:48 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-09-25 15:43:48 -0700 |
commit | 055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131 (patch) | |
tree | 9fc16be728c1054c8496e0d6ed5e41f16f69f334 /benchmarks/math_benchmark.cpp | |
parent | 17e7d3208c68ff69819179d8a63ca234be2d1ab9 (diff) | |
download | bionic-055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131.zip bionic-055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131.tar.gz bionic-055a59c3ed3ecd8f3cac4aa5496f3d21ab56a131.tar.bz2 |
Prevent benchmarks from being optimized away.
Change-Id: I2d27b39ecdfc50e78098314567c295a2f113f8d3
Diffstat (limited to 'benchmarks/math_benchmark.cpp')
-rw-r--r-- | benchmarks/math_benchmark.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp index a9748cd..8d6dd10 100644 --- a/benchmarks/math_benchmark.cpp +++ b/benchmarks/math_benchmark.cpp @@ -20,8 +20,8 @@ #include <math.h> // Avoid optimization. -double d; -double v; +volatile double d; +volatile double v; static void BM_math_sqrt(int iters) { StartBenchmarkTiming(); |