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
dd81f917
Commit
dd81f917
authored
Aug 15, 2018
by
Paul
Browse files
Formatting
parent
ea44f5a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
src/include/migraph/time.hpp
src/include/migraph/time.hpp
+1
-1
src/program.cpp
src/program.cpp
+7
-4
No files found.
src/include/migraph/time.hpp
View file @
dd81f917
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
namespace
migraph
{
namespace
migraph
{
template
<
class
Duration
,
class
F
>
template
<
class
Duration
,
class
F
>
auto
time
(
F
f
)
auto
time
(
F
f
)
{
{
auto
start
=
std
::
chrono
::
steady_clock
::
now
();
auto
start
=
std
::
chrono
::
steady_clock
::
now
();
...
...
src/program.cpp
View file @
dd81f917
...
@@ -19,7 +19,7 @@ struct program_impl
...
@@ -19,7 +19,7 @@ struct program_impl
const
operation
&
get_operation
(
instruction_ref
ins
)
{
return
ins
->
op
;
}
const
operation
&
get_operation
(
instruction_ref
ins
)
{
return
ins
->
op
;
}
template
<
class
F
>
template
<
class
F
>
static
void
print_program
(
std
::
ostream
&
os
,
const
program
&
p
,
F
annonate
)
static
void
print_program
(
std
::
ostream
&
os
,
const
program
&
p
,
F
annonate
)
{
{
std
::
unordered_map
<
const
instruction
*
,
std
::
string
>
names
;
std
::
unordered_map
<
const
instruction
*
,
std
::
string
>
names
;
...
@@ -263,8 +263,11 @@ void program::compile(const target& t)
...
@@ -263,8 +263,11 @@ void program::compile(const target& t)
}
}
}
}
template
<
class
F
>
template
<
class
F
>
argument
generic_eval
(
const
program
&
p
,
context
&
ctx
,
std
::
unordered_map
<
std
::
string
,
argument
>
params
,
F
trace
)
argument
generic_eval
(
const
program
&
p
,
context
&
ctx
,
std
::
unordered_map
<
std
::
string
,
argument
>
params
,
F
trace
)
{
{
assert
(
p
.
validate
()
==
p
.
end
());
assert
(
p
.
validate
()
==
p
.
end
());
std
::
unordered_map
<
const
instruction
*
,
argument
>
results
;
std
::
unordered_map
<
const
instruction
*
,
argument
>
results
;
...
@@ -306,7 +309,7 @@ bool operator==(const program& x, const program& y) { return to_string(x) == to_
...
@@ -306,7 +309,7 @@ bool operator==(const program& x, const program& y) { return to_string(x) == to_
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
program
&
p
)
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
program
&
p
)
{
{
print_program
(
os
,
p
,
[](
auto
&&
...){});
print_program
(
os
,
p
,
[](
auto
&&
...)
{});
return
os
;
return
os
;
}
}
...
...
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