Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
f338ce79
Commit
f338ce79
authored
Sep 17, 2015
by
Eli Bendersky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix doc sample typos in header and README
* iterations() is a method * int64_t fix in a couple of places
parent
47c30453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
README.md
README.md
+2
-1
benchmark_api.h
include/benchmark/benchmark_api.h
+2
-1
No files found.
README.md
View file @
f338ce79
...
@@ -44,7 +44,8 @@ static void BM_memcpy(benchmark::State& state) {
...
@@ -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
;
}
}
...
...
include/benchmark/benchmark_api.h
View file @
f338ce79
...
@@ -42,7 +42,8 @@ static void BM_memcpy(benchmark::State& state) {
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment