diff options
author | Akio Nakamura <nakamura@dgtechnologies.co.jp> | 2018-07-05 20:04:48 +0900 |
---|---|---|
committer | Akio Nakamura <nakamura@dgtechnologies.co.jp> | 2018-07-05 20:04:48 +0900 |
commit | 1fc605a8aea247b2d5776c22b3e187d1b190fd99 (patch) | |
tree | 275ea4556027d595ef4a25ab227a27b55bcd216f /src/bench/prevector.cpp | |
parent | b77c38e06c7f7383066f921db628a3616946cfe5 (diff) |
fix bench/prevector.cpp
1. PrevectorClear()
2nd call of clear() should to operate t1 instead of t0.
This patch changes t0 to t1.
2. PREVECTOR_TEST()
PREVECTOR_TEST macro should to call both
PrevectorXX<nontrivial_t>(state) and PrevectorXX<trivial_t>(state)
by specific "name" which given by parameter instead of calling
PrevectorResize<>() regardless of "name".
This patch changes "PrevectorResize<" of this macro to
"Prevector ## name<".
Diffstat (limited to 'src/bench/prevector.cpp')
-rw-r--r-- | src/bench/prevector.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bench/prevector.cpp b/src/bench/prevector.cpp index 3cfad1b2c4..09c7020848 100644 --- a/src/bench/prevector.cpp +++ b/src/bench/prevector.cpp @@ -42,7 +42,7 @@ static void PrevectorClear(benchmark::State& state) t0.resize(28); t0.clear(); t1.resize(29); - t0.clear(); + t1.clear(); } } } @@ -64,11 +64,11 @@ static void PrevectorResize(benchmark::State& state) #define PREVECTOR_TEST(name, nontrivops, trivops) \ static void Prevector ## name ## Nontrivial(benchmark::State& state) { \ - PrevectorResize<nontrivial_t>(state); \ + Prevector ## name<nontrivial_t>(state); \ } \ BENCHMARK(Prevector ## name ## Nontrivial, nontrivops); \ static void Prevector ## name ## Trivial(benchmark::State& state) { \ - PrevectorResize<trivial_t>(state); \ + Prevector ## name<trivial_t>(state); \ } \ BENCHMARK(Prevector ## name ## Trivial, trivops); |