From f338ce7965ab7b90bd8f69a981b8386ab8b54dc5 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Thu, 17 Sep 2015 20:14:10 -0700 Subject: [PATCH] Fix doc sample typos in header and README * iterations() is a method * int64_t fix in a couple of places --- README.md | 3 ++- include/benchmark/benchmark_api.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b3427aba..d95d276e 100644 --- a/README.md +++ b/README.md @@ -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; } diff --git a/include/benchmark/benchmark_api.h b/include/benchmark/benchmark_api.h index a8e8fd8a..4d9d5f3e 100644 --- a/include/benchmark/benchmark_api.h +++ b/include/benchmark/benchmark_api.h @@ -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);