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
d447561b
Commit
d447561b
authored
Feb 09, 2019
by
Paul
Browse files
Check equality operator for instruction class
parent
a9e098ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/instruction.cpp
src/instruction.cpp
+2
-1
No files found.
src/instruction.cpp
View file @
d447561b
...
...
@@ -97,7 +97,8 @@ const std::vector<instruction_ref>& instruction::outputs() const { return output
bool
operator
==
(
const
instruction
&
x
,
const
instruction
&
y
)
{
if
(
not
(
x
.
result
==
y
.
result
and
x
.
op
==
y
.
op
and
x
.
arguments
==
y
.
arguments
))
static_assert
(
sizeof
(
instruction
)
==
(
sizeof
(
x
.
op
)
+
sizeof
(
x
.
result
)
+
sizeof
(
x
.
output
)
+
sizeof
(
x
.
arguments
)
+
sizeof
(
x
.
lit
)),
"Update equality operator"
);
if
(
std
::
tie
(
x
.
result
,
x
.
op
,
x
.
arguments
)
!=
std
::
tie
(
y
.
result
,
y
.
op
,
y
.
arguments
))
return
false
;
if
(
x
.
name
()
==
"@literal"
)
return
x
.
lit
==
y
.
lit
;
...
...
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