Lines Matching refs:state

28 static void MallocFree(benchmark::State& state) {  in MallocFree()  argument
29 const size_t nbytes = state.range(0); in MallocFree()
32 for (auto _ : state) { in MallocFree()
39 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in MallocFree()
42 static void BM_stdlib_malloc_free_default(benchmark::State& state) { in BM_stdlib_malloc_free_default() argument
50 MallocFree(state); in BM_stdlib_malloc_free_default()
55 static void BM_stdlib_malloc_free_decay1(benchmark::State& state) { in BM_stdlib_malloc_free_decay1() argument
60 MallocFree(state); in BM_stdlib_malloc_free_decay1()
65 static void CallocFree(benchmark::State& state) { in CallocFree() argument
66 const size_t nbytes = state.range(0); in CallocFree()
69 for (auto _ : state) { in CallocFree()
76 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in CallocFree()
79 static void BM_stdlib_calloc_free_default(benchmark::State& state) { in BM_stdlib_calloc_free_default() argument
87 CallocFree(state); in BM_stdlib_calloc_free_default()
92 static void BM_stdlib_calloc_free_decay1(benchmark::State& state) { in BM_stdlib_calloc_free_decay1() argument
95 CallocFree(state); in BM_stdlib_calloc_free_decay1()
102 static void MallocMultiple(benchmark::State& state, size_t nbytes, size_t numAllocs) { in MallocMultiple() argument
105 for (auto _ : state) { in MallocMultiple()
110 state.PauseTiming(); // Stop timers while freeing pointers. in MallocMultiple()
114 state.ResumeTiming(); in MallocMultiple()
117 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes) * numAllocs); in MallocMultiple()
120 void BM_stdlib_malloc_forty_default(benchmark::State& state) { in BM_stdlib_malloc_forty_default() argument
128 MallocMultiple(state, state.range(0), 40); in BM_stdlib_malloc_forty_default()
133 void BM_stdlib_malloc_forty_decay1(benchmark::State& state) { in BM_stdlib_malloc_forty_decay1() argument
138 MallocMultiple(state, state.range(0), 40); in BM_stdlib_malloc_forty_decay1()
143 void BM_stdlib_malloc_multiple_8192_allocs_default(benchmark::State& state) { in BM_stdlib_malloc_multiple_8192_allocs_default() argument
151 MallocMultiple(state, 8192, state.range(0)); in BM_stdlib_malloc_multiple_8192_allocs_default()
156 void BM_stdlib_malloc_multiple_8192_allocs_decay1(benchmark::State& state) { in BM_stdlib_malloc_multiple_8192_allocs_decay1() argument
161 MallocMultiple(state, 8192, state.range(0)); in BM_stdlib_malloc_multiple_8192_allocs_decay1()
166 static void BM_stdlib_mbstowcs_ascii(benchmark::State& state) { in BM_stdlib_mbstowcs_ascii() argument
173 for (auto _ : state) { in BM_stdlib_mbstowcs_ascii()
177 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(wcs.size())); in BM_stdlib_mbstowcs_ascii()
181 static void BM_stdlib_mbstowcs_wide(benchmark::State& state) { in BM_stdlib_mbstowcs_wide() argument
192 for (auto _ : state) { in BM_stdlib_mbstowcs_wide()
196 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(wcs.size())); in BM_stdlib_mbstowcs_wide()
200 static void BM_stdlib_mbrtowc_1(benchmark::State& state) { in BM_stdlib_mbrtowc_1() argument
202 for (auto _ : state) { in BM_stdlib_mbrtowc_1()
208 static void BM_stdlib_mbrtowc_2(benchmark::State& state) { in BM_stdlib_mbrtowc_2() argument
210 for (auto _ : state) { in BM_stdlib_mbrtowc_2()
216 static void BM_stdlib_mbrtowc_3(benchmark::State& state) { in BM_stdlib_mbrtowc_3() argument
218 for (auto _ : state) { in BM_stdlib_mbrtowc_3()
224 static void BM_stdlib_mbrtowc_4(benchmark::State& state) { in BM_stdlib_mbrtowc_4() argument
226 for (auto _ : state) { in BM_stdlib_mbrtowc_4()