Lines Matching refs:state
27 static void MallocFree(benchmark::State& state) { in MallocFree() argument
28 const size_t nbytes = state.range(0); in MallocFree()
31 for (auto _ : state) { in MallocFree()
38 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in MallocFree()
41 static void BM_stdlib_malloc_free_default(benchmark::State& state) { in BM_stdlib_malloc_free_default() argument
47 MallocFree(state); in BM_stdlib_malloc_free_default()
52 static void BM_stdlib_malloc_free_decay1(benchmark::State& state) { in BM_stdlib_malloc_free_decay1() argument
55 MallocFree(state); in BM_stdlib_malloc_free_decay1()
62 static void CallocFree(benchmark::State& state) { in CallocFree() argument
63 const size_t nbytes = state.range(0); in CallocFree()
66 for (auto _ : state) { in CallocFree()
73 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in CallocFree()
76 static void BM_stdlib_calloc_free_default(benchmark::State& state) { in BM_stdlib_calloc_free_default() argument
82 CallocFree(state); in BM_stdlib_calloc_free_default()
87 static void BM_stdlib_calloc_free_decay1(benchmark::State& state) { in BM_stdlib_calloc_free_decay1() argument
90 CallocFree(state); in BM_stdlib_calloc_free_decay1()
97 static void MallocMultiple(benchmark::State& state, size_t nbytes, size_t numAllocs) { in MallocMultiple() argument
100 for (auto _ : state) { in MallocMultiple()
105 state.PauseTiming(); // Stop timers while freeing pointers. in MallocMultiple()
109 state.ResumeTiming(); in MallocMultiple()
112 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes) * numAllocs); in MallocMultiple()
115 void BM_stdlib_malloc_forty_default(benchmark::State& state) { in BM_stdlib_malloc_forty_default() argument
122 MallocMultiple(state, state.range(0), 40); in BM_stdlib_malloc_forty_default()
127 void BM_stdlib_malloc_forty_decay1(benchmark::State& state) { in BM_stdlib_malloc_forty_decay1() argument
130 MallocMultiple(state, state.range(0), 40); in BM_stdlib_malloc_forty_decay1()
137 void BM_stdlib_malloc_multiple_8192_allocs_default(benchmark::State& state) { in BM_stdlib_malloc_multiple_8192_allocs_default() argument
143 MallocMultiple(state, 8192, state.range(0)); in BM_stdlib_malloc_multiple_8192_allocs_default()
148 void BM_stdlib_malloc_multiple_8192_allocs_decay1(benchmark::State& state) { in BM_stdlib_malloc_multiple_8192_allocs_decay1() argument
151 MallocMultiple(state, 8192, state.range(0)); in BM_stdlib_malloc_multiple_8192_allocs_decay1()
158 static void BM_stdlib_mbstowcs(benchmark::State& state) { in BM_stdlib_mbstowcs() argument
159 const size_t buf_alignment = state.range(0); in BM_stdlib_mbstowcs()
160 const size_t widebuf_alignment = state.range(1); in BM_stdlib_mbstowcs()
193 for (auto _ : state) { in BM_stdlib_mbstowcs()
197 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000)); in BM_stdlib_mbstowcs()
201 static void BM_stdlib_mbrtowc(benchmark::State& state) { in BM_stdlib_mbrtowc() argument
202 const size_t buf_alignment = state.range(0); in BM_stdlib_mbrtowc()
233 for (auto _ : state) { in BM_stdlib_mbrtowc()
238 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000)); in BM_stdlib_mbrtowc()