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
c51bcdde
Commit
c51bcdde
authored
Jun 03, 2022
by
charlie
Browse files
Use ternary operator
parent
faefeef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
src/shape.cpp
src/shape.cpp
+3
-18
No files found.
src/shape.cpp
View file @
c51bcdde
...
...
@@ -419,32 +419,17 @@ const std::vector<shape::dynamic_dimension>& shape::dyn_dims() const { return im
std
::
vector
<
std
::
size_t
>
shape
::
min_lens
()
const
{
if
(
not
this
->
dynamic
())
{
return
this
->
lens
();
}
return
impl
->
min_lens
();
;
return
this
->
dynamic
()
?
impl
->
min_lens
()
:
this
->
lens
();
}
std
::
vector
<
std
::
size_t
>
shape
::
max_lens
()
const
{
if
(
not
this
->
dynamic
())
{
return
this
->
lens
();
}
return
impl
->
max_lens
();
;
return
this
->
dynamic
()
?
impl
->
max_lens
()
:
this
->
lens
();
}
std
::
vector
<
std
::
size_t
>
shape
::
opt_lens
()
const
{
if
(
not
this
->
dynamic
())
{
return
this
->
lens
();
}
return
impl
->
opt_lens
();
;
return
this
->
dynamic
()
?
impl
->
opt_lens
()
:
this
->
lens
();
}
bool
shape
::
dynamic_dimension
::
is_fixed
()
const
{
return
this
->
min
==
this
->
max
;
}
...
...
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