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
14ec0ee9
Commit
14ec0ee9
authored
Aug 09, 2022
by
Paul
Browse files
Fix cppcheck
parent
a1663694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
src/targets/gpu/compile_gen.cpp
src/targets/gpu/compile_gen.cpp
+2
-5
No files found.
src/targets/gpu/compile_gen.cpp
View file @
14ec0ee9
...
@@ -84,11 +84,8 @@ preload preload::broadcasts(std::size_t axis, const std::vector<shape>& inputs)
...
@@ -84,11 +84,8 @@ preload preload::broadcasts(std::size_t axis, const std::vector<shape>& inputs)
const
std
::
size_t
max_lds_bytes
=
4096
;
const
std
::
size_t
max_lds_bytes
=
4096
;
std
::
vector
<
bool
>
result
(
inputs
.
size
());
std
::
vector
<
bool
>
result
(
inputs
.
size
());
std
::
vector
<
std
::
size_t
>
preloaded
;
std
::
vector
<
std
::
size_t
>
preloaded
;
for
(
auto
i
:
range
(
inputs
.
size
()))
auto
idxs
=
range
(
inputs
.
size
());
{
std
::
copy_if
(
idxs
.
begin
(),
idxs
.
end
(),
std
::
back_inserter
(
preloaded
),
[
&
](
auto
i
){
return
inputs
[
i
].
strides
()[
axis
]
==
0
;
});
if
(
inputs
[
i
].
strides
()[
axis
]
==
0
)
preloaded
.
push_back
(
i
);
}
std
::
sort
(
preloaded
.
begin
(),
preloaded
.
end
(),
by
(
std
::
less
<>
{},
[
&
](
auto
i
)
{
std
::
sort
(
preloaded
.
begin
(),
preloaded
.
end
(),
by
(
std
::
less
<>
{},
[
&
](
auto
i
)
{
return
inputs
[
i
].
bytes
();
return
inputs
[
i
].
bytes
();
}));
}));
...
...
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