Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
3f69aa2b
Commit
3f69aa2b
authored
Nov 04, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use portable printf format for uint64_t.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
9fa4bf9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
testrandom.cc
src/testrandom.cc
+4
-2
No files found.
src/testrandom.cc
View file @
3f69aa2b
...
...
@@ -18,6 +18,8 @@
#include "utils.hh"
#include "random.hh"
#include <inttypes.h>
using
std
::
vector
;
using
std
::
string
;
...
...
@@ -28,7 +30,7 @@ main (int argc, char **argv)
for
(
size_t
i
=
0
;
i
<
20
;
i
++
)
{
uint64_t
x
=
rng
();
printf
(
"%016
lx
\n
"
,
x
);
printf
(
"%016
"
PRIx64
"
\n
"
,
x
);
}
uint64_t
s
=
0
;
...
...
@@ -39,7 +41,7 @@ main (int argc, char **argv)
s
+=
rng
();
}
double
t_end
=
get_time
();
printf
(
"s=%016
lx
\n\n
"
,
s
);
printf
(
"s=%016
"
PRIx64
"
\n\n
"
,
s
);
printf
(
"%f Mvalues/sec
\n
"
,
runs
/
(
t_end
-
t_start
)
/
1000000
);
}
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