mirror of
https://github.com/google/benchmark.git
synced 2025-01-29 05:10:19 +08:00
Fix doc sample typos in header and README
* iterations() is a method * int64_t fix in a couple of places
This commit is contained in:
parent
47c304536e
commit
f338ce7965
@ -44,7 +44,8 @@ static void BM_memcpy(benchmark::State& state) {
|
|||||||
memset(src, 'x', state.range_x());
|
memset(src, 'x', state.range_x());
|
||||||
while (state.KeepRunning())
|
while (state.KeepRunning())
|
||||||
memcpy(dst, src, state.range_x());
|
memcpy(dst, src, state.range_x());
|
||||||
state.SetBytesProcessed(int64_t(state.iterations) * int64_t(state.range_x()));
|
state.SetBytesProcessed(int64_t(state.iterations()) *
|
||||||
|
int64_t(state.range_x()));
|
||||||
delete[] src;
|
delete[] src;
|
||||||
delete[] dst;
|
delete[] dst;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,8 @@ static void BM_memcpy(benchmark::State& state) {
|
|||||||
memset(src, 'x', state.range_x());
|
memset(src, 'x', state.range_x());
|
||||||
while (state.KeepRunning())
|
while (state.KeepRunning())
|
||||||
memcpy(dst, src, state.range_x());
|
memcpy(dst, src, state.range_x());
|
||||||
state.SetBytesProcessed(int64_t_t(state.iterations) * int64(state.range_x()));
|
state.SetBytesProcessed(int64_t(state.iterations()) *
|
||||||
|
int64_t(state.range_x()));
|
||||||
delete[] src; delete[] dst;
|
delete[] src; delete[] dst;
|
||||||
}
|
}
|
||||||
BENCHMARK(BM_memcpy)->Arg(8)->Arg(64)->Arg(512)->Arg(1<<10)->Arg(8<<10);
|
BENCHMARK(BM_memcpy)->Arg(8)->Arg(64)->Arg(512)->Arg(1<<10)->Arg(8<<10);
|
||||||
|
Loading…
Reference in New Issue
Block a user