benchmark: Unify control config CONFIG_BENCHMARK Change-Id: Idcc6aa5571cc70878dfbc0690000ef484fa022b5
diff --git a/test/sad_test.cc b/test/sad_test.cc index 60f10ac..3ade4a3 100644 --- a/test/sad_test.cc +++ b/test/sad_test.cc
@@ -26,7 +26,7 @@ #include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" -#if HAVE_AVX2 && CONFIG_BENCHMARK +#if CONFIG_BENCHMARK #include "third_party/benchmark/include/benchmark/benchmark.h" #endif @@ -601,9 +601,7 @@ source_stride_ = tmp_stride; } -// Exclude benchmark from windows build. -// avx2 highway is excluded from non 64 bit x86. -#if CONFIG_BENCHMARK && AOM_ARCH_X86_64 +#if CONFIG_BENCHMARK static void FillRandomForBM(uint8_t *data, ACMRandom &rnd, int stride, int height) { for (int j = 0; j < height; ++j) { @@ -671,7 +669,7 @@ BENCHMARK(BM_SAD_SKIP<aom_sad_skip_64x64_avx512, 64, 64>); BENCHMARK(BM_SAD_SKIP<aom_sad_skip_64x32_avx512, 64, 32>); #endif -#endif // !(defined(_WIN32) || defined(_WIN64)) +#endif // CONFIG_BENCHMARK TEST_P(SADSkipTest, MaxRef) { FillConstant(source_data_, source_stride_, 0);
diff --git a/test/test_libaom.cc b/test/test_libaom.cc index d2239b8..b2f8488 100644 --- a/test/test_libaom.cc +++ b/test/test_libaom.cc
@@ -11,12 +11,12 @@ #include "gtest/gtest.h" -#if !(defined(_WIN32) || defined(__WIN64)) +#include "config/aom_config.h" + +#if CONFIG_BENCHMARK #include "third_party/benchmark/include/benchmark/benchmark.h" #endif -#include "config/aom_config.h" - #if !CONFIG_SHARED #include <string.h> @@ -59,7 +59,7 @@ int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); -#if !(defined(_WIN32) || defined(__WIN64)) +#if CONFIG_BENCHMARK if (!benchmark::GetBenchmarkFilter().empty()) { benchmark::RunSpecifiedBenchmarks(); return 0;