9 void SetUp(const ::benchmark::State& state) {
10 if (state.thread_index == 0) {
11 assert(
data.get() ==
nullptr);
12 data.reset(
new int(42));
16 void TearDown(const ::benchmark::State& state) {
17 if (state.thread_index == 0) {
18 assert(
data.get() !=
nullptr);
29 assert(
data.get() !=
nullptr);
31 while (st.KeepRunning()) {
36 if (st.thread_index == 0) {
37 assert(
data.get() !=
nullptr);
40 while (st.KeepRunning()) {
41 assert(
data.get() !=
nullptr);
44 st.SetItemsProcessed(st.range(0));