Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/bench-vqsort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion benchmarks/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
#define MY_BENCHMARK_CAPTURE(func, T, test_case_name, ...) \
BENCHMARK_PRIVATE_DECLARE(func) \
= (::benchmark::internal::RegisterBenchmarkInternal( \
std::unique_ptr<benchmark::internal::Benchmark>( \
new ::benchmark::internal::FunctionBenchmark( \
#func "/" #test_case_name "/" #T, \
[](::benchmark::State &st) { \
func<T>(st, __VA_ARGS__); \
})))
}))))

#define BENCH_SORT(func, type) \
MY_BENCHMARK_CAPTURE(func, type, random_128, 128, std::string("random")); \
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading