diff --git a/README.md b/README.md index 20a46f8b..eb4e1e35 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ Once installed, you can use `pkg-config --cflags --libs x86simdsortcpp` to populate the right cflags and ldflags to compile and link your C++ program. This repository also contains a test suite and benchmarking suite which are written using [googletest](https://github.com/google/googletest) and [google -benchmark](https://github.com/google/benchmark) frameworks respectively. You -can configure meson to build them both by using `-Dbuild_tests=true` and -`-Dbuild_benchmarks=true`. +benchmark](https://github.com/google/benchmark) (>= v1.9.2) frameworks +respectively. You can configure meson to build them both by using +`-Dbuild_tests=true` and `-Dbuild_benchmarks=true`. ## Build using OpenMP diff --git a/benchmarks/bench-vqsort.cpp b/benchmarks/bench-vqsort.cpp index d0dea2b1..5fc7bd2d 100644 --- a/benchmarks/bench-vqsort.cpp +++ b/benchmarks/bench-vqsort.cpp @@ -26,5 +26,7 @@ BENCH_SORT(vqsort, uint64_t) BENCH_SORT(vqsort, int64_t) BENCH_SORT(vqsort, uint32_t) BENCH_SORT(vqsort, int32_t) +BENCH_SORT(vqsort, uint16_t) +BENCH_SORT(vqsort, int16_t) BENCH_SORT(vqsort, float) BENCH_SORT(vqsort, double) diff --git a/benchmarks/bench.h b/benchmarks/bench.h index fdeb2cec..3d77a518 100644 --- a/benchmarks/bench.h +++ b/benchmarks/bench.h @@ -5,11 +5,12 @@ #define MY_BENCHMARK_CAPTURE(func, T, test_case_name, ...) \ BENCHMARK_PRIVATE_DECLARE(func) \ = (::benchmark::internal::RegisterBenchmarkInternal( \ + std::unique_ptr( \ new ::benchmark::internal::FunctionBenchmark( \ #func "/" #test_case_name "/" #T, \ [](::benchmark::State &st) { \ func(st, __VA_ARGS__); \ - }))) + })))) #define BENCH_SORT(func, type) \ MY_BENCHMARK_CAPTURE(func, type, random_128, 128, std::string("random")); \ diff --git a/scripts/bench-compare.sh b/scripts/bench-compare.sh index a224acd0..2f6564b4 100755 --- a/scripts/bench-compare.sh +++ b/scripts/bench-compare.sh @@ -11,7 +11,7 @@ if [ ! -d .bench/google-benchmark ]; then fi compare=$(realpath .bench/google-benchmark/tools/compare.py) -meson setup -Dbuild_benchmarks=true -Dbuild_ippbench=true --warnlevel 0 --buildtype release builddir-${branch} +meson setup -Dbuild_benchmarks=true -Dbuild_vqsortbench=true --warnlevel 0 --buildtype release builddir-${branch} cd builddir-${branch} ninja $compare filters ./benchexe $1 $2 --benchmark_repetitions=$3