Lines Matching refs:state

6 void BM_empty(benchmark::State& state) {
7 for (auto _ : state) {
8 auto iterations = state.iterations();
15 void BM_spin_empty(benchmark::State& state) {
16 for (auto _ : state) {
17 for (auto x = 0; x < state.range(0); ++x) {
25 void BM_spin_pause_before(benchmark::State& state) {
26 for (auto i = 0; i < state.range(0); ++i) {
29 for (auto _ : state) {
30 for (auto i = 0; i < state.range(0); ++i) {
38 void BM_spin_pause_during(benchmark::State& state) {
39 for (auto _ : state) {
40 state.PauseTiming();
41 for (auto i = 0; i < state.range(0); ++i) {
44 state.ResumeTiming();
45 for (auto i = 0; i < state.range(0); ++i) {
53 void BM_pause_during(benchmark::State& state) {
54 for (auto _ : state) {
55 state.PauseTiming();
56 state.ResumeTiming();
64 void BM_spin_pause_after(benchmark::State& state) {
65 for (auto _ : state) {
66 for (auto i = 0; i < state.range(0); ++i) {
70 for (auto i = 0; i < state.range(0); ++i) {
77 void BM_spin_pause_before_and_after(benchmark::State& state) {
78 for (auto i = 0; i < state.range(0); ++i) {
81 for (auto _ : state) {
82 for (auto i = 0; i < state.range(0); ++i) {
86 for (auto i = 0; i < state.range(0); ++i) {
93 void BM_empty_stop_start(benchmark::State& state) {
94 for (auto _ : state) {
100 void BM_KeepRunning(benchmark::State& state) {
102 assert(iter_count == state.iterations());
103 while (state.KeepRunning()) {
106 assert(iter_count == state.iterations());
110 void BM_KeepRunningBatch(benchmark::State& state) {
119 while (state.KeepRunningBatch(batch_size)) {
122 assert(state.iterations() == iter_count);
136 void BM_RangedFor(benchmark::State& state) {
138 for (auto _ : state) {
141 assert(iter_count == state.max_iterations);
147 void BM_OneTemplateFunc(benchmark::State& state) {
148 auto arg = state.range(0);
150 for (auto _ : state) {
158 void BM_TwoTemplateFunc(benchmark::State& state) {
159 auto arg = state.range(0);
162 for (auto _ : state) {