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
adc03be6
Commit
adc03be6
authored
May 18, 2022
by
Paul
Browse files
Format
parent
6ba5859b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/reduce_dims.cpp
src/reduce_dims.cpp
+3
-2
No files found.
src/reduce_dims.cpp
View file @
adc03be6
...
@@ -37,8 +37,9 @@ bool reduce_dim(std::vector<shape>& shapes, std::size_t n)
...
@@ -37,8 +37,9 @@ bool reduce_dim(std::vector<shape>& shapes, std::size_t n)
void
reduce_dim1
(
std
::
vector
<
shape
>&
shapes
)
void
reduce_dim1
(
std
::
vector
<
shape
>&
shapes
)
{
{
if
(
std
::
any_of
(
if
(
std
::
any_of
(
shapes
.
begin
(),
shapes
.
end
(),
[
&
](
const
auto
&
s
)
{
shapes
.
begin
(),
shapes
.
end
(),
[
&
](
const
auto
&
s
)
{
return
s
.
lens
().
size
()
<
2
or
s
.
lens
().
back
()
!=
1
;
}))
return
s
.
lens
().
size
()
<
2
or
s
.
lens
().
back
()
!=
1
;
}))
return
;
return
;
for
(
auto
&
s
:
shapes
)
for
(
auto
&
s
:
shapes
)
{
{
...
...
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