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
11bc1594
"test/vscode:/vscode.git/clone" did not exist on "313bbea5886850acab286f45e9d9816cf0b0dca0"
Commit
11bc1594
authored
Feb 08, 2019
by
Paul
Browse files
Formatting
parent
3c45174a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/program.cpp
src/program.cpp
+4
-7
No files found.
src/program.cpp
View file @
11bc1594
...
@@ -381,17 +381,15 @@ argument program::eval(std::unordered_map<std::string, argument> params) const
...
@@ -381,17 +381,15 @@ argument program::eval(std::unordered_map<std::string, argument> params) const
{
{
auto
&
ctx
=
this
->
impl
->
ctx
;
auto
&
ctx
=
this
->
impl
->
ctx
;
#ifndef NDEBUG
#ifndef NDEBUG
auto
sctx
=
ctx
;
auto
sctx
=
ctx
;
auto
check_context
=
[
&
](
auto
f
)
{
auto
check_context
=
[
&
](
auto
f
)
{
assert
(
is_shared
(
ctx
,
sctx
));
assert
(
is_shared
(
ctx
,
sctx
));
auto
x
=
f
();
auto
x
=
f
();
sctx
=
ctx
;
sctx
=
ctx
;
return
x
;
return
x
;
};
};
#else
#else
auto
check_context
=
[](
auto
f
)
{
auto
check_context
=
[](
auto
f
)
{
return
f
();
};
return
f
();
};
#endif
#endif
if
(
enabled
(
MIGRAPHX_TRACE_EVAL
{}))
if
(
enabled
(
MIGRAPHX_TRACE_EVAL
{}))
{
{
...
@@ -459,8 +457,7 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
...
@@ -459,8 +457,7 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
overhead_vec
.
reserve
(
n
);
overhead_vec
.
reserve
(
n
);
for
(
std
::
size_t
i
=
0
;
i
<
n
;
i
++
)
for
(
std
::
size_t
i
=
0
;
i
<
n
;
i
++
)
{
{
overhead_vec
.
push_back
(
time
<
milliseconds
>
(
overhead_vec
.
push_back
(
time
<
milliseconds
>
([
&
]
{
dry_run
(
params
);
}));
[
&
]
{
dry_run
(
params
);
}));
}
}
double
total_time
=
common_average
(
total_vec
);
double
total_time
=
common_average
(
total_vec
);
...
...
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