Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
02c28d6a
Commit
02c28d6a
authored
Jul 05, 2019
by
Paul
Browse files
use const ref for parameters
parent
cd3eac0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/simplify_reshapes.cpp
src/simplify_reshapes.cpp
+4
-4
No files found.
src/simplify_reshapes.cpp
View file @
02c28d6a
...
@@ -91,7 +91,7 @@ struct find_reshaper
...
@@ -91,7 +91,7 @@ struct find_reshaper
match
::
any_of
[
match
::
outputs
()](
match
::
name
(
reshaper_names
())));
match
::
any_of
[
match
::
outputs
()](
match
::
name
(
reshaper_names
())));
}
}
void
apply
(
program
&
p
,
match
::
matcher_result
mr
)
const
void
apply
(
program
&
p
,
const
match
::
matcher_result
&
mr
)
const
{
{
auto
ins
=
mr
.
result
;
auto
ins
=
mr
.
result
;
std
::
vector
<
instruction_ref
>
reshapes
{
ins
};
std
::
vector
<
instruction_ref
>
reshapes
{
ins
};
...
@@ -132,7 +132,7 @@ struct find_nop_reshapes
...
@@ -132,7 +132,7 @@ struct find_nop_reshapes
return
match
::
name
(
reshapes
)(
match
::
same_shape
(
match
::
arg
(
0
)));
return
match
::
name
(
reshapes
)(
match
::
same_shape
(
match
::
arg
(
0
)));
}
}
void
apply
(
program
&
p
,
match
::
matcher_result
mr
)
const
void
apply
(
program
&
p
,
const
match
::
matcher_result
&
mr
)
const
{
{
auto
ins
=
mr
.
result
;
auto
ins
=
mr
.
result
;
p
.
replace_instruction
(
ins
,
ins
->
inputs
().
front
());
p
.
replace_instruction
(
ins
,
ins
->
inputs
().
front
());
...
@@ -147,7 +147,7 @@ struct find_transpose
...
@@ -147,7 +147,7 @@ struct find_transpose
match
::
skip_output
(
match
::
name
(
"contiguous"
))(
match
::
name
(
"transpose"
))));
match
::
skip_output
(
match
::
name
(
"contiguous"
))(
match
::
name
(
"transpose"
))));
}
}
void
apply
(
program
&
p
,
match
::
matcher_result
mr
)
const
void
apply
(
program
&
p
,
const
match
::
matcher_result
&
mr
)
const
{
{
auto
ins
=
mr
.
result
;
auto
ins
=
mr
.
result
;
auto
x
=
ins
;
auto
x
=
ins
;
...
@@ -181,7 +181,7 @@ struct find_concat_transpose
...
@@ -181,7 +181,7 @@ struct find_concat_transpose
match
::
all_of
[
match
::
inputs
()](
match
::
transpose_shape
()));
match
::
all_of
[
match
::
inputs
()](
match
::
transpose_shape
()));
}
}
void
apply
(
program
&
p
,
match
::
matcher_result
mr
)
const
void
apply
(
program
&
p
,
const
match
::
matcher_result
&
mr
)
const
{
{
auto
ins
=
mr
.
result
;
auto
ins
=
mr
.
result
;
auto
s
=
ins
->
inputs
().
front
()
->
get_shape
();
auto
s
=
ins
->
inputs
().
front
()
->
get_shape
();
...
...
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