From c2bc1561ce232d197153ad2b70c205332a1b36ba Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 7 Nov 2016 17:46:51 -0800 Subject: [PATCH] Remove unused time variables BUG=None TEST=None Review URL: https://codereview.chromium.org/2487603002 . --- unit_test/planar_test.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc index e812c2aa7..47ffc3fd9 100644 --- a/unit_test/planar_test.cc +++ b/unit_test/planar_test.cc @@ -1374,19 +1374,15 @@ TEST_F(LibYUVPlanarTest, TestCopyPlane) { // Disable all optimizations. MaskCpuFlags(disable_cpu_flags_); - double c_time = get_time(); for (j = 0; j < benchmark_iterations_; j++) { CopyPlane(orig_y + y_off, y_st, dst_c + y_off, stride, yw, yh); } - c_time = (get_time() - c_time) / benchmark_iterations_; // Enable optimizations. MaskCpuFlags(benchmark_cpu_info_); - double opt_time = get_time(); for (j = 0; j < benchmark_iterations_; j++) { CopyPlane(orig_y + y_off, y_st, dst_opt + y_off, stride, yw, yh); } - opt_time = (get_time() - opt_time) / benchmark_iterations_; for (i = 0; i < y_plane_size; ++i) { if (dst_c[i] != dst_opt[i]) @@ -2053,28 +2049,24 @@ int TestHalfFloatPlane(int benchmark_width, memset(dst_opt, 1, y_plane_size); for (i = 0; i < y_plane_size / 2; ++i) { - reinterpret_cast(orig_y)[i] = static_cast(i & mask); + reinterpret_cast(orig_y)[i] &= mask; } // Disable all optimizations. MaskCpuFlags(disable_cpu_flags); - double c_time = get_time(); for (j = 0; j < benchmark_iterations; j++) { HalfFloatPlane(reinterpret_cast(orig_y), benchmark_width * 2, reinterpret_cast(dst_c), benchmark_width * 2, scale, benchmark_width, benchmark_height); } - c_time = (get_time() - c_time) / benchmark_iterations; // Enable optimizations. MaskCpuFlags(benchmark_cpu_info); - double opt_time = get_time(); for (j = 0; j < benchmark_iterations; j++) { HalfFloatPlane(reinterpret_cast(orig_y), benchmark_width * 2, reinterpret_cast(dst_opt), benchmark_width * 2, scale, benchmark_width, benchmark_height); } - opt_time = (get_time() - opt_time) / benchmark_iterations; int max_diff = 0; for (i = 0; i < y_plane_size / 2; ++i) {