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
fcc721d2
Commit
fcc721d2
authored
Oct 31, 2022
by
charlie
Browse files
Simplify conditional
parent
b5768f82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/shape.cpp
src/shape.cpp
+3
-2
No files found.
src/shape.cpp
View file @
fcc721d2
...
@@ -507,8 +507,9 @@ bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
...
@@ -507,8 +507,9 @@ bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
bool
operator
==
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
bool
operator
==
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
{
{
// don't check opt if both are fixed
// don't check opt if both are fixed
bool
check_opt
=
not
(
x
.
is_fixed
()
and
y
.
is_fixed
());
return
(
x
.
min
==
y
.
min
and
return
(
x
.
min
==
y
.
min
and
x
.
max
==
y
.
max
and
(
check_opt
?
x
.
opt
==
y
.
opt
:
true
));
x
.
max
==
y
.
max
and
((
x
.
is_fixed
()
and
y
.
is_fixed
())
or
(
x
.
opt
==
y
.
opt
)));
}
}
bool
operator
!=
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
bool
operator
!=
(
const
shape
::
dynamic_dimension
&
x
,
const
shape
::
dynamic_dimension
&
y
)
...
...
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