Skip to content

Commit 1fc605a

Browse files
committed
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<".
1 parent b77c38e commit 1fc605a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bench/prevector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void PrevectorClear(benchmark::State& state)
4242
t0.resize(28);
4343
t0.clear();
4444
t1.resize(29);
45-
t0.clear();
45+
t1.clear();
4646
}
4747
}
4848
}
@@ -64,11 +64,11 @@ static void PrevectorResize(benchmark::State& state)
6464

6565
#define PREVECTOR_TEST(name, nontrivops, trivops) \
6666
static void Prevector ## name ## Nontrivial(benchmark::State& state) { \
67-
PrevectorResize<nontrivial_t>(state); \
67+
Prevector ## name<nontrivial_t>(state); \
6868
} \
6969
BENCHMARK(Prevector ## name ## Nontrivial, nontrivops); \
7070
static void Prevector ## name ## Trivial(benchmark::State& state) { \
71-
PrevectorResize<trivial_t>(state); \
71+
Prevector ## name<trivial_t>(state); \
7272
} \
7373
BENCHMARK(Prevector ## name ## Trivial, trivops);
7474

0 commit comments

Comments
 (0)