Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
6e60de71
Commit
6e60de71
authored
Jun 08, 2022
by
turneram
Browse files
Foramtting
parent
da7d6cf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
src/program.cpp
src/program.cpp
+5
-7
No files found.
src/program.cpp
View file @
6e60de71
...
@@ -579,21 +579,19 @@ double common_average(const std::vector<double>& v)
...
@@ -579,21 +579,19 @@ double common_average(const std::vector<double>& v)
double
total_average
(
const
std
::
vector
<
double
>&
v
)
double
total_average
(
const
std
::
vector
<
double
>&
v
)
{
{
double
total
=
std
::
accumulate
(
v
.
begin
(),
v
.
end
(),
0.0
);
double
total
=
std
::
accumulate
(
v
.
begin
(),
v
.
end
(),
0.0
);
return
total
/
v
.
size
();
return
total
/
v
.
size
();
}
}
double
std_deviation
(
const
std
::
vector
<
double
>&
v
)
double
std_deviation
(
const
std
::
vector
<
double
>&
v
)
{
{
auto
mean
=
total_average
(
v
);
auto
mean
=
total_average
(
v
);
auto
var
=
std
::
accumulate
(
v
.
begin
(),
v
.
end
(),
0.0
,
[
&
](
auto
a
,
auto
b
){
return
a
+
std
::
pow
(
b
-
mean
,
2
);
});
auto
var
=
std
::
accumulate
(
v
.
begin
(),
v
.
end
(),
0.0
,
[
&
](
auto
a
,
auto
b
)
{
return
a
+
std
::
pow
(
b
-
mean
,
2
);
});
return
std
::
sqrt
(
var
/
v
.
size
());
return
std
::
sqrt
(
var
/
v
.
size
());
}
}
double
median
(
const
std
::
vector
<
double
>&
v
)
double
median
(
const
std
::
vector
<
double
>&
v
)
{
return
v
[(
v
.
size
()
/
2
)
-
1
];
}
{
return
v
[(
v
.
size
()
/
2
)
-
1
];
}
std
::
string
perf_group
(
const
operation
&
op
)
std
::
string
perf_group
(
const
operation
&
op
)
{
{
...
@@ -723,7 +721,7 @@ void program::perf_report(std::ostream& os,
...
@@ -723,7 +721,7 @@ void program::perf_report(std::ostream& os,
os
<<
"Batch size: "
<<
batch
<<
std
::
endl
;
os
<<
"Batch size: "
<<
batch
<<
std
::
endl
;
os
<<
"Average: "
<<
average
<<
std
::
endl
;
os
<<
"Average: "
<<
average
<<
std
::
endl
;
os
<<
"Median: "
<<
med
<<
std
::
endl
;
os
<<
"Median: "
<<
med
<<
std
::
endl
;
os
<<
"Standard deviation: "
<<
std_dev
<<
std
::
endl
;
os
<<
"Standard deviation: "
<<
std_dev
<<
std
::
endl
;
os
<<
"Rate: "
<<
rate
*
batch
<<
"/sec"
<<
std
::
endl
;
os
<<
"Rate: "
<<
rate
*
batch
<<
"/sec"
<<
std
::
endl
;
os
<<
"Total time: "
<<
total_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total time: "
<<
total_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total instructions time: "
<<
total_instruction_time
<<
"ms"
<<
std
::
endl
;
os
<<
"Total instructions time: "
<<
total_instruction_time
<<
"ms"
<<
std
::
endl
;
...
...
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