mirror of
https://github.com/google/benchmark.git
synced 2025-01-27 20:30:15 +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());
|
||||
while (state.KeepRunning())
|
||||
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[] dst;
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ static void BM_memcpy(benchmark::State& state) {
|
||||
memset(src, 'x', state.range_x());
|
||||
while (state.KeepRunning())
|
||||
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;
|
||||
}
|
||||
BENCHMARK(BM_memcpy)->Arg(8)->Arg(64)->Arg(512)->Arg(1<<10)->Arg(8<<10);
|
||||
|
Loading…
Reference in New Issue
Block a user